]>
Commit | Line | Data |
---|---|---|
4eb0a7a8 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
4 | %bcond_without static_libs # don't build static libraries | |
e10ba1e6 | 5 | %bcond_without gtk2 # additional GTK+ 2.x version of library |
4eb0a7a8 | 6 | %bcond_without vala # don't build 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 | |
e10ba1e6 | 12 | Version: 0.1.26 |
cc935143 | 13 | Release: 4 |
e10ba1e6 JB |
14 | License: LGPL v2.1+ (library), GPL v2+ (cd-convert utility) |
15 | Group: X11/Libraries | |
4eb0a7a8 | 16 | Source0: http://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz |
e10ba1e6 | 17 | # Source0-md5: bb9d6f3c037152ad791003375aa6c16c |
4eb0a7a8 JB |
18 | URL: http://www.freedesktop.org/software/colord/ |
19 | BuildRequires: autoconf >= 2.63 | |
20 | BuildRequires: automake >= 1:1.9 | |
5f21a46d | 21 | BuildRequires: colord-devel >= %{colord_ver} |
ec7bacc3 | 22 | BuildRequires: gettext-tools >= 0.17 |
4eb0a7a8 JB |
23 | BuildRequires: glib2-devel >= 1:2.28.0 |
24 | BuildRequires: gobject-introspection-devel >= 0.9.8 | |
e10ba1e6 | 25 | %{?with_gtk2:BuildRequires: gtk+2-devel >= 2.0} |
4eb0a7a8 JB |
26 | BuildRequires: gtk+3-devel >= 3.0 |
27 | BuildRequires: gtk-doc >= 1.9 | |
28 | BuildRequires: intltool >= 0.40.0 | |
29 | BuildRequires: lcms2-devel >= 2.2 | |
30 | BuildRequires: libtool >= 2:2.0 | |
31 | BuildRequires: pkgconfig | |
32 | BuildRequires: rpmbuild(macros) >= 1.644 | |
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 ER |
79 | %if "%{_rpmversion}" >= "5" |
80 | BuildArch: noarch | |
81 | %endif | |
4eb0a7a8 JB |
82 | |
83 | %description apidocs | |
84 | colord-gtk API documentation. | |
85 | ||
86 | %description apidocs -l pl.UTF-8 | |
87 | Dokumentacja API colord-gtk. | |
88 | ||
89 | %package -n vala-colord-gtk | |
90 | Summary: colord-gtk API for Vala language | |
91 | Summary(pl.UTF-8): API colord-gtk dla języka Vala | |
e10ba1e6 | 92 | Group: X11/Development/Libraries |
4eb0a7a8 | 93 | Requires: %{name}-devel = %{version}-%{release} |
5f21a46d | 94 | Requires: vala-colord >= %{colord_ver} |
cc935143 ER |
95 | %if "%{_rpmversion}" >= "5" |
96 | BuildArch: noarch | |
97 | %endif | |
4eb0a7a8 JB |
98 | |
99 | %description -n vala-colord-gtk | |
100 | colord-gtk API for Vala language. | |
101 | ||
102 | %description -n vala-colord-gtk -l pl.UTF-8 | |
103 | API colord-gtk dla języka Vala. | |
104 | ||
e10ba1e6 JB |
105 | %package -n colord-gtk2 |
106 | Summary: GTK 2 helper library for colord | |
107 | Summary(pl.UTF-8): Biblioteka pomocniczna GTK 2 dla colord | |
108 | Group: X11/Libraries | |
109 | Requires: colord-libs >= %{colord_ver} | |
110 | Requires: glib2 >= 1:2.28.0 | |
111 | ||
112 | %description -n colord-gtk2 | |
113 | GTK 2 helper library for colord. | |
114 | ||
115 | %description -n colord-gtk2 -l pl.UTF-8 | |
116 | Biblioteka pomocniczna GTK 2 dla colord. | |
117 | ||
118 | %package -n colord-gtk2-devel | |
119 | Summary: Development files for colord-gtk2 library | |
120 | Summary(pl.UTF-8): Pliki programistyczne biblioteki colord-gtk2 | |
121 | Group: X11/Development/Libraries | |
122 | Requires: %{name}-devel = %{version}-%{release} | |
123 | Requires: colord-gtk2 = %{version}-%{release} | |
124 | Requires: gtk+2-devel >= 2.0 | |
125 | ||
126 | %description -n colord-gtk2-devel | |
127 | Development files for colord-gtk2 library. | |
128 | ||
129 | %description -n colord-gtk2-devel -l pl.UTF-8 | |
130 | Pliki programistyczne biblioteki colord-gtk2. | |
131 | ||
132 | %package -n colord-gtk2-static | |
133 | Summary: Static colord-gtk2 library | |
134 | Summary(pl.UTF-8): Statyczna biblioteka colord-gtk2 | |
135 | Group: X11/Development/Libraries | |
136 | Requires: colord-gtk2-devel = %{version}-%{release} | |
137 | ||
138 | %description -n colord-gtk2-static | |
139 | Static colord-gtk2 library. | |
140 | ||
141 | %description -n colord-gtk2-static -l pl.UTF-8 | |
142 | Statyczna biblioteka colord-gtk2. | |
143 | ||
4eb0a7a8 JB |
144 | %prep |
145 | %setup -q | |
146 | ||
147 | %build | |
148 | %{__intltoolize} | |
149 | %{__libtoolize} | |
150 | %{__aclocal} -I m4 | |
151 | %{__autoconf} | |
152 | %{__autoheader} | |
153 | %{__automake} | |
154 | %configure \ | |
155 | --disable-silent-rules \ | |
156 | %{__enable_disable apidocs gtk-doc} \ | |
e10ba1e6 | 157 | %{?with_gtk2:--enable-gtk2} \ |
4eb0a7a8 | 158 | %{__enable_disable static_libs static} \ |
5f21a46d | 159 | %{?with_vala:--enable-vala} \ |
4eb0a7a8 JB |
160 | --with-html-dir=%{_gtkdocdir} |
161 | ||
40831c77 JB |
162 | # docs build seems racy |
163 | %{__make} -j1 | |
4eb0a7a8 JB |
164 | |
165 | %install | |
166 | rm -rf $RPM_BUILD_ROOT | |
167 | ||
168 | %{__make} install \ | |
169 | DESTDIR=$RPM_BUILD_ROOT | |
170 | ||
171 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
172 | ||
e10ba1e6 | 173 | # only empty translation exists atm. (as of 0.1.26) |
4eb0a7a8 JB |
174 | #find_lang %{name} |
175 | ||
176 | %clean | |
177 | rm -rf $RPM_BUILD_ROOT | |
178 | ||
179 | %post -p /sbin/ldconfig | |
180 | %postun -p /sbin/ldconfig | |
181 | ||
e10ba1e6 JB |
182 | %post -n colord-gtk2 -p /sbin/ldconfig |
183 | %postun -n colord-gtk2 -p /sbin/ldconfig | |
184 | ||
4eb0a7a8 | 185 | %files |
cc935143 | 186 | %defattr(644,root,root,755) |
4eb0a7a8 JB |
187 | # -f %{name}.lang |
188 | %defattr(644,root,root,755) | |
189 | %doc AUTHORS MAINTAINERS NEWS README TODO | |
e10ba1e6 | 190 | %attr(755,root,root) %{_bindir}/cd-convert |
4eb0a7a8 JB |
191 | %attr(755,root,root) %{_libdir}/libcolord-gtk.so.*.*.* |
192 | %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk.so.1 | |
193 | %{_libdir}/girepository-1.0/ColordGtk-1.0.typelib | |
e10ba1e6 | 194 | %{_mandir}/man1/cd-convert.1* |
4eb0a7a8 JB |
195 | |
196 | %files devel | |
197 | %defattr(644,root,root,755) | |
198 | %attr(755,root,root) %{_libdir}/libcolord-gtk.so | |
199 | %{_includedir}/colord-1/colord-gtk.h | |
200 | %{_includedir}/colord-1/colord-gtk | |
201 | %{_datadir}/gir-1.0/ColordGtk-1.0.gir | |
202 | %{_pkgconfigdir}/colord-gtk.pc | |
203 | ||
204 | %if %{with static_libs} | |
205 | %files static | |
206 | %defattr(644,root,root,755) | |
207 | %{_libdir}/libcolord-gtk.a | |
208 | %endif | |
209 | ||
210 | %if %{with apidocs} | |
211 | %files apidocs | |
212 | %defattr(644,root,root,755) | |
213 | %{_gtkdocdir}/colord-gtk | |
214 | %endif | |
215 | ||
216 | %if %{with vala} | |
217 | %files -n vala-colord-gtk | |
218 | %defattr(644,root,root,755) | |
219 | %{_datadir}/vala/vapi/colord-gtk.vapi | |
220 | %endif | |
e10ba1e6 JB |
221 | |
222 | %if %{with gtk2} | |
223 | %files -n colord-gtk2 | |
224 | %defattr(644,root,root,755) | |
225 | %attr(755,root,root) %{_libdir}/libcolord-gtk2.so.*.*.* | |
226 | %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk2.so.1 | |
227 | ||
228 | %files -n colord-gtk2-devel | |
229 | %defattr(644,root,root,755) | |
230 | %attr(755,root,root) %{_libdir}/libcolord-gtk2.so | |
231 | %{_pkgconfigdir}/colord-gtk2.pc | |
232 | ||
233 | %if %{with static_libs} | |
234 | %files -n colord-gtk2-static | |
235 | %defattr(644,root,root,755) | |
236 | %{_libdir}/libcolord-gtk2.a | |
237 | %endif | |
238 | %endif |