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