]>
Commit | Line | Data |
---|---|---|
4eb0a7a8 JB |
1 | # |
2 | # Conditional build: | |
3e3d22fe JB |
3 | %bcond_without apidocs # API documentation |
4 | %bcond_without static_libs # static libraries | |
e10ba1e6 | 5 | %bcond_without gtk2 # additional GTK+ 2.x version of library |
1fe2f796 | 6 | %bcond_without gtk4 # additional GTK 4 version of library |
3e3d22fe | 7 | %bcond_without vala # Vala API |
cc935143 | 8 | |
4e68ba7a | 9 | %define colord_ver 0.1.27 |
4eb0a7a8 JB |
10 | Summary: GTK helper library for colord |
11 | Summary(pl.UTF-8): Biblioteka pomocniczna GTK dla colord | |
12 | Name: colord-gtk | |
4c190b40 | 13 | Version: 0.3.1 |
3e3d22fe | 14 | Release: 1 |
e10ba1e6 JB |
15 | License: LGPL v2.1+ (library), GPL v2+ (cd-convert utility) |
16 | Group: X11/Libraries | |
3e3d22fe | 17 | Source0: https://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz |
4c190b40 | 18 | # Source0-md5: d436740c06e42af421384f16b2a9a0a7 |
3e3d22fe | 19 | URL: https://www.freedesktop.org/software/colord/ |
5f21a46d | 20 | BuildRequires: colord-devel >= %{colord_ver} |
ec7bacc3 | 21 | BuildRequires: gettext-tools >= 0.17 |
4eb0a7a8 JB |
22 | BuildRequires: glib2-devel >= 1:2.28.0 |
23 | BuildRequires: gobject-introspection-devel >= 0.9.8 | |
e10ba1e6 | 24 | %{?with_gtk2:BuildRequires: gtk+2-devel >= 2.0} |
4eb0a7a8 JB |
25 | BuildRequires: gtk+3-devel >= 3.0 |
26 | BuildRequires: gtk-doc >= 1.9 | |
1fe2f796 | 27 | %{?with_gtk4:BuildRequires: gtk4-devel >= 4.4} |
4eb0a7a8 | 28 | BuildRequires: lcms2-devel >= 2.2 |
3e3d22fe JB |
29 | BuildRequires: meson >= 0.46.0 |
30 | BuildRequires: ninja >= 1.5 | |
4eb0a7a8 | 31 | BuildRequires: pkgconfig |
41005d09 | 32 | BuildRequires: rpm-build >= 4.6 |
3e3d22fe JB |
33 | BuildRequires: rpmbuild(macros) >= 1.736 |
34 | BuildRequires: sed >= 4.0 | |
d7aa0bd3 JB |
35 | %if %{with vala} |
36 | BuildRequires: vala | |
5f21a46d | 37 | BuildRequires: vala-colord >= %{colord_ver} |
d7aa0bd3 | 38 | %endif |
5f21a46d | 39 | Requires: colord-libs >= %{colord_ver} |
e10ba1e6 | 40 | Requires: glib2 >= 1:2.28.0 |
4eb0a7a8 JB |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
42 | ||
43 | %description | |
44 | GTK helper library for colord. | |
45 | ||
46 | %description -l pl.UTF-8 | |
47 | Biblioteka pomocniczna GTK dla colord. | |
48 | ||
1fe2f796 JB |
49 | %package headers |
50 | Summary: Header files for colord-gtk libraries | |
51 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek colord-gtk | |
52 | Group: X11/Development/Libraries | |
53 | Requires: %{name} = %{version}-%{release} | |
54 | Requires: colord-devel >= %{colord_ver} | |
55 | Requires: glib2-devel >= 1:2.28.0 | |
56 | Conflicts: colord-gtk-devel < 0.3 | |
57 | ||
58 | %description headers | |
59 | Header files for colord-gtk libraries. | |
60 | ||
61 | %description headers -l pl.UTF-8 | |
62 | Pliki nagłówkowe bibliotek colord-gtk. | |
63 | ||
4eb0a7a8 | 64 | %package devel |
1fe2f796 JB |
65 | Summary: Development files for colord-gtk library |
66 | Summary(pl.UTF-8): Pliki programistyczne biblioteki colord-gtk | |
e10ba1e6 | 67 | Group: X11/Development/Libraries |
4eb0a7a8 | 68 | Requires: %{name} = %{version}-%{release} |
1fe2f796 | 69 | Requires: %{name}-headers = %{version}-%{release} |
5f21a46d | 70 | Requires: colord-devel >= %{colord_ver} |
e10ba1e6 | 71 | Requires: glib2-devel >= 1:2.28.0 |
4eb0a7a8 JB |
72 | Requires: gtk+3-devel >= 3.0 |
73 | ||
74 | %description devel | |
1fe2f796 | 75 | Development files for colord-gtk library. |
4eb0a7a8 JB |
76 | |
77 | %description devel -l pl.UTF-8 | |
1fe2f796 | 78 | Pliki programistyczne biblioteki colord-gtk. |
4eb0a7a8 JB |
79 | |
80 | %package static | |
81 | Summary: Static colord-gtk library | |
82 | Summary(pl.UTF-8): Statyczna biblioteka colord-gtk | |
e10ba1e6 | 83 | Group: X11/Development/Libraries |
4eb0a7a8 JB |
84 | Requires: %{name}-devel = %{version}-%{release} |
85 | ||
86 | %description static | |
87 | Static colord-gtk library. | |
88 | ||
89 | %description static -l pl.UTF-8 | |
90 | Statyczna biblioteka colord-gtk. | |
91 | ||
92 | %package apidocs | |
93 | Summary: colord-gtk API documentation | |
94 | Summary(pl.UTF-8): Dokumentacja API colord-gtk | |
95 | Group: Documentation | |
96 | Requires: gtk-doc-common | |
a64087dc | 97 | BuildArch: noarch |
4eb0a7a8 JB |
98 | |
99 | %description apidocs | |
100 | colord-gtk API documentation. | |
101 | ||
102 | %description apidocs -l pl.UTF-8 | |
103 | Dokumentacja API colord-gtk. | |
104 | ||
105 | %package -n vala-colord-gtk | |
106 | Summary: colord-gtk API for Vala language | |
107 | Summary(pl.UTF-8): API colord-gtk dla języka Vala | |
e10ba1e6 | 108 | Group: X11/Development/Libraries |
4eb0a7a8 | 109 | Requires: %{name}-devel = %{version}-%{release} |
5f21a46d | 110 | Requires: vala-colord >= %{colord_ver} |
cc935143 | 111 | BuildArch: noarch |
4eb0a7a8 JB |
112 | |
113 | %description -n vala-colord-gtk | |
114 | colord-gtk API for Vala language. | |
115 | ||
116 | %description -n vala-colord-gtk -l pl.UTF-8 | |
117 | API colord-gtk dla języka Vala. | |
118 | ||
e10ba1e6 JB |
119 | %package -n colord-gtk2 |
120 | Summary: GTK 2 helper library for colord | |
121 | Summary(pl.UTF-8): Biblioteka pomocniczna GTK 2 dla colord | |
122 | Group: X11/Libraries | |
123 | Requires: colord-libs >= %{colord_ver} | |
124 | Requires: glib2 >= 1:2.28.0 | |
125 | ||
126 | %description -n colord-gtk2 | |
127 | GTK 2 helper library for colord. | |
128 | ||
129 | %description -n colord-gtk2 -l pl.UTF-8 | |
130 | Biblioteka pomocniczna GTK 2 dla colord. | |
131 | ||
132 | %package -n colord-gtk2-devel | |
133 | Summary: Development files for colord-gtk2 library | |
134 | Summary(pl.UTF-8): Pliki programistyczne biblioteki colord-gtk2 | |
135 | Group: X11/Development/Libraries | |
1fe2f796 | 136 | Requires: %{name}-headers = %{version}-%{release} |
e10ba1e6 JB |
137 | Requires: colord-gtk2 = %{version}-%{release} |
138 | Requires: gtk+2-devel >= 2.0 | |
139 | ||
140 | %description -n colord-gtk2-devel | |
141 | Development files for colord-gtk2 library. | |
142 | ||
143 | %description -n colord-gtk2-devel -l pl.UTF-8 | |
144 | Pliki programistyczne biblioteki colord-gtk2. | |
145 | ||
146 | %package -n colord-gtk2-static | |
147 | Summary: Static colord-gtk2 library | |
148 | Summary(pl.UTF-8): Statyczna biblioteka colord-gtk2 | |
149 | Group: X11/Development/Libraries | |
150 | Requires: colord-gtk2-devel = %{version}-%{release} | |
151 | ||
152 | %description -n colord-gtk2-static | |
153 | Static colord-gtk2 library. | |
154 | ||
155 | %description -n colord-gtk2-static -l pl.UTF-8 | |
156 | Statyczna biblioteka colord-gtk2. | |
157 | ||
1fe2f796 JB |
158 | %package -n colord-gtk4 |
159 | Summary: GTK 4 helper library for colord | |
160 | Summary(pl.UTF-8): Biblioteka pomocniczna GTK 4 dla colord | |
161 | Group: X11/Libraries | |
162 | Requires: colord-libs >= %{colord_ver} | |
163 | Requires: glib2 >= 1:2.28.0 | |
164 | Requires: gtk4 >= 4.4 | |
165 | ||
166 | %description -n colord-gtk4 | |
167 | GTK 4 helper library for colord. | |
168 | ||
169 | %description -n colord-gtk4 -l pl.UTF-8 | |
170 | Biblioteka pomocniczna GTK 4 dla colord. | |
171 | ||
172 | %package -n colord-gtk4-devel | |
173 | Summary: Development files for colord-gtk4 library | |
174 | Summary(pl.UTF-8): Pliki programistyczne biblioteki colord-gtk4 | |
175 | Group: X11/Development/Libraries | |
176 | Requires: %{name}-headers = %{version}-%{release} | |
177 | Requires: colord-gtk4 = %{version}-%{release} | |
178 | Requires: gtk4-devel >= 4.4 | |
179 | ||
180 | %description -n colord-gtk4-devel | |
181 | Development files for colord-gtk4 library. | |
182 | ||
183 | %description -n colord-gtk4-devel -l pl.UTF-8 | |
184 | Pliki programistyczne biblioteki colord-gtk4. | |
185 | ||
186 | %package -n colord-gtk4-static | |
187 | Summary: Static colord-gtk4 library | |
188 | Summary(pl.UTF-8): Statyczna biblioteka colord-gtk4 | |
189 | Group: X11/Development/Libraries | |
190 | Requires: colord-gtk4-devel = %{version}-%{release} | |
191 | ||
192 | %description -n colord-gtk4-static | |
193 | Static colord-gtk4 library. | |
194 | ||
195 | %description -n colord-gtk4-static -l pl.UTF-8 | |
196 | Statyczna biblioteka colord-gtk4. | |
197 | ||
4eb0a7a8 JB |
198 | %prep |
199 | %setup -q | |
200 | ||
3e3d22fe JB |
201 | %if %{with static_libs} |
202 | %{__sed} -i -e 's/ = shared_library/ = library/' libcolord-gtk/meson.build | |
203 | %endif | |
204 | ||
4eb0a7a8 | 205 | %build |
3e3d22fe JB |
206 | %meson build \ |
207 | -Dgtk2=true \ | |
1fe2f796 | 208 | %{!?with_gtk4:-Dgtk4=false} \ |
3e3d22fe JB |
209 | -Dvapi=true |
210 | ||
211 | %ninja_build -C build | |
4eb0a7a8 JB |
212 | |
213 | %install | |
214 | rm -rf $RPM_BUILD_ROOT | |
215 | ||
3e3d22fe | 216 | %ninja_install -C build |
4eb0a7a8 | 217 | |
4c190b40 | 218 | %find_lang %{name} |
4eb0a7a8 JB |
219 | |
220 | %clean | |
221 | rm -rf $RPM_BUILD_ROOT | |
222 | ||
223 | %post -p /sbin/ldconfig | |
224 | %postun -p /sbin/ldconfig | |
225 | ||
e10ba1e6 JB |
226 | %post -n colord-gtk2 -p /sbin/ldconfig |
227 | %postun -n colord-gtk2 -p /sbin/ldconfig | |
228 | ||
a7c97677 JB |
229 | %post -n colord-gtk4 -p /sbin/ldconfig |
230 | %postun -n colord-gtk4 -p /sbin/ldconfig | |
231 | ||
4c190b40 | 232 | %files -f %{name}.lang |
4eb0a7a8 JB |
233 | %defattr(644,root,root,755) |
234 | %doc AUTHORS MAINTAINERS NEWS README TODO | |
e10ba1e6 | 235 | %attr(755,root,root) %{_bindir}/cd-convert |
4eb0a7a8 JB |
236 | %attr(755,root,root) %{_libdir}/libcolord-gtk.so.*.*.* |
237 | %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk.so.1 | |
238 | %{_libdir}/girepository-1.0/ColordGtk-1.0.typelib | |
e10ba1e6 | 239 | %{_mandir}/man1/cd-convert.1* |
4eb0a7a8 | 240 | |
1fe2f796 | 241 | %files headers |
4eb0a7a8 | 242 | %defattr(644,root,root,755) |
4eb0a7a8 JB |
243 | %{_includedir}/colord-1/colord-gtk.h |
244 | %{_includedir}/colord-1/colord-gtk | |
1fe2f796 JB |
245 | |
246 | %files devel | |
247 | %defattr(644,root,root,755) | |
248 | %attr(755,root,root) %{_libdir}/libcolord-gtk.so | |
4eb0a7a8 JB |
249 | %{_datadir}/gir-1.0/ColordGtk-1.0.gir |
250 | %{_pkgconfigdir}/colord-gtk.pc | |
251 | ||
252 | %if %{with static_libs} | |
253 | %files static | |
254 | %defattr(644,root,root,755) | |
255 | %{_libdir}/libcolord-gtk.a | |
256 | %endif | |
257 | ||
258 | %if %{with apidocs} | |
259 | %files apidocs | |
260 | %defattr(644,root,root,755) | |
261 | %{_gtkdocdir}/colord-gtk | |
262 | %endif | |
263 | ||
264 | %if %{with vala} | |
265 | %files -n vala-colord-gtk | |
266 | %defattr(644,root,root,755) | |
3e3d22fe | 267 | %{_datadir}/vala/vapi/colord-gtk.deps |
4eb0a7a8 JB |
268 | %{_datadir}/vala/vapi/colord-gtk.vapi |
269 | %endif | |
e10ba1e6 JB |
270 | |
271 | %if %{with gtk2} | |
272 | %files -n colord-gtk2 | |
273 | %defattr(644,root,root,755) | |
274 | %attr(755,root,root) %{_libdir}/libcolord-gtk2.so.*.*.* | |
275 | %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk2.so.1 | |
276 | ||
277 | %files -n colord-gtk2-devel | |
278 | %defattr(644,root,root,755) | |
279 | %attr(755,root,root) %{_libdir}/libcolord-gtk2.so | |
280 | %{_pkgconfigdir}/colord-gtk2.pc | |
281 | ||
282 | %if %{with static_libs} | |
283 | %files -n colord-gtk2-static | |
284 | %defattr(644,root,root,755) | |
285 | %{_libdir}/libcolord-gtk2.a | |
286 | %endif | |
287 | %endif | |
1fe2f796 JB |
288 | |
289 | %if %{with gtk4} | |
290 | %files -n colord-gtk4 | |
291 | %defattr(644,root,root,755) | |
292 | %attr(755,root,root) %{_libdir}/libcolord-gtk4.so.*.*.* | |
293 | %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk4.so.1 | |
294 | ||
295 | %files -n colord-gtk4-devel | |
296 | %defattr(644,root,root,755) | |
297 | %attr(755,root,root) %{_libdir}/libcolord-gtk4.so | |
298 | %{_pkgconfigdir}/colord-gtk4.pc | |
299 | ||
300 | %if %{with static_libs} | |
301 | %files -n colord-gtk4-static | |
302 | %defattr(644,root,root,755) | |
303 | %{_libdir}/libcolord-gtk4.a | |
304 | %endif | |
305 | %endif |