]>
Commit | Line | Data |
---|---|---|
9ca3e8c0 JR |
1 | # |
2 | # Conditional build: | |
71c0223f JB |
3 | %bcond_without lua # Lua bindings |
4 | %bcond_without python # Python bindings | |
5 | %bcond_without static_libs # static library | |
9ca3e8c0 JR |
6 | # |
7 | Summary: keybinder library | |
8 | Summary(pl.UTF-8): Biblioteka keybinder | |
9 | Name: keybinder | |
71c0223f JB |
10 | Version: 0.3.1 |
11 | Release: 1 | |
9ca3e8c0 JR |
12 | License: GPL v2 |
13 | Group: Libraries | |
71c0223f JB |
14 | #Source0Download: https://github.com/kupferlauncher/keybinder/releases |
15 | Source0: https://github.com/kupferlauncher/keybinder/releases/download/v%{version}/%{name}-%{version}.tar.gz | |
16 | # Source0-md5: a6d7caae0dcb040b08692b008a68a507 | |
17 | # dead | |
18 | #URL: http://kaizer.se/wiki/keybinder/ | |
19 | URL: https://github.com/kupferlauncher/keybinder | |
53f32704 JB |
20 | BuildRequires: gobject-introspection-devel >= 0.6.7 |
21 | BuildRequires: gtk-doc >= 1.14 | |
22 | BuildRequires: gtk+2-devel >= 2:2.20 | |
23 | BuildRequires: pkgconfig >= 1:0.9.0 | |
9ca3e8c0 | 24 | BuildRequires: xorg-lib-libX11-devel |
53f32704 JB |
25 | BuildRequires: xorg-lib-libXext-devel |
26 | BuildRequires: xorg-lib-libXrender-devel | |
9ca3e8c0 | 27 | %if %{with lua} |
53f32704 | 28 | BuildRequires: lua51 >= 5.1 |
9ca3e8c0 JR |
29 | BuildRequires: lua51-devel >= 5.1 |
30 | %endif | |
31 | %if %{with python} | |
53f32704 | 32 | BuildRequires: python-devel >= 1:2.5 |
9ca3e8c0 | 33 | BuildRequires: python-distribute |
53f32704 JB |
34 | BuildRequires: python-pygobject-devel >= 2.15.3 |
35 | BuildRequires: python-pygtk-devel >= 2:2.12 | |
9ca3e8c0 | 36 | BuildRequires: rpm-pythonprov |
b9597e6c | 37 | BuildRequires: rpmbuild(macros) >= 1.219 |
9ca3e8c0 | 38 | %endif |
71c0223f | 39 | Requires: gtk+2 >= 2:2.20 |
9ca3e8c0 JR |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
42 | %description | |
43 | keybinder is a library for registering global keyboard shortcuts. | |
44 | Keybinder works with GTK-based applications using the X Window System. | |
45 | ||
46 | %description -l pl.UTF-8 | |
47 | keybinder jest biblioteką umożliwiającą rejestrowanie globalnych | |
48 | skrótów klawiszowych. Działa z aplikacjami opartymi na GTK. | |
49 | ||
50 | %package devel | |
51 | Summary: Header files for keybinder library | |
52 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki keybinder | |
53 | Group: Development/Libraries | |
54 | Requires: %{name} = %{version}-%{release} | |
53f32704 | 55 | Requires: gtk+2-devel >= 2:2.20 |
9ca3e8c0 JR |
56 | |
57 | %description devel | |
58 | Header files for keybinder library. | |
59 | ||
60 | %description devel -l pl.UTF-8 | |
61 | Pliki nagłówkowe biblioteki keybinder. | |
62 | ||
53f32704 JB |
63 | %package static |
64 | Summary: Static keybinder library | |
65 | Summary(pl.UTF-8): Statyczna biblioteka keybinder | |
66 | Group: Development/Libraries | |
67 | Requires: %{name}-devel = %{version}-%{release} | |
68 | ||
69 | %description static | |
70 | Static keybinder library. | |
71 | ||
72 | %description static -l pl.UTF-8 | |
73 | Statyczna biblioteka keybinder. | |
74 | ||
b9597e6c LG |
75 | %package doc |
76 | Summary: HTML documentation for keybinder library | |
77 | Summary(pl.UTF-8): Dokumentacja w HTML biblioteki keybinder | |
53f32704 | 78 | Group: Documentation |
b9597e6c LG |
79 | Requires: %{name} = %{version}-%{release} |
80 | ||
81 | %description doc | |
82 | HTML documentation for keybinder library. | |
83 | ||
84 | %description devel -l pl.UTF-8 | |
85 | Dokumentacja w HTML biblioteki keybinder. | |
86 | ||
9ca3e8c0 JR |
87 | %package -n python-keybinder |
88 | Summary: Python bindings for keybinder library | |
53f32704 | 89 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki keybinder |
9ca3e8c0 JR |
90 | Group: Development/Languages/Python |
91 | Requires: %{name} = %{version}-%{release} | |
b9597e6c LG |
92 | Requires: python-libs |
93 | Requires: python-modules | |
53f32704 | 94 | Requires: python-pygobject >= 2.15.3 |
b81db1d7 | 95 | Requires: python-pygtk-gtk >= 2:2.12 |
9ca3e8c0 JR |
96 | |
97 | %description -n python-keybinder | |
98 | Python bindings for keybinder library. | |
99 | ||
100 | %description -n python-keybinder -l pl.UTF-8 | |
53f32704 | 101 | Wiązania Pythona do biblioteki keybinder. |
9ca3e8c0 JR |
102 | |
103 | %package -n lua-keybinder | |
104 | Summary: Lua bindings for keybinder library | |
53f32704 | 105 | Summary(pl.UTF-8): Wiązania języka Lua do biblioteki keybinder |
9ca3e8c0 JR |
106 | Group: Development/Languages |
107 | Requires: %{name} = %{version}-%{release} | |
108 | ||
109 | %description -n lua-keybinder | |
110 | Lua bindings for keybinder library. | |
111 | ||
112 | %description -n lua-keybinder -l pl.UTF-8 | |
53f32704 | 113 | Wiązania języka Lua do biblioteki keybinder. |
9ca3e8c0 JR |
114 | |
115 | %prep | |
116 | %setup -q | |
117 | ||
118 | %build | |
119 | %configure \ | |
53f32704 JB |
120 | --disable-silent-rules \ |
121 | %{?with_static_libs:--enable-static} \ | |
122 | --with-html-dir=%{_gtkdocdir} \ | |
9ca3e8c0 | 123 | %if %{with lua} |
b9597e6c | 124 | --with-lua-includes=%{_includedir}/lua51 \ |
9ca3e8c0 JR |
125 | --with-lua-suffix=51 |
126 | %endif | |
127 | ||
128 | ||
129 | %{__make} | |
130 | ||
131 | %install | |
132 | rm -rf $RPM_BUILD_ROOT | |
53f32704 | 133 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
9ca3e8c0 JR |
134 | |
135 | %{__make} install \ | |
136 | DESTDIR=$RPM_BUILD_ROOT | |
137 | ||
138 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
139 | ||
71c0223f JB |
140 | # obsoleted by pkg-config |
141 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libkeybinder.la | |
142 | ||
53f32704 | 143 | %if %{with python} |
9ca3e8c0 | 144 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
71c0223f | 145 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
9ca3e8c0 | 146 | %py_postclean |
53f32704 JB |
147 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/keybinder/*.la |
148 | %{?with_static_libs:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/keybinder/*.a} | |
149 | %endif | |
150 | ||
151 | %if %{with lua} | |
152 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/*/*.la | |
153 | %{?with_static_libs:%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/*/*.a} | |
154 | %endif | |
9ca3e8c0 JR |
155 | |
156 | %clean | |
157 | rm -rf $RPM_BUILD_ROOT | |
158 | ||
159 | %post -p /sbin/ldconfig | |
160 | %postun -p /sbin/ldconfig | |
161 | ||
162 | %files | |
163 | %defattr(644,root,root,755) | |
53f32704 | 164 | %doc AUTHORS NEWS README |
9ca3e8c0 | 165 | %attr(755,root,root) %{_libdir}/libkeybinder.so.*.*.* |
71c0223f | 166 | %attr(755,root,root) %ghost %{_libdir}/libkeybinder.so.0 |
53f32704 | 167 | %{_libdir}/girepository-1.0/Keybinder-0.0.typelib |
9ca3e8c0 JR |
168 | |
169 | %files devel | |
170 | %defattr(644,root,root,755) | |
171 | %attr(755,root,root) %{_libdir}/libkeybinder.so | |
53f32704 | 172 | %{_datadir}/gir-1.0/Keybinder-0.0.gir |
9ca3e8c0 JR |
173 | %{_includedir}/keybinder.h |
174 | %{_pkgconfigdir}/keybinder.pc | |
175 | %{_examplesdir}/%{name}-%{version} | |
176 | ||
53f32704 JB |
177 | %if %{with static_libs} |
178 | %files static | |
179 | %defattr(644,root,root,755) | |
180 | %{_libdir}/libkeybinder.a | |
181 | %endif | |
182 | ||
b9597e6c LG |
183 | %files doc |
184 | %defattr(644,root,root,755) | |
53f32704 | 185 | %{_gtkdocdir}/keybinder |
b9597e6c | 186 | |
9ca3e8c0 JR |
187 | %if %{with python} |
188 | %files -n python-keybinder | |
189 | %defattr(644,root,root,755) | |
190 | %dir %{py_sitedir}/keybinder | |
191 | %{py_sitedir}/keybinder/*.py[co] | |
192 | %attr(755,root,root) %{py_sitedir}/keybinder/_keybinder.so | |
193 | %endif | |
194 | ||
195 | %if %{with lua} | |
196 | %files -n lua-keybinder | |
197 | %defattr(644,root,root,755) | |
198 | %attr(755,root,root) %{_libdir}/lua/5.1/keybinder.so | |
199 | %endif |