1 |
%define vmaj %(echo %{version}|cut -d. -f-2) |
2 |
|
3 |
Name: onboard |
4 |
Version: 1.4.1 |
5 |
Release: %mkrel 9 |
6 |
Summary: On-screen keyboard with spelling suggestions, auto-show and more |
7 |
|
8 |
Group: Accessibility |
9 |
License: GPLv2+ |
10 |
URL: https://launchpad.net/onboard/ |
11 |
Source0: http://launchpad.net/%{name}/%{vmaj}/%{version}/+download/%{name}-%{version}.tar.gz |
12 |
Patch0: linking.patch |
13 |
Patch1: 0001-Port-to-Ayatana-AppIndicator.patch |
14 |
BuildRequires: desktop-file-utils |
15 |
BuildRequires: gettext |
16 |
BuildRequires: intltool |
17 |
BuildRequires: pkgconfig(xi) |
18 |
BuildRequires: pkgconfig(dconf) |
19 |
BuildRequires: pkgconfig(gdk-3.0) |
20 |
BuildRequires: pkgconfig(hunspell) |
21 |
BuildRequires: pkgconfig(libcanberra) |
22 |
BuildRequires: pkgconfig(libudev) |
23 |
BuildRequires: pkgconfig(xkbfile) |
24 |
BuildRequires: pkgconfig(xtst) |
25 |
BuildRequires: pkgconfig(python3) |
26 |
BuildRequires: python3dist(python-distutils-extra) |
27 |
BuildRequires: python3dist(setuptools) |
28 |
|
29 |
Requires: at-spi2-atk |
30 |
Requires: at-spi2-core-qt |
31 |
Requires: fonts-ttf-dejavu |
32 |
Requires: fonts-ttf-mageia |
33 |
Requires: hicolor-icon-theme |
34 |
Requires: mousetweaks |
35 |
Requires: python3dist(pycairo) |
36 |
Requires: python3dist(dbus-python) |
37 |
Requires: python3dist(pygobject) |
38 |
Requires: iso-codes |
39 |
# qtatspi-plugin may be removed to work around Mga#11975 with some loss of funtionality |
40 |
Recommends: qtatspi-plugin |
41 |
# gnome-shell-extensions-onboard pulls in 160 more packages on non-gnome |
42 |
# systems so don't recommend it yet. Only add when boolean deps are supported by urpmi. |
43 |
# https://bugs.mageia.org/show_bug.cgi?id=17799 |
44 |
#Recommends: (gnome-shell-extensions-%%{name} if gnome-shell) |
45 |
|
46 |
%description |
47 |
An on-screen keyboard useful on tablet PCs or for mobility impaired users, or |
48 |
just really handy when the keyboard is out of reach. |
49 |
Onboard can store text snippets for one click typing and can also suggest |
50 |
(and learn) words to speed text entry. |
51 |
Many theme options are available and each of these may be customized. |
52 |
The keyboard may be configured to automatically show itself when text input |
53 |
is required. |
54 |
|
55 |
%package -n gnome-shell-extensions-%{name} |
56 |
Summary: Shell extension for gnome |
57 |
Conflicts: onboard < 1.2 |
58 |
|
59 |
%description -n gnome-shell-extensions-%{name} |
60 |
Shell extension for gnome. |
61 |
|
62 |
%prep |
63 |
%setup -q |
64 |
%autopatch -p1 |
65 |
|
66 |
%build |
67 |
%py3_build |
68 |
|
69 |
%install |
70 |
%py3_install |
71 |
|
72 |
# Use example default configuration file |
73 |
mkdir -p %{buildroot}%{_sysconfdir}/%{name} |
74 |
cp %{buildroot}%{_datadir}/%{name}/%{name}-defaults.conf.example %{buildroot}%{_sysconfdir}/%{name}/%{name}-defaults.conf |
75 |
# Swich to full keyboard |
76 |
sed -i 's/#layout=Full Keyboard/layout=Full Keyboard/' %{buildroot}%{_sysconfdir}/%{name}/%{name}-defaults.conf |
77 |
sed -i 's/layout=Compact/#layout=Compact/' %{buildroot}%{_sysconfdir}/%{name}/%{name}-defaults.conf |
78 |
# Use Mageia superkey label |
79 |
sed -i 's/superkey-label=.*$/superkey-label=/' %{buildroot}%{_sysconfdir}/%{name}/%{name}-defaults.conf |
80 |
# Switch font to DejaVu-Sans |
81 |
sed -i 's/^key-label-font=.*$/key-label-font=DejaVu Sans/' %{buildroot}%{_sysconfdir}/%{name}/%{name}-defaults.conf |
82 |
# Configuration change for patch0 (StatusIconProvider.patch) |
83 |
sed -i '/\[main\]/a status-icon-provider=GtkStatusIcon' %{buildroot}%{_sysconfdir}/%{name}/%{name}-defaults.conf |
84 |
# Enable icon-palette for gnome3 or on closing keyboard there is no visible activation method |
85 |
sed -i '/\[icon-palette\]/a in-use=True' %{buildroot}%{_sysconfdir}/%{name}/%{name}-defaults.conf |
86 |
# Remove Ubuntu icons |
87 |
rm -rf %{buildroot}%{_iconsdir}/ubuntu* |
88 |
# Desktop files |
89 |
mkdir -p %{buildroot}%{_datadir}/applications |
90 |
desktop-file-install \ |
91 |
--remove-category="X-GNOME-PersonalSettings" \ |
92 |
--add-category="Utility;" \ |
93 |
--dir=%{buildroot}%{_datadir}/applications \ |
94 |
%{_builddir}/%{name}-%{version}/build/share/applications/%{name}.desktop |
95 |
|
96 |
desktop-file-install \ |
97 |
--remove-category="X-GNOME-PersonalSettings" \ |
98 |
--remove-category="Settings" \ |
99 |
--add-category="Utility;" \ |
100 |
--dir=%{buildroot}%{_datadir}/applications \ |
101 |
%{_builddir}/%{name}-%{version}/build/share/applications/%{name}-settings.desktop |
102 |
|
103 |
# Desktop files autostart |
104 |
mkdir -p %{buildroot}%{_sysconfdir}/xdg/autostart |
105 |
desktop-file-install \ |
106 |
--add-category="Utility;" \ |
107 |
--dir=%{buildroot}%{_sysconfdir}/xdg/autostart \ |
108 |
%{_builddir}/%{name}-%{version}/build/share/autostart/%{name}-autostart.desktop |
109 |
|
110 |
mkdir -p %{buildroot}%{_datadir}/locale |
111 |
cp -a build/mo/* %{buildroot}%{_datadir}/locale |
112 |
|
113 |
%find_lang %{name} --with-gnome |
114 |
|
115 |
%files -f %{name}.lang |
116 |
%doc AUTHORS COPYING NEWS README |
117 |
%{_bindir}/%{name} |
118 |
%{_bindir}/%{name}-settings |
119 |
%{_datadir}/applications/%{name}.desktop |
120 |
%{_datadir}/applications/%{name}-settings.desktop |
121 |
%{_datadir}/glib-2.0/schemas/org.%{name}.gschema.xml |
122 |
%{_datadir}/dbus-1/services/org.%{name}.Onboard.service |
123 |
%{_iconsdir}/hicolor/scalable/apps/%{name}.svg |
124 |
%{_iconsdir}/HighContrast/scalable/apps/%{name}.svg |
125 |
%{_iconsdir}/hicolor/22x22/apps/%{name}.png |
126 |
%{_iconsdir}/hicolor/16x16/apps/%{name}.png |
127 |
%{_iconsdir}/hicolor/24x24/apps/%{name}.png |
128 |
%{_iconsdir}/hicolor/28x28/apps/%{name}.png |
129 |
%{_iconsdir}/hicolor/32x32/apps/%{name}.png |
130 |
%{_datadir}/%{name}/ |
131 |
%{_datadir}/sounds/freedesktop/stereo/%{name}-key-feedback.oga |
132 |
%{python3_sitearch}/%{name}*.egg-info |
133 |
%{python3_sitearch}/Onboard/ |
134 |
%{_sysconfdir}/xdg/autostart/%{name}-autostart.desktop |
135 |
%dir %{_sysconfdir}/%{name} |
136 |
%config(noreplace) %{_sysconfdir}/%{name}/%{name}-defaults.conf |
137 |
%{_mandir}/man1/onboard* |
138 |
|
139 |
|
140 |
%files -n gnome-shell-extensions-%{name} |
141 |
%{_datadir}/gnome-shell/extensions/Onboard_Indicator@onboard.org/ |