]> git.pld-linux.org Git - packages/colord-gtk.git/blob - colord-gtk.spec
7f8e54a86a450755b3794a3ea14670326106a53b
[packages/colord-gtk.git] / colord-gtk.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation
4 %bcond_without  static_libs     # static libraries
5 %bcond_without  gtk2            # additional GTK+ 2.x version of library
6 %bcond_without  gtk4            # additional GTK 4 version of library
7 %bcond_without  vala            # Vala API
8
9 %define colord_ver      0.1.27
10 Summary:        GTK helper library for colord
11 Summary(pl.UTF-8):      Biblioteka pomocniczna GTK dla colord
12 Name:           colord-gtk
13 Version:        0.3.0
14 Release:        1
15 License:        LGPL v2.1+ (library), GPL v2+ (cd-convert utility)
16 Group:          X11/Libraries
17 Source0:        https://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz
18 # Source0-md5:  08c245d6482b3923a2b6a09f7fbbe612
19 URL:            https://www.freedesktop.org/software/colord/
20 BuildRequires:  colord-devel >= %{colord_ver}
21 BuildRequires:  gettext-tools >= 0.17
22 BuildRequires:  glib2-devel >= 1:2.28.0
23 BuildRequires:  gobject-introspection-devel >= 0.9.8
24 %{?with_gtk2:BuildRequires:     gtk+2-devel >= 2.0}
25 BuildRequires:  gtk+3-devel >= 3.0
26 BuildRequires:  gtk-doc >= 1.9
27 %{?with_gtk4:BuildRequires:     gtk4-devel >= 4.4}
28 BuildRequires:  lcms2-devel >= 2.2
29 BuildRequires:  meson >= 0.46.0
30 BuildRequires:  ninja >= 1.5
31 BuildRequires:  pkgconfig
32 BuildRequires:  rpm-build >= 4.6
33 BuildRequires:  rpmbuild(macros) >= 1.736
34 BuildRequires:  sed >= 4.0
35 %if %{with vala}
36 BuildRequires:  vala
37 BuildRequires:  vala-colord >= %{colord_ver}
38 %endif
39 Requires:       colord-libs >= %{colord_ver}
40 Requires:       glib2 >= 1:2.28.0
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
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
64 %package devel
65 Summary:        Development files for colord-gtk library
66 Summary(pl.UTF-8):      Pliki programistyczne biblioteki colord-gtk
67 Group:          X11/Development/Libraries
68 Requires:       %{name} = %{version}-%{release}
69 Requires:       %{name}-headers = %{version}-%{release}
70 Requires:       colord-devel >= %{colord_ver}
71 Requires:       glib2-devel >= 1:2.28.0
72 Requires:       gtk+3-devel >= 3.0
73
74 %description devel
75 Development files for colord-gtk library.
76
77 %description devel -l pl.UTF-8
78 Pliki programistyczne biblioteki colord-gtk.
79
80 %package static
81 Summary:        Static colord-gtk library
82 Summary(pl.UTF-8):      Statyczna biblioteka colord-gtk
83 Group:          X11/Development/Libraries
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
97 BuildArch:      noarch
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
108 Group:          X11/Development/Libraries
109 Requires:       %{name}-devel = %{version}-%{release}
110 Requires:       vala-colord >= %{colord_ver}
111 BuildArch:      noarch
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
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
136 Requires:       %{name}-headers = %{version}-%{release}
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
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
198 %prep
199 %setup -q
200
201 %if %{with static_libs}
202 %{__sed} -i -e 's/ = shared_library/ = library/' libcolord-gtk/meson.build
203 %endif
204
205 %build
206 %meson build \
207         -Dgtk2=true \
208         %{!?with_gtk4:-Dgtk4=false} \
209         -Dvapi=true
210
211 %ninja_build -C build
212
213 %install
214 rm -rf $RPM_BUILD_ROOT
215
216 %ninja_install -C build
217
218 # only empty translation exists atm. (as of 0.1.26)
219 #find_lang %{name}
220
221 %clean
222 rm -rf $RPM_BUILD_ROOT
223
224 %post   -p /sbin/ldconfig
225 %postun -p /sbin/ldconfig
226
227 %post   -n colord-gtk2 -p /sbin/ldconfig
228 %postun -n colord-gtk2 -p /sbin/ldconfig
229
230 %post   -n colord-gtk4 -p /sbin/ldconfig
231 %postun -n colord-gtk4 -p /sbin/ldconfig
232
233 %files
234 %defattr(644,root,root,755)
235 # -f %{name}.lang
236 %defattr(644,root,root,755)
237 %doc AUTHORS MAINTAINERS NEWS README TODO
238 %attr(755,root,root) %{_bindir}/cd-convert
239 %attr(755,root,root) %{_libdir}/libcolord-gtk.so.*.*.*
240 %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk.so.1
241 %{_libdir}/girepository-1.0/ColordGtk-1.0.typelib
242 %{_mandir}/man1/cd-convert.1*
243
244 %files headers
245 %defattr(644,root,root,755)
246 %{_includedir}/colord-1/colord-gtk.h
247 %{_includedir}/colord-1/colord-gtk
248
249 %files devel
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_libdir}/libcolord-gtk.so
252 %{_datadir}/gir-1.0/ColordGtk-1.0.gir
253 %{_pkgconfigdir}/colord-gtk.pc
254
255 %if %{with static_libs}
256 %files static
257 %defattr(644,root,root,755)
258 %{_libdir}/libcolord-gtk.a
259 %endif
260
261 %if %{with apidocs}
262 %files apidocs
263 %defattr(644,root,root,755)
264 %{_gtkdocdir}/colord-gtk
265 %endif
266
267 %if %{with vala}
268 %files -n vala-colord-gtk
269 %defattr(644,root,root,755)
270 %{_datadir}/vala/vapi/colord-gtk.deps
271 %{_datadir}/vala/vapi/colord-gtk.vapi
272 %endif
273
274 %if %{with gtk2}
275 %files -n colord-gtk2
276 %defattr(644,root,root,755)
277 %attr(755,root,root) %{_libdir}/libcolord-gtk2.so.*.*.*
278 %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk2.so.1
279
280 %files -n colord-gtk2-devel
281 %defattr(644,root,root,755)
282 %attr(755,root,root) %{_libdir}/libcolord-gtk2.so
283 %{_pkgconfigdir}/colord-gtk2.pc
284
285 %if %{with static_libs}
286 %files -n colord-gtk2-static
287 %defattr(644,root,root,755)
288 %{_libdir}/libcolord-gtk2.a
289 %endif
290 %endif
291
292 %if %{with gtk4}
293 %files -n colord-gtk4
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_libdir}/libcolord-gtk4.so.*.*.*
296 %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk4.so.1
297
298 %files -n colord-gtk4-devel
299 %defattr(644,root,root,755)
300 %attr(755,root,root) %{_libdir}/libcolord-gtk4.so
301 %{_pkgconfigdir}/colord-gtk4.pc
302
303 %if %{with static_libs}
304 %files -n colord-gtk4-static
305 %defattr(644,root,root,755)
306 %{_libdir}/libcolord-gtk4.a
307 %endif
308 %endif
This page took 0.068787 seconds and 2 git commands to generate.