]>
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 | 78 | BuildArch: noarch |
4eb0a7a8 JB |
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} |
cc935143 | 92 | BuildArch: noarch |
4eb0a7a8 JB |
93 | |
94 | %description -n vala-colord-gtk | |
95 | colord-gtk API for Vala language. | |
96 | ||
97 | %description -n vala-colord-gtk -l pl.UTF-8 | |
98 | API colord-gtk dla języka Vala. | |
99 | ||
e10ba1e6 JB |
100 | %package -n colord-gtk2 |
101 | Summary: GTK 2 helper library for colord | |
102 | Summary(pl.UTF-8): Biblioteka pomocniczna GTK 2 dla colord | |
103 | Group: X11/Libraries | |
104 | Requires: colord-libs >= %{colord_ver} | |
105 | Requires: glib2 >= 1:2.28.0 | |
106 | ||
107 | %description -n colord-gtk2 | |
108 | GTK 2 helper library for colord. | |
109 | ||
110 | %description -n colord-gtk2 -l pl.UTF-8 | |
111 | Biblioteka pomocniczna GTK 2 dla colord. | |
112 | ||
113 | %package -n colord-gtk2-devel | |
114 | Summary: Development files for colord-gtk2 library | |
115 | Summary(pl.UTF-8): Pliki programistyczne biblioteki colord-gtk2 | |
116 | Group: X11/Development/Libraries | |
117 | Requires: %{name}-devel = %{version}-%{release} | |
118 | Requires: colord-gtk2 = %{version}-%{release} | |
119 | Requires: gtk+2-devel >= 2.0 | |
120 | ||
121 | %description -n colord-gtk2-devel | |
122 | Development files for colord-gtk2 library. | |
123 | ||
124 | %description -n colord-gtk2-devel -l pl.UTF-8 | |
125 | Pliki programistyczne biblioteki colord-gtk2. | |
126 | ||
127 | %package -n colord-gtk2-static | |
128 | Summary: Static colord-gtk2 library | |
129 | Summary(pl.UTF-8): Statyczna biblioteka colord-gtk2 | |
130 | Group: X11/Development/Libraries | |
131 | Requires: colord-gtk2-devel = %{version}-%{release} | |
132 | ||
133 | %description -n colord-gtk2-static | |
134 | Static colord-gtk2 library. | |
135 | ||
136 | %description -n colord-gtk2-static -l pl.UTF-8 | |
137 | Statyczna biblioteka colord-gtk2. | |
138 | ||
4eb0a7a8 JB |
139 | %prep |
140 | %setup -q | |
141 | ||
3e3d22fe JB |
142 | %if %{with static_libs} |
143 | %{__sed} -i -e 's/ = shared_library/ = library/' libcolord-gtk/meson.build | |
144 | %endif | |
145 | ||
4eb0a7a8 | 146 | %build |
3e3d22fe JB |
147 | %meson build \ |
148 | -Dgtk2=true \ | |
149 | -Dvapi=true | |
150 | ||
151 | %ninja_build -C build | |
4eb0a7a8 JB |
152 | |
153 | %install | |
154 | rm -rf $RPM_BUILD_ROOT | |
155 | ||
3e3d22fe | 156 | %ninja_install -C build |
4eb0a7a8 | 157 | |
e10ba1e6 | 158 | # only empty translation exists atm. (as of 0.1.26) |
4eb0a7a8 JB |
159 | #find_lang %{name} |
160 | ||
161 | %clean | |
162 | rm -rf $RPM_BUILD_ROOT | |
163 | ||
164 | %post -p /sbin/ldconfig | |
165 | %postun -p /sbin/ldconfig | |
166 | ||
e10ba1e6 JB |
167 | %post -n colord-gtk2 -p /sbin/ldconfig |
168 | %postun -n colord-gtk2 -p /sbin/ldconfig | |
169 | ||
4eb0a7a8 | 170 | %files |
cc935143 | 171 | %defattr(644,root,root,755) |
4eb0a7a8 JB |
172 | # -f %{name}.lang |
173 | %defattr(644,root,root,755) | |
174 | %doc AUTHORS MAINTAINERS NEWS README TODO | |
e10ba1e6 | 175 | %attr(755,root,root) %{_bindir}/cd-convert |
4eb0a7a8 JB |
176 | %attr(755,root,root) %{_libdir}/libcolord-gtk.so.*.*.* |
177 | %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk.so.1 | |
178 | %{_libdir}/girepository-1.0/ColordGtk-1.0.typelib | |
e10ba1e6 | 179 | %{_mandir}/man1/cd-convert.1* |
4eb0a7a8 JB |
180 | |
181 | %files devel | |
182 | %defattr(644,root,root,755) | |
183 | %attr(755,root,root) %{_libdir}/libcolord-gtk.so | |
184 | %{_includedir}/colord-1/colord-gtk.h | |
185 | %{_includedir}/colord-1/colord-gtk | |
186 | %{_datadir}/gir-1.0/ColordGtk-1.0.gir | |
187 | %{_pkgconfigdir}/colord-gtk.pc | |
188 | ||
189 | %if %{with static_libs} | |
190 | %files static | |
191 | %defattr(644,root,root,755) | |
192 | %{_libdir}/libcolord-gtk.a | |
193 | %endif | |
194 | ||
195 | %if %{with apidocs} | |
196 | %files apidocs | |
197 | %defattr(644,root,root,755) | |
198 | %{_gtkdocdir}/colord-gtk | |
199 | %endif | |
200 | ||
201 | %if %{with vala} | |
202 | %files -n vala-colord-gtk | |
203 | %defattr(644,root,root,755) | |
3e3d22fe | 204 | %{_datadir}/vala/vapi/colord-gtk.deps |
4eb0a7a8 JB |
205 | %{_datadir}/vala/vapi/colord-gtk.vapi |
206 | %endif | |
e10ba1e6 JB |
207 | |
208 | %if %{with gtk2} | |
209 | %files -n colord-gtk2 | |
210 | %defattr(644,root,root,755) | |
211 | %attr(755,root,root) %{_libdir}/libcolord-gtk2.so.*.*.* | |
212 | %attr(755,root,root) %ghost %{_libdir}/libcolord-gtk2.so.1 | |
213 | ||
214 | %files -n colord-gtk2-devel | |
215 | %defattr(644,root,root,755) | |
216 | %attr(755,root,root) %{_libdir}/libcolord-gtk2.so | |
217 | %{_pkgconfigdir}/colord-gtk2.pc | |
218 | ||
219 | %if %{with static_libs} | |
220 | %files -n colord-gtk2-static | |
221 | %defattr(644,root,root,755) | |
222 | %{_libdir}/libcolord-gtk2.a | |
223 | %endif | |
224 | %endif |