forked from autokey/autokey
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautokey.spec
More file actions
399 lines (311 loc) · 15.2 KB
/
Copy pathautokey.spec
File metadata and controls
399 lines (311 loc) · 15.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
%{?python_enable_dependency_generator}
Name: autokey
Version: 0.97.0~beta0
Release: 1%{?dist}
Summary: Desktop automation utility
License: GPLv3
URL: https://github.com/autokey/autokey
Source0: https://github.com/autokey/autokey/archive/v%{version}.tar.gz
Source1: 10-autokey.rules
Source2: autokey-gnome-extension@autokey.shell-extension.zip
BuildArch: noarch
BuildRequires: python3-devel,python3-xlib,python3-inotify,python3-dbus,python3-qt5-devel,python3-pip,python3-setuptools
%description
AutoKey is a desktop automation utility for Linux and X11. It allows
the automation of virtually any task by responding to typed abbreviations
and hot keys. It offers a full-featured GUI that makes it highly
accessible for novices, as well as a scripting interface offering
the full flexibility and power of the Python language.
%package common
Summary: Desktop automation utility - common data
Requires: gnome-extensions-app
Requires: python3-dbus
Requires: python3-evdev
Requires: python3-pyudev
Requires: wmctrl
Requires: ImageMagick
Requires: xautomation
Provides: autokey = %{version}-%{release}
%description common
This package contains the common data shared between the various front ends.
%post common
# Change group ownership on /dev/uinput to permit non-root write access
if [ -e /dev/uinput ]; then
cp /usr/share/autokey/uinput-udev-rule/* '/etc/udev/rules.d/'
/usr/bin/udevadm control --reload
/usr/bin/udevadm trigger --sysname-match='/devices/virtual/misc/uinput'
fi
if [ "$USER" = "root" ] && [ "$(logname)" != "root" ]; then
# Add the user to the "input" group membership
usermod -a -G "input" "$(logname)"
# If Gnome is present, install the Gnome Shell extension
gnome-extensions &>/dev/null
if [ $? -ne 127 ]; then
su -c 'gnome-extensions install --force /usr/share/autokey/gnome-shell-extension/autokey-gnome-extension@autokey.shell-extension.zip' $(logname)
fi
else
echo "*******************************************************************************"
echo "* If you plan to run AutoKey on a Wayland desktop, please enter the *"
echo "* following commands to configure your userid to run AutoKey: *"
echo "* *"
echo "sudo usermod -a -G input \$(id -u -n)"
echo "gnome-extension install --force /usr/share/autokey/gnome-shell-extension/autokey-gnome-extension@autokey.shell-extension.zip"
echo "* *"
echo "* You will need to log off and log back on so that these changes take *"
echo "* effect before trying to run AutoKey. *"
echo "*******************************************************************************"
fi
%preun common
case "$1" in
0)
if [ "$(logname)" != "root" ]; then
# Remove the user from the "input" group membership
usermod -r -G "input" "$(logname)"
# If Gnome is present, remove the Gnome Shell extension
gnome-extensions &>/dev/null
if [ $? -ne 127 ]; then
su -c 'gnome-extensions uninstall autokey-gnome-extension@autokey' $(logname)
rm -fr "/home/$(logname)/.local/share/gnome-shell/extensions/autokey-gnome-extension@autokey"
fi
fi
# Revert /dev/uinput to the default premissions
if [ -e /dev/uinput ]; then
rm -f '/etc/udev/rules.d/10-autokey.rules'
/usr/bin/udevadm control --reload
/usr/bin/udevadm trigger --sysname-match='/devices/virtual/misc/uinput'
fi
;;
esac
exit 0
%package gtk
Summary: AutoKey GTK+ front end
Requires: gtksourceview3
Requires: libappindicator-gtk3
Requires: python3-gobject
Requires: zenity
Requires: autokey-common = %{version}-%{release}
Provides: autokey = %{version}-%{release}
%description gtk
This package contains the GTK+ front end for autokey
%post gtk
update-alternatives --install /usr/bin/autokey autokey \
/usr/bin/autokey-gtk 50 \
--slave /usr/share/man/man1/autokey.1.gz autokey.1.gz \
/usr/share/man/man1/autokey-gtk.1.gz
%preun gtk
case "$1" in
0)
update-alternatives --remove autokey /usr/bin/autokey-gtk
;;
esac
exit 0
%package qt
Summary: AutoKey QT front end
Requires: python3-qscintilla-qt5
Requires: python3-qt5
Requires: autokey-common = %{version}-%{release}
Provides: autokey = %{version}-%{release}
%description qt
This package contains the QT front end for autokey
%post qt
update-alternatives --install /usr/bin/autokey autokey \
/usr/bin/autokey-qt 60 \
--slave /usr/share/man/man1/autokey.1.gz autokey.1.gz \
/usr/share/man/man1/autokey-qt.1.gz
%preun qt
case "$1" in
0)
update-alternatives --remove autokey /usr/bin/autokey-qt
;;
esac
exit 0
%prep
%setup -q -n %{name}-%{version}
cp %{SOURCE1} 10-autokey.rules
cp %{SOURCE2} autokey-gnome-extension/autokey-gnome-extension@autokey.shell-extension.zip
%build
%{__python3} setup.py build
%install
rm -rf %{buildroot}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot} --prefix %{_prefix}
# remove shebang from python libraries
for lib in $(find %{buildroot}%{python3_sitelib}/autokey/ -name "*.py"); do
sed '/\/usr\/bin\/env/d' $lib > $lib.new &&
touch -r $lib $lib.new &&
mv $lib.new $lib
done
# Put udev rules and gnome-autokey-extension file into place in BUILDROOT
install -m 644 -D --target-dir=%{buildroot}%{_datadir}/autokey/uinput-udev-rule 10-autokey.rules
install -m 644 -D --target-dir=%{buildroot}%{_datadir}/autokey/gnome-shell-extension autokey-gnome-extension/autokey-gnome-extension@autokey.shell-extension.zip
# ensure pkg_resources is able to find the required python packages
# sed -i 's/python3-xlib/python-xlib/' %{buildroot}%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info/requires.txt
%files common
%doc ACKNOWLEDGMENTS README.md CHANGELOG.md
%{python3_sitelib}/*
%exclude %{python3_sitelib}/autokey/gtkapp.py*
%exclude %{python3_sitelib}/autokey/gtkui/*
%exclude %{python3_sitelib}/autokey/qtapp.py*
%exclude %{python3_sitelib}/autokey/qtui/*
%{_datadir}/autokey
%{_datadir}/icons/*
%{_bindir}/autokey-headless
%{_bindir}/autokey-run
%{_bindir}/autokey-shell
%{_mandir}/man1/autokey-run.1*
%files gtk
%{_bindir}/autokey-gtk
%{python3_sitelib}/autokey/gtkapp.py*
%{python3_sitelib}/autokey/gtkui/*
%{_datadir}/applications/autokey-gtk.desktop
%{_mandir}/man1/autokey-gtk.1*
%files qt
%{_bindir}/autokey-qt
%{python3_sitelib}/autokey/qtapp.py*
%{python3_sitelib}/autokey/qtui/*
%{_datadir}/applications/autokey-qt.desktop
%{_mandir}/man1/autokey-qt.1*
%changelog
* Sun May 03 2026 Elliria <Elliria@users.noreply.github.com> - 0.97.0~beta0-1
- Update to 0.97.0~beta0
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.96.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.96.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.96.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 0.96.0-2
- Rebuilt for Python 3.12
* Sat Apr 29 2023 Jonathan Wright <jonathan@almalinux.org> - 0.96.0-1
- Update to 0.96.0 rhbz#1771109
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.95.10-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.95.10-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.95.10-8
- Rebuilt for Python 3.11
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.95.10-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.95.10-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.95.10-5
- Rebuilt for Python 3.10
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.95.10-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.95.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.95.10-2
- Rebuilt for Python 3.9
* Fri Feb 21 2020 Raghu Udiyar <raghusiddarth@gmail.com> - 0.95.10-1
- Update to latest bugfix 0.95.10
- Remove python3-qscintilla as its no longer built
- Add gtksourceview3 dependency explicitly
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.95.7-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.95.7-5
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.95.7-4
- Rebuilt for Python 3.8
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.95.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun May 12 2019 Raghu Udiyar <raghusiddarth@gmail.com> - 0.95.7-1
- Update to latest bugfix 0.95.7
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.95.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Dec 27 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.95.4-2
- Enable python dependency generator
* Mon Dec 10 2018 Raghu Udiyar <raghusiddarth@gmail.com> - 0.95.4-1
- Fix missing qsci dependency for QT
* Mon Dec 10 2018 Raghu Udiyar <raghusiddarth@gmail.com> - 0.95.4
- Update to latest bugfix 0.95.4 to fix (#1646812)
- Remove qt5 requires (#1607903)
* Sun Dec 09 2018 Miro Hrončok <mhroncok@redhat.com> - 0.95.2-2
- Remove unused Python 2 pygtksourceview dependency
* Mon Jul 23 2018 Raghu Udiyar <raghusiddarth@gmail.com> - 0.95.2-1
- Update to latest 0.95.2 release (#1596426)
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.94.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.94.0-2
- Rebuilt for Python 3.7
* Tue May 01 2018 Raghu Udiyar <raghusiddarth@gmail.com> - 0.94.0-1
- Update to latest 0.94.0 and use python3 (#1567688)
* Wed Apr 04 2018 Kalev Lember <klember@redhat.com> - 0.90.4-14
- Add missing dependencies for autokey-gtk (#1520592)
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.90.4-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sun Jan 07 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.90.4-12
- Remove obsolete scriptlets
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.90.4-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.90.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.90.4-9
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.90.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.90.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.90.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Sep 16 2013 Raghu Udiyar <raghusiddarth@gmail.com> - 0.90.4-5
- Updated pygtksourceview dependency to gtksourceview3
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.90.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.90.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.90.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu May 17 2012 Raghu Udiyar <raghusiddarth@gmail.com> 0.90.4-1
- Update to upstream 0.90-4 release
- Qt interface is back with major updates to both frontends
- Back to the old split package structure
* Tue Jan 10 2012 Matěj Cepl <mcepl@redhat.com> 0.81.4-1
- Upgrade to the latest upstream package.
* Tue Nov 22 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.81.0-2
- Add autokey-run files to the package
* Tue Nov 22 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.81.0-1
- Update to upstream 0.81.0 release
- Changelog : http://code.google.com/p/autokey/source/browse/trunk/debian/changelog?r=408
* Wed Oct 26 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.80.3-1
- Update to upstream 0.80.3 release
- Changelog : http://code.google.com/p/autokey/source/browse/trunk/debian/changelog?spec=svn379&r=379
* Sat Oct 8 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.80.2-1
- Update to upstream 0.80.2 release
- Qt interface deprecated and removed
- Change package structure and remove qt subpackage/files
- Updated application icon
- Full changelog : http://code.google.com/p/autokey/source/browse/trunk/debian/changelog?spec=svn376&r=376
* Thu Jul 21 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.71.3-4
- Update to upstream 0.71.3-2 release
- Source tarball now extracts to "autokey-version" instead of "build" directory
- The README file now explicitly mentions the licence
- Drop defattr from the spec since recent RPM makes it redundant
* Fri Jul 15 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.71.3-3
- Add build requirement for desktop-file-utils
- Require pygtksourceview for gtk frontend
- Require qscintilla-python for qt frontend
* Wed May 25 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.71.3-2
- Improve spec readability
* Tue Apr 19 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.71.3-1
- Update to upstream 0.71.3 release
* Sun Mar 13 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.71.2-6
- Add desktop-file-validate
* Sun Mar 06 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.71.2-5
- Remove Python-xlib dependency
- Add doc/scripting to docs
* Fri Mar 04 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.71.2-4
- Remove deprecated daemon, see : http://code.google.com/p/autokey/issues/detail?id=106
* Mon Feb 28 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.71.2-3
- Add script to remove shebang from python libraries
- Remove default start from initscript
- Add patch to use lockfile in initscript
* Wed Feb 02 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.71.2-2
- Add postun scriptlet to handle upgrades
- Set autokey service to start only in runlevel 5
* Sun Jan 30 2011 Raghu Udiyar <raghusiddarth@gmail.com> 0.71.2-1
- Update to upstream 0.71.2 release
- Add COPYING file to docs
- Update init script to match upstream
* Sat Dec 18 2010 Raghu Udiyar <raghusiddarth@gmail.com> 0.71.1-1
- Update to upstream 0.71.1 release
* Fri Oct 01 2010 Raghu Udiyar <raghusiddarth@gmail.com> 0.71.0-1
- Initial version of the package