]>
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 |
3e3d22fe | 6 | %bcond_without vala # Vala API |
cc935143 | 7 | |
4e68ba7a | 8 | %define colord_ver 0.1.27 |
4eb0a7a8 JB |
9 | Summary: GTK helper library for colord |
10 | Summary(pl.UTF-8): Biblioteka pomocniczna GTK dla colord | |
11 | Name: colord-gtk | |
3e3d22fe JB |
12 | Version: 0.2.0 |
13 | Release: 1 | |
e10ba1e6 JB |
14 | License: LGPL v2.1+ (library), GPL v2+ (cd-convert utility) |
15 | Group: X11/Libraries | |
3e3d22fe JB |
16 | Source0: https://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz |
17 | # Source0-md5: 66d048803c8b89e5e63da4b461484933 | |
18 | URL: https://www.freedesktop.org/software/colord/ | |
5f21a46d | 19 | BuildRequires: colord-devel >= %{colord_ver} |
ec7bacc3 | 20 | BuildRequires: gettext-tools >= 0.17 |
4eb0a7a8 JB |
21 | BuildRequires: glib2-devel >= 1:2.28.0 |
22 | BuildRequires: gobject-introspection-devel >= 0.9.8 | |
e10ba1e6 | 23 | %{?with_gtk2:BuildRequires: gtk+2-devel >= 2.0} |
4eb0a7a8 JB |
24 | BuildRequires: gtk+3-devel >= 3.0 |
25 | BuildRequires: gtk-doc >= 1.9 | |
4eb0a7a8 | 26 | BuildRequires: lcms2-devel >= 2.2 |
3e3d22fe JB |
27 | BuildRequires: meson >= 0.46.0 |
28 | BuildRequires: ninja >= 1.5 | |
4eb0a7a8 | 29 | BuildRequires: pkgconfig |
3e3d22fe JB |
30 | BuildRequires: rpmbuild(macros) >= 1.736 |
31 | BuildRequires: sed >= 4.0 | |
d7aa0bd3 JB |
32 | %if %{with vala} |
33 | BuildRequires: vala | |
5f21a46d | 34 | BuildRequires: vala-colord >= %{colord_ver} |
d7aa0bd3 | 35 | %endif |
5f21a46d | 36 | Requires: colord-libs >= %{colord_ver} |
e10ba1e6 | 37 | Requires: glib2 >= 1:2.28.0 |
4eb0a7a8 JB |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
40 | %description | |
41 | GTK helper library for colord. | |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | Biblioteka pomocniczna GTK dla colord. | |
45 | ||
46 | %package devel | |
47 | Summary: Header files for colord-gtk library | |
48 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki colord-gtk | |
e10ba1e6 | 49 | Group: X11/Development/Libraries |
4eb0a7a8 | 50 | Requires: %{name} = %{version}-%{release} |
5f21a46d | 51 | Requires: colord-devel >= %{colord_ver} |
e10ba1e6 | 52 | Requires: glib2-devel >= 1:2.28.0 |
4eb0a7a8 JB |
53 | Requires: gtk+3-devel >= 3.0 |
54 | ||
55 | %description devel | |
56 | Header files for colord-gtk library. | |
57 | ||
58 | %description devel -l pl.UTF-8 | |
59 | Pliki nagłówkowe biblioteki colord-gtk. | |
60 | ||
61 | %package static | |
62 | Summary: Static colord-gtk library | |
63 | Summary(pl.UTF-8): Statyczna biblioteka colord-gtk | |
e10ba1e6 | 64 | Group: X11/Development/Libraries |
4eb0a7a8 JB |
65 | Requires: %{name}-devel = %{version}-%{release} |
66 | ||
67 | %description static | |
68 | Static colord-gtk library. | |
69 | ||
70 | %description static -l pl.UTF-8 | |
71 | Statyczna biblioteka colord-gtk. | |
72 | ||
73 | %package apidocs | |
74 | Summary: colord-gtk API documentation | |
75 | Summary(pl.UTF-8): Dokumentacja API colord-gtk | |
76 | Group: Documentation | |
77 | Requires: gtk-doc-common | |
a64087dc ER |
78 | %if "%{_rpmversion}" >= "5" |
79 | BuildArch: noarch | |
80 | %endif | |
4eb0a7a8 JB |
81 | |
82 | %description apidocs | |
83 | colord-gtk API documentation. | |
84 | ||
85 | %description apidocs -l pl.UTF-8 | |
86 | Dokumentacja API colord-gtk. | |
87 | ||
88 | %package -n vala-colord-gtk | |
89 | Summary: colord-gtk API for Vala language | |
90 | Summary(pl.UTF-8): API colord-gtk dla języka Vala | |
e10ba1e6 | 91 | Group: X11/Development/Libraries |
4eb0a7a8 | 92 | Requires: %{name}-devel = %{version}-%{release} |
5f21a46d | 93 | Requires: vala-colord >= %{colord_ver} |
cc935143 ER |
94 | %if "%{_rpmversion}" >= "5" |
95 | BuildArch: noarch | |
96 | %endif | |
4eb0a7a8 JB |
97 | |
98 | %description -n vala-colord-gtk | |
99 | colord-gtk API for Vala language. | |
100 | ||
101 | %description -n vala-colord-gtk -l pl.UTF-8 | |
102 | API colord-gtk dla języka Vala. | |
103 | ||
e10ba1e6 JB |
104 | %package -n colord-gtk2 |
105 | Summary: GTK 2 helper library for colord | |
106 | Summary(pl.UTF-8): Biblioteka pomocniczna GTK 2 dla colord | |
107 | Group: X11/Libraries | |
108 | Requires: colord-libs >= %{colord_ver} | |
109 | Requires: glib2 >= 1:2.28.0 | |
110 | ||
111 | %description -n colord-gtk2 | |
112 | GTK 2 helper library for colord. | |
113 | ||
114 | %description -n colord-gtk2 -l pl.UTF-8 | |
115 | Biblioteka pomocniczna GTK 2 dla colord. | |
116 | ||
117 | %package -n colord-gtk2-devel | |
118 | Summary: Development files for colord-gtk2 library | |
119 | Summary(pl.UTF-8): Pliki programistyczne biblioteki colord-gtk2 | |
120 | Group: X11/Development/Libraries | |
121 | Requires: %{name}-devel = %{version}-%{release} | |
122 | Requires: colord-gtk2 = %{version}-%{release} | |
123 | Requires: gtk+2-devel >= 2.0 | |
124 | ||
125 | %description -n colord-gtk2-devel | |
126 | Development files for colord-gtk2 library. | |
127 | ||
128 | %description -n colord-gtk2-devel -l pl.UTF-8 | |
129 | Pliki programistyczne biblioteki colord-gtk2. | |
130 | ||
131 | %package -n colord-gtk2-static | |
132 | Summary: Static colord-gtk2 library | |
133 | Summary(pl.UTF-8): Statyczna biblioteka colord-gtk2 | |
134 | Group: X11/Development/Libraries | |
135 | Requires: colord-gtk2-devel = %{version}-%{release} | |
136 | ||
137 | %description -n colord-gtk2-static | |
138 | Static colord-gtk2 library. | |
139 | ||
140 | %description -n colord-gtk2-static -l pl.UTF-8 | |
141 | Statyczna biblioteka colord-gtk2. | |
142 | ||
4eb0a7a8 JB |
143 | %prep |
144 | %setup -q | |
145 | ||
3e3d22fe JB |
146 | %if %{with static_libs} |
147 | %{__sed} -i -e 's/ = shared_library/ = library/' libcolord-gtk/meson.build | |
148 | %endif | |
149 | ||
4eb0a7a8 | 150 | %build |
3e3d22fe JB |
151 | %meson build \ |
152 | -Dgtk2=true \ | |
153 | -Dvapi=true | |
154 | ||
155 | %ninja_build -C build | |
4eb0a7a8 JB |
156 | |
157 | %install | |
158 | rm -rf $RPM_BUILD_ROOT | |
159 | ||
3e3d22fe | 160 | %ninja_install -C build |
4eb0a7a8 | 161 | |
e10ba1e6 | 162 | # only empty translation exists atm. (as of 0.1.26) |
4eb0a7a8 JB |
163 | #find_lang %{name} |
164 | ||
165 | %clean | |
166 | rm -rf $RPM_BUILD_ROOT | |
167 | ||
168 | %post -p /sbin/ldconfig | |
169 | %postun -p /sbin/ldconfig | |
170 | ||
e10ba1e6 JB |
171 | %post -n colord-gtk2 -p /sbin/ldconfig |
172 | %postun -n colord-gtk2 -p /sbin/ldconfig | |
173 | ||
4eb0a7a8 | 174 | %files |
cc935143 | 175 | %defattr(644,root,root,755) |
4eb0a7a8 JB |
176 | # -f %{name}.lang |
177 | %defattr(644,root,root,755) | |
178 | %doc AUTHORS MAINTAINERS NEWS README TODO | |
e10ba1e6 | 179 | %attr(755,root,root) %{_bindir}/cd-convert |
4eb0a7a8 JB |
180 | %attr(755,root,root) %{_libdir}/libcolord-gtk.so.*.*.* |
181 | %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk.so.1 | |
182 | %{_libdir}/girepository-1.0/ColordGtk-1.0.typelib | |
e10ba1e6 | 183 | %{_mandir}/man1/cd-convert.1* |
4eb0a7a8 JB |
184 | |
185 | %files devel | |
186 | %defattr(644,root,root,755) | |
187 | %attr(755,root,root) %{_libdir}/libcolord-gtk.so | |
188 | %{_includedir}/colord-1/colord-gtk.h | |
189 | %{_includedir}/colord-1/colord-gtk | |
190 | %{_datadir}/gir-1.0/ColordGtk-1.0.gir | |
191 | %{_pkgconfigdir}/colord-gtk.pc | |
192 | ||
193 | %if %{with static_libs} | |
194 | %files static | |
195 | %defattr(644,root,root,755) | |
196 | %{_libdir}/libcolord-gtk.a | |
197 | %endif | |
198 | ||
199 | %if %{with apidocs} | |
200 | %files apidocs | |
201 | %defattr(644,root,root,755) | |
202 | %{_gtkdocdir}/colord-gtk | |
203 | %endif | |
204 | ||
205 | %if %{with vala} | |
206 | %files -n vala-colord-gtk | |
207 | %defattr(644,root,root,755) | |
3e3d22fe | 208 | %{_datadir}/vala/vapi/colord-gtk.deps |
4eb0a7a8 JB |
209 | %{_datadir}/vala/vapi/colord-gtk.vapi |
210 | %endif | |
e10ba1e6 JB |
211 | |
212 | %if %{with gtk2} | |
213 | %files -n colord-gtk2 | |
214 | %defattr(644,root,root,755) | |
215 | %attr(755,root,root) %{_libdir}/libcolord-gtk2.so.*.*.* | |
216 | %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk2.so.1 | |
217 | ||
218 | %files -n colord-gtk2-devel | |
219 | %defattr(644,root,root,755) | |
220 | %attr(755,root,root) %{_libdir}/libcolord-gtk2.so | |
221 | %{_pkgconfigdir}/colord-gtk2.pc | |
222 | ||
223 | %if %{with static_libs} | |
224 | %files -n colord-gtk2-static | |
225 | %defattr(644,root,root,755) | |
226 | %{_libdir}/libcolord-gtk2.a | |
227 | %endif | |
228 | %endif |