]>
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 JB |
6 | %bcond_without vala # don't build Vala API |
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 |
dc706da4 | 13 | Release: 3 |
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 | |
79 | ||
80 | %description apidocs | |
81 | colord-gtk API documentation. | |
82 | ||
83 | %description apidocs -l pl.UTF-8 | |
84 | Dokumentacja API colord-gtk. | |
85 | ||
86 | %package -n vala-colord-gtk | |
87 | Summary: colord-gtk API for Vala language | |
88 | Summary(pl.UTF-8): API colord-gtk dla języka Vala | |
e10ba1e6 | 89 | Group: X11/Development/Libraries |
4eb0a7a8 | 90 | Requires: %{name}-devel = %{version}-%{release} |
5f21a46d | 91 | Requires: vala-colord >= %{colord_ver} |
4eb0a7a8 JB |
92 | |
93 | %description -n vala-colord-gtk | |
94 | colord-gtk API for Vala language. | |
95 | ||
96 | %description -n vala-colord-gtk -l pl.UTF-8 | |
97 | API colord-gtk dla języka Vala. | |
98 | ||
e10ba1e6 JB |
99 | %package -n colord-gtk2 |
100 | Summary: GTK 2 helper library for colord | |
101 | Summary(pl.UTF-8): Biblioteka pomocniczna GTK 2 dla colord | |
102 | Group: X11/Libraries | |
103 | Requires: colord-libs >= %{colord_ver} | |
104 | Requires: glib2 >= 1:2.28.0 | |
105 | ||
106 | %description -n colord-gtk2 | |
107 | GTK 2 helper library for colord. | |
108 | ||
109 | %description -n colord-gtk2 -l pl.UTF-8 | |
110 | Biblioteka pomocniczna GTK 2 dla colord. | |
111 | ||
112 | %package -n colord-gtk2-devel | |
113 | Summary: Development files for colord-gtk2 library | |
114 | Summary(pl.UTF-8): Pliki programistyczne biblioteki colord-gtk2 | |
115 | Group: X11/Development/Libraries | |
116 | Requires: %{name}-devel = %{version}-%{release} | |
117 | Requires: colord-gtk2 = %{version}-%{release} | |
118 | Requires: gtk+2-devel >= 2.0 | |
119 | ||
120 | %description -n colord-gtk2-devel | |
121 | Development files for colord-gtk2 library. | |
122 | ||
123 | %description -n colord-gtk2-devel -l pl.UTF-8 | |
124 | Pliki programistyczne biblioteki colord-gtk2. | |
125 | ||
126 | %package -n colord-gtk2-static | |
127 | Summary: Static colord-gtk2 library | |
128 | Summary(pl.UTF-8): Statyczna biblioteka colord-gtk2 | |
129 | Group: X11/Development/Libraries | |
130 | Requires: colord-gtk2-devel = %{version}-%{release} | |
131 | ||
132 | %description -n colord-gtk2-static | |
133 | Static colord-gtk2 library. | |
134 | ||
135 | %description -n colord-gtk2-static -l pl.UTF-8 | |
136 | Statyczna biblioteka colord-gtk2. | |
137 | ||
4eb0a7a8 JB |
138 | %prep |
139 | %setup -q | |
140 | ||
141 | %build | |
142 | %{__intltoolize} | |
143 | %{__libtoolize} | |
144 | %{__aclocal} -I m4 | |
145 | %{__autoconf} | |
146 | %{__autoheader} | |
147 | %{__automake} | |
148 | %configure \ | |
149 | --disable-silent-rules \ | |
150 | %{__enable_disable apidocs gtk-doc} \ | |
e10ba1e6 | 151 | %{?with_gtk2:--enable-gtk2} \ |
4eb0a7a8 | 152 | %{__enable_disable static_libs static} \ |
5f21a46d | 153 | %{?with_vala:--enable-vala} \ |
4eb0a7a8 JB |
154 | --with-html-dir=%{_gtkdocdir} |
155 | ||
40831c77 JB |
156 | # docs build seems racy |
157 | %{__make} -j1 | |
4eb0a7a8 JB |
158 | |
159 | %install | |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | ||
162 | %{__make} install \ | |
163 | DESTDIR=$RPM_BUILD_ROOT | |
164 | ||
165 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
166 | ||
e10ba1e6 | 167 | # only empty translation exists atm. (as of 0.1.26) |
4eb0a7a8 JB |
168 | #find_lang %{name} |
169 | ||
170 | %clean | |
171 | rm -rf $RPM_BUILD_ROOT | |
172 | ||
173 | %post -p /sbin/ldconfig | |
174 | %postun -p /sbin/ldconfig | |
175 | ||
e10ba1e6 JB |
176 | %post -n colord-gtk2 -p /sbin/ldconfig |
177 | %postun -n colord-gtk2 -p /sbin/ldconfig | |
178 | ||
4eb0a7a8 JB |
179 | %files |
180 | # -f %{name}.lang | |
181 | %defattr(644,root,root,755) | |
182 | %doc AUTHORS MAINTAINERS NEWS README TODO | |
e10ba1e6 | 183 | %attr(755,root,root) %{_bindir}/cd-convert |
4eb0a7a8 JB |
184 | %attr(755,root,root) %{_libdir}/libcolord-gtk.so.*.*.* |
185 | %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk.so.1 | |
186 | %{_libdir}/girepository-1.0/ColordGtk-1.0.typelib | |
e10ba1e6 | 187 | %{_mandir}/man1/cd-convert.1* |
4eb0a7a8 JB |
188 | |
189 | %files devel | |
190 | %defattr(644,root,root,755) | |
191 | %attr(755,root,root) %{_libdir}/libcolord-gtk.so | |
192 | %{_includedir}/colord-1/colord-gtk.h | |
193 | %{_includedir}/colord-1/colord-gtk | |
194 | %{_datadir}/gir-1.0/ColordGtk-1.0.gir | |
195 | %{_pkgconfigdir}/colord-gtk.pc | |
196 | ||
197 | %if %{with static_libs} | |
198 | %files static | |
199 | %defattr(644,root,root,755) | |
200 | %{_libdir}/libcolord-gtk.a | |
201 | %endif | |
202 | ||
203 | %if %{with apidocs} | |
204 | %files apidocs | |
205 | %defattr(644,root,root,755) | |
206 | %{_gtkdocdir}/colord-gtk | |
207 | %endif | |
208 | ||
209 | %if %{with vala} | |
210 | %files -n vala-colord-gtk | |
211 | %defattr(644,root,root,755) | |
212 | %{_datadir}/vala/vapi/colord-gtk.vapi | |
213 | %endif | |
e10ba1e6 JB |
214 | |
215 | %if %{with gtk2} | |
216 | %files -n colord-gtk2 | |
217 | %defattr(644,root,root,755) | |
218 | %attr(755,root,root) %{_libdir}/libcolord-gtk2.so.*.*.* | |
219 | %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk2.so.1 | |
220 | ||
221 | %files -n colord-gtk2-devel | |
222 | %defattr(644,root,root,755) | |
223 | %attr(755,root,root) %{_libdir}/libcolord-gtk2.so | |
224 | %{_pkgconfigdir}/colord-gtk2.pc | |
225 | ||
226 | %if %{with static_libs} | |
227 | %files -n colord-gtk2-static | |
228 | %defattr(644,root,root,755) | |
229 | %{_libdir}/libcolord-gtk2.a | |
230 | %endif | |
231 | %endif |