]>
Commit | Line | Data |
---|---|---|
eadc58de JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # gtk-doc documentation | |
4 | %bcond_without static_libs # shared library | |
c5aabc94 | 5 | %bcond_without vala # Vala API |
301e30e6 | 6 | %bcond_without gtk4 # Gtk4 variant |
6f8b925c | 7 | %bcond_without gcr4 # use gcr4 |
eadc58de JB |
8 | # |
9 | Summary: NetworkManager UI utilities (libnm version) | |
10 | Summary(pl.UTF-8): Narzędzia UI NetworkManagera (wersja libnm) | |
11 | Name: libnma | |
6f8b925c | 12 | Version: 1.10.4 |
479f3855 | 13 | Release: 1 |
eadc58de JB |
14 | License: LGPL v2.1+ |
15 | Group: X11/Libraries | |
1751a00a | 16 | Source0: https://download.gnome.org/sources/libnma/1.10/%{name}-%{version}.tar.xz |
6f8b925c | 17 | # Source0-md5: d4503a9a708b2cbd949a3335a9f10d47 |
eadc58de JB |
18 | URL: https://gitlab.gnome.org/GNOME/libnma |
19 | BuildRequires: NetworkManager-devel >= 2:1.7 | |
20 | BuildRequires: autoconf >= 2.63 | |
21 | BuildRequires: automake >= 1:1.11 | |
6f8b925c JP |
22 | %if %{with gcr4} |
23 | BuildRequires: gcr4-devel >= 3.92 | |
24 | %else | |
eadc58de | 25 | BuildRequires: gcr-ui-devel >= 3.14 |
6f8b925c | 26 | %endif |
c5aabc94 | 27 | BuildRequires: gettext-tools >= 0.18 |
05651e9c | 28 | BuildRequires: glib2-devel >= 1:2.38 |
eadc58de | 29 | BuildRequires: gobject-introspection-devel >= 0.9.6 |
1751a00a | 30 | BuildRequires: gtk+3-devel >= 3.12 |
c5aabc94 | 31 | BuildRequires: gtk-doc >= 1.0 |
301e30e6 | 32 | %{?with_gtk4:BuildRequires: gtk4-devel >= 4.6.2} |
eadc58de JB |
33 | BuildRequires: libtool >= 2:2.2.6 |
34 | BuildRequires: pkgconfig | |
cbf3cb76 | 35 | BuildRequires: rpm-build >= 4.6 |
cb274f3d | 36 | BuildRequires: rpmbuild(macros) >= 1.527 |
eadc58de | 37 | BuildRequires: tar >= 1:1.22 |
c5aabc94 JP |
38 | %if %{with vala} |
39 | BuildRequires: vala >= 2:0.17.1.24 | |
40 | BuildRequires: vala-NetworkManager | |
41 | %endif | |
eadc58de | 42 | BuildRequires: xz |
6f8b925c | 43 | %{!?with_gcr4:BuildConflicts: gcr4-devel >= 3.92} |
301e30e6 | 44 | Requires: %{name}-data = %{version}-%{release} |
eadc58de | 45 | Requires: NetworkManager-libs >= 2:1.7 |
6f8b925c JP |
46 | %if %{with gcr4} |
47 | Requires: gcr-libs >= 3.92 | |
48 | %else | |
eadc58de | 49 | Requires: gcr-ui >= 3.14 |
6f8b925c | 50 | %endif |
05651e9c | 51 | Requires: glib2 >= 1:2.38 |
1751a00a | 52 | Requires: gtk+3 >= 3.12 |
eadc58de JB |
53 | Requires: iso-codes |
54 | Requires: mobile-broadband-provider-info | |
f8ab59e7 | 55 | Provides: NetworkManager-gtk-lib = %{version}-%{release} |
a8f805b2 | 56 | Obsoletes: NetworkManager-gtk-lib < 1.8.26 |
eadc58de JB |
57 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
58 | ||
59 | %description | |
60 | NetworkManager UI utilities (libnm version). | |
61 | ||
62 | %description -l pl.UTF-8 | |
63 | Narzędzia UI NetworkManagera (wersja libnm). | |
64 | ||
65 | %package devel | |
66 | Summary: Header files for libnma library | |
67 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libnma | |
68 | Group: X11/Development/Libraries | |
69 | Requires: %{name} = %{version}-%{release} | |
301e30e6 | 70 | Requires: %{name}-headers = %{version}-%{release} |
eadc58de | 71 | Requires: NetworkManager-devel >= 2:1.7 |
05651e9c | 72 | Requires: glib2-devel >= 1:2.38 |
1751a00a | 73 | Requires: gtk+3-devel >= 3.12 |
f8ab59e7 | 74 | Provides: NetworkManager-gtk-lib-devel = %{version}-%{release} |
a8f805b2 | 75 | Obsoletes: NetworkManager-gtk-lib-devel < 1.8.26 |
eadc58de JB |
76 | |
77 | %description devel | |
78 | Header files for libnma library. | |
79 | ||
80 | %description devel -l pl.UTF-8 | |
81 | Pliki nagłówkowe biblioteki libnma. | |
82 | ||
83 | %package static | |
84 | Summary: Static libnma library | |
85 | Summary(pl.UTF-8): Statyczna biblioteka libnma | |
86 | Group: X11/Development/Libraries | |
87 | Requires: %{name}-devel = %{version}-%{release} | |
88 | ||
89 | %description static | |
90 | Static libnma library. | |
91 | ||
92 | %description static -l pl.UTF-8 | |
93 | Statyczna biblioteka libnma. | |
94 | ||
301e30e6 JB |
95 | %package -n vala-libnma |
96 | Summary: Vala API for libnma library | |
97 | Summary(pl.UTF-8): API języka Vala do biblioteki libnma | |
98 | Group: X11/Development/Libraries | |
99 | Requires: %{name}-devel = %{version}-%{release} | |
100 | Requires: vala >= 2:0.17.1.24 | |
101 | BuildArch: noarch | |
102 | ||
103 | %description -n vala-libnma | |
104 | Vala API for libnma library. | |
105 | ||
106 | %description -n vala-libnma -l pl.UTF-8 | |
107 | API języka Vala do biblioteki libnma. | |
108 | ||
109 | %package data | |
110 | Summary: Common data for libnma libraries | |
111 | Summary(pl.UTF-8): Wspólne dane bibliotek libnma | |
112 | Group: X11/Libraries | |
149cd5dd | 113 | Requires(post,postun): glib2 >= 1:2.38 |
301e30e6 JB |
114 | Conflicts: libnma < 1.8.36-2 |
115 | ||
116 | %description data | |
117 | Common data for libnma libraries. | |
118 | ||
119 | %description data -l pl.UTF-8 | |
120 | Wspólne dane bibliotek libnma. | |
121 | ||
122 | %package headers | |
123 | Summary: Header files for libnma libraries | |
124 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek libnma | |
125 | Group: X11/Development/Libraries | |
126 | Conflicts: libnma-devel < 1.8.36-2 | |
127 | ||
128 | %description headers | |
129 | Header files for libnma libraries. | |
130 | ||
131 | %description headers -l pl.UTF-8 | |
132 | Pliki nagłówkowe bibliotek libnma. | |
133 | ||
eadc58de JB |
134 | %package apidocs |
135 | Summary: API documentation for libnma library | |
136 | Summary(pl.UTF-8): Dokumentacja API biblioteki libnma | |
137 | Group: Documentation | |
a8f805b2 | 138 | Obsoletes: NetworkManager-gtk-lib-apidocs < 1.8.26 |
eadc58de | 139 | BuildArch: noarch |
eadc58de JB |
140 | |
141 | %description apidocs | |
142 | API documentation for libnma library. | |
143 | ||
144 | %description apidocs -l pl.UTF-8 | |
145 | Dokumentacja API biblioteki libnma. | |
146 | ||
301e30e6 JB |
147 | %package gtk4 |
148 | Summary: NetworkManager UI utilities (libnm version) for GTK 4 | |
149 | Summary(pl.UTF-8): Narzędzia UI NetworkManagera (wersja libnm) dla GTK 4 | |
150 | Group: X11/Libraries | |
151 | Requires: %{name}-data = %{version}-%{release} | |
152 | Requires: NetworkManager-libs >= 2:1.7 | |
6f8b925c JP |
153 | %if %{with gcr4} |
154 | Requires: gcr4-libs >= 3.92 | |
155 | %else | |
301e30e6 | 156 | Requires: gcr-ui >= 3.14 |
6f8b925c | 157 | %endif |
301e30e6 JB |
158 | Requires: glib2 >= 1:2.38 |
159 | Requires: gtk4 >= 4.6.2 | |
160 | ||
161 | %description gtk4 | |
162 | NetworkManager UI utilities (libnm version) for GTK 4. | |
163 | ||
164 | %description gtk4 -l pl.UTF-8 | |
165 | Narzędzia UI NetworkManagera (wersja libnm) dla GTK 4. | |
166 | ||
167 | %package gtk4-devel | |
168 | Summary: Header files for libnma library for GTK 4 | |
169 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libnma dla GTK 4 | |
170 | Group: X11/Development/Libraries | |
171 | Requires: %{name}-gtk4 = %{version}-%{release} | |
172 | Requires: %{name}-headers = %{version}-%{release} | |
173 | Requires: NetworkManager-devel >= 2:1.7 | |
174 | Requires: glib2-devel >= 1:2.38 | |
175 | Requires: gtk4-devel >= 4.6.2 | |
176 | ||
177 | %description gtk4-devel | |
178 | Header files for libnma library for GTK 4. | |
179 | ||
180 | %description gtk4-devel -l pl.UTF-8 | |
181 | Pliki nagłówkowe biblioteki libnma dla GTK 4. | |
182 | ||
183 | %package gtk4-static | |
184 | Summary: Static libnma library for GTK 4 | |
185 | Summary(pl.UTF-8): Statyczna biblioteka libnma dla GTK 4 | |
186 | Group: X11/Development/Libraries | |
187 | Requires: %{name}-gtk4-devel = %{version}-%{release} | |
188 | ||
189 | %description gtk4-static | |
190 | Static libnma library for GTK 4. | |
191 | ||
192 | %description gtk4-static -l pl.UTF-8 | |
193 | Statyczna biblioteka libnma dla GTK 4. | |
194 | ||
195 | %package -n vala-libnma-gtk4 | |
196 | Summary: Vala API for libnma library for GTK 4 | |
197 | Summary(pl.UTF-8): API języka Vala do biblioteki libnma dla GTK 4 | |
198 | Group: X11/Development/Libraries | |
199 | Requires: %{name}-gtk4-devel = %{version}-%{release} | |
c5aabc94 | 200 | Requires: vala >= 2:0.17.1.24 |
c5aabc94 | 201 | BuildArch: noarch |
c5aabc94 | 202 | |
301e30e6 JB |
203 | %description -n vala-libnma-gtk4 |
204 | Vala API for libnma library for GTK 4. | |
c5aabc94 | 205 | |
301e30e6 JB |
206 | %description -n vala-libnma-gtk4 -l pl.UTF-8 |
207 | API języka Vala do biblioteki libnma dla GTK 4. | |
c5aabc94 | 208 | |
eadc58de JB |
209 | %prep |
210 | %setup -q | |
211 | ||
212 | %build | |
213 | %{__libtoolize} | |
214 | %{__aclocal} -I m4 | |
215 | %{__autoconf} | |
216 | %{__autoheader} | |
217 | %{__automake} | |
218 | %configure \ | |
219 | --disable-iso-codes \ | |
220 | --disable-mobile-broadband-provider-info \ | |
221 | --disable-silent-rules \ | |
222 | %{!?with_static_libs:--disable-static} \ | |
c5aabc94 | 223 | %{__enable_disable vala} \ |
301e30e6 JB |
224 | --with-html-dir=%{_gtkdocdir} \ |
225 | %{?with_gtk4:--with-libnma-gtk4} | |
eadc58de JB |
226 | |
227 | %{__make} | |
228 | ||
229 | %install | |
230 | rm -rf $RPM_BUILD_ROOT | |
231 | ||
232 | %{__make} install \ | |
233 | DESTDIR=$RPM_BUILD_ROOT | |
234 | ||
235 | # obsoleted by pkg-config | |
301e30e6 | 236 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnma*.la |
eadc58de | 237 | |
fb0261ae JP |
238 | # will be dropped eventually by upstream |
239 | # https://gitlab.gnome.org/GNOME/libnma/-/merge_requests/42 | |
240 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas/org.gnome.nm-applet.gschema.xml | |
241 | ||
c5aabc94 | 242 | %find_lang %{name} |
eadc58de JB |
243 | |
244 | %clean | |
245 | rm -rf $RPM_BUILD_ROOT | |
246 | ||
247 | %post -p /sbin/ldconfig | |
248 | %postun -p /sbin/ldconfig | |
249 | ||
149cd5dd JB |
250 | %post data |
251 | %glib_compile_schemas | |
252 | ||
253 | %postun data | |
254 | %glib_compile_schemas | |
255 | ||
b0665e5d JP |
256 | %post gtk4 -p /sbin/ldconfig |
257 | %postun gtk4 -p /sbin/ldconfig | |
258 | ||
301e30e6 | 259 | %files |
eadc58de | 260 | %defattr(644,root,root,755) |
eadc58de JB |
261 | %attr(755,root,root) %{_libdir}/libnma.so.*.*.* |
262 | %attr(755,root,root) %ghost %{_libdir}/libnma.so.0 | |
263 | %{_libdir}/girepository-1.0/NMA-1.0.typelib | |
264 | ||
265 | %files devel | |
266 | %defattr(644,root,root,755) | |
267 | %attr(755,root,root) %{_libdir}/libnma.so | |
eadc58de JB |
268 | %{_datadir}/gir-1.0/NMA-1.0.gir |
269 | %{_pkgconfigdir}/libnma.pc | |
270 | ||
271 | %if %{with static_libs} | |
272 | %files static | |
273 | %defattr(644,root,root,755) | |
274 | %{_libdir}/libnma.a | |
275 | %endif | |
276 | ||
301e30e6 JB |
277 | %files data -f %{name}.lang |
278 | %defattr(644,root,root,755) | |
279 | %doc NEWS | |
6f8b925c | 280 | %{_datadir}/glib-2.0/schemas/org.gnome.nm-applet.eap.gschema.xml |
301e30e6 JB |
281 | |
282 | %files headers | |
283 | %defattr(644,root,root,755) | |
284 | %{_includedir}/libnma | |
285 | ||
eadc58de JB |
286 | %if %{with apidocs} |
287 | %files apidocs | |
288 | %defattr(644,root,root,755) | |
289 | %{_gtkdocdir}/libnma | |
290 | %endif | |
c5aabc94 JP |
291 | |
292 | %if %{with vala} | |
293 | %files -n vala-libnma | |
294 | %defattr(644,root,root,755) | |
295 | %{_datadir}/vala/vapi/libnma.deps | |
296 | %{_datadir}/vala/vapi/libnma.vapi | |
297 | %endif | |
301e30e6 JB |
298 | |
299 | %if %{with gtk4} | |
300 | %files gtk4 | |
301 | %defattr(644,root,root,755) | |
302 | %attr(755,root,root) %{_libdir}/libnma-gtk4.so.*.*.* | |
303 | %attr(755,root,root) %ghost %{_libdir}/libnma-gtk4.so.0 | |
304 | %{_libdir}/girepository-1.0/NMA4-1.0.typelib | |
305 | ||
306 | %files gtk4-devel | |
307 | %defattr(644,root,root,755) | |
308 | %attr(755,root,root) %{_libdir}/libnma-gtk4.so | |
309 | %{_datadir}/gir-1.0/NMA4-1.0.gir | |
310 | %{_pkgconfigdir}/libnma-gtk4.pc | |
311 | ||
312 | %if %{with static_libs} | |
313 | %files gtk4-static | |
314 | %defattr(644,root,root,755) | |
315 | %{_libdir}/libnma-gtk4.a | |
316 | %endif | |
317 | ||
318 | %if %{with vala} | |
319 | %files -n vala-libnma-gtk4 | |
320 | %defattr(644,root,root,755) | |
321 | %{_datadir}/vala/vapi/libnma-gtk4.deps | |
322 | %{_datadir}/vala/vapi/libnma-gtk4.vapi | |
323 | %endif | |
324 | %endif |