]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # gtk-doc based API documentation | |
4 | %bcond_without sane # SANE support | |
5 | %bcond_without vala # Vala API | |
6 | %bcond_without systemd # systemd | |
7 | ||
8 | Summary: Color daemon - system daemon for managing color devices | |
9 | Summary(pl.UTF-8): Demon colord - usługa systemowa do zarządzania urządzeniami obsługującymi kolory | |
10 | Name: colord | |
11 | Version: 1.4.7 | |
12 | Release: 1 | |
13 | License: GPL v2+ and LGPL v2+ | |
14 | Group: Daemons | |
15 | Source0: https://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz | |
16 | # Source0-md5: 94bd795efa1931a34990345e4ac439a8 | |
17 | URL: https://www.freedesktop.org/software/colord/ | |
18 | # for colprof,spotread programs detection | |
19 | BuildRequires: argyllcms | |
20 | BuildRequires: bash-completion-devel >= 2.0 | |
21 | BuildRequires: dbus-devel | |
22 | BuildRequires: docbook-style-xsl-ns | |
23 | BuildRequires: gcc >= 5:3.2 | |
24 | BuildRequires: gettext-tools >= 0.17 | |
25 | BuildRequires: glib2-devel >= 1:2.46.0 | |
26 | BuildRequires: gobject-introspection-devel >= 0.9.8 | |
27 | BuildRequires: gtk-doc >= 1.9 | |
28 | BuildRequires: lcms2-devel >= 2.6 | |
29 | BuildRequires: libgusb-devel >= 0.2.7 | |
30 | BuildRequires: libxslt-progs | |
31 | BuildRequires: meson >= 0.52.0 | |
32 | BuildRequires: ninja | |
33 | BuildRequires: pkgconfig | |
34 | BuildRequires: polkit-devel >= 0.103 | |
35 | BuildRequires: rpm-build >= 4.6 | |
36 | BuildRequires: rpmbuild(macros) >= 1.736 | |
37 | %{?with_sane:BuildRequires: sane-backends-devel} | |
38 | BuildRequires: sqlite3-devel >= 3 | |
39 | %{?with_systemd:BuildRequires: systemd-devel >= 44} | |
40 | BuildRequires: tar >= 1:1.22 | |
41 | BuildRequires: udev-devel | |
42 | BuildRequires: udev-glib-devel | |
43 | %{?with_vala:BuildRequires: vala} | |
44 | BuildRequires: xz | |
45 | Requires(post,preun,postun): systemd-units >= 44 | |
46 | Requires: %{name}-libs = %{version}-%{release} | |
47 | Requires: polkit >= 0.103 | |
48 | Requires: systemd-units >= 44 | |
49 | # /usr/bin/spotread called by argyll sensor driver | |
50 | Suggests: argyllcms | |
51 | Suggests: shared-color-profiles | |
52 | Provides: group(colord) | |
53 | Provides: user(colord) | |
54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
55 | ||
56 | %description | |
57 | colord is a low level system activated daemon that maps color devices | |
58 | to color profiles in the system context. | |
59 | ||
60 | %description -l pl.UTF-8 | |
61 | colord to niskopoziomowa usługa systemowa odwzorowująca urządzenia | |
62 | obsługujące kolory na profile kolorów w kontekście systemu. | |
63 | ||
64 | %package libs | |
65 | Summary: colord library | |
66 | Summary(pl.UTF-8): Biblioteka colord | |
67 | Group: Libraries | |
68 | Requires: glib2 >= 1:2.46.0 | |
69 | Requires: lcms2 >= 2.6 | |
70 | # for libcolorhug only | |
71 | Requires: libgusb >= 0.2.7 | |
72 | Suggests: %{name} = %{version}-%{release} | |
73 | Obsoletes: colorhug-client-libs < 0.1.14 | |
74 | Conflicts: colord < 0.1.12-4 | |
75 | ||
76 | %description libs | |
77 | colord library. | |
78 | ||
79 | %description libs -l pl.UTF-8 | |
80 | Biblioteka colord. | |
81 | ||
82 | %package devel | |
83 | Summary: Header files for colord library | |
84 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki colord | |
85 | Group: Development/Libraries | |
86 | Requires: %{name}-libs = %{version}-%{release} | |
87 | Requires: dbus-devel | |
88 | Requires: glib2-devel >= 1:2.46.0 | |
89 | Requires: lcms2-devel >= 2.6 | |
90 | Requires: libgusb-devel >= 0.2.7 | |
91 | Obsoletes: colord-static < 1.4.0 | |
92 | Obsoletes: colorhug-client-devel < 0.1.14 | |
93 | Obsoletes: colorhug-client-static < 0.1.14 | |
94 | ||
95 | %description devel | |
96 | Header files for colord library. | |
97 | ||
98 | %description devel -l pl.UTF-8 | |
99 | Pliki nagłówkowe biblioteki colord. | |
100 | ||
101 | %package apidocs | |
102 | Summary: colord API documentation | |
103 | Summary(pl.UTF-8): Dokumentacja API colord | |
104 | Group: Documentation | |
105 | Requires: gtk-doc-common | |
106 | BuildArch: noarch | |
107 | ||
108 | %description apidocs | |
109 | colord API documentation. | |
110 | ||
111 | %description apidocs -l pl.UTF-8 | |
112 | Dokumentacja API colord. | |
113 | ||
114 | %package -n vala-colord | |
115 | Summary: colord API for Vala language | |
116 | Summary(pl.UTF-8): API colord dla języka Vala | |
117 | Group: Development/Libraries | |
118 | Requires: %{name}-devel = %{version}-%{release} | |
119 | BuildArch: noarch | |
120 | ||
121 | %description -n vala-colord | |
122 | colord API for Vala language. | |
123 | ||
124 | %description -n vala-colord -l pl.UTF-8 | |
125 | API colord dla języka Vala. | |
126 | ||
127 | %package -n bash-completion-colord | |
128 | Summary: bash-completion for colormgr console commands | |
129 | Summary(pl.UTF-8): Bashowe uzupełnianie poleceń terminalowych colormgr | |
130 | Group: Applications/Shells | |
131 | Requires: bash-completion >= 2.0 | |
132 | BuildArch: noarch | |
133 | ||
134 | %description -n bash-completion-colord | |
135 | bash-completion for colormgr console commands. | |
136 | ||
137 | %description -n bash-completion-colord -l pl.UTF-8 | |
138 | Bashowe uzupełnianie poleceń terminalowych colormgr. | |
139 | ||
140 | %prep | |
141 | %setup -q | |
142 | ||
143 | %build | |
144 | %meson build \ | |
145 | %{!?with_apidocs:-Ddocs=false} \ | |
146 | -Dlibcolordcompat=true \ | |
147 | %{?with_sane:-Dsane=true} \ | |
148 | %{!?with_systemd:-Dsystemd=false} \ | |
149 | %{?with_vala:-Dvapi=true} \ | |
150 | -Ddaemon_user=colord | |
151 | ||
152 | %ninja_build -C build | |
153 | ||
154 | %install | |
155 | rm -rf $RPM_BUILD_ROOT | |
156 | ||
157 | %ninja_install -C build | |
158 | ||
159 | %find_lang %{name} | |
160 | ||
161 | %clean | |
162 | rm -rf $RPM_BUILD_ROOT | |
163 | ||
164 | %pre | |
165 | %groupadd -g 331 colord | |
166 | %useradd -u 331 -d /var/lib/colord -g colord -c "colord daemon user" colord | |
167 | ||
168 | %post | |
169 | %glib_compile_schemas | |
170 | ||
171 | %postun | |
172 | %systemd_reload | |
173 | if [ "$1" = "0" ]; then | |
174 | %glib_compile_schemas | |
175 | %userremove colord | |
176 | %groupremove colord | |
177 | fi | |
178 | ||
179 | %post libs -p /sbin/ldconfig | |
180 | %postun libs -p /sbin/ldconfig | |
181 | ||
182 | %files -f %{name}.lang | |
183 | %defattr(644,root,root,755) | |
184 | %doc AUTHORS NEWS README.md | |
185 | %attr(755,root,root) %{_bindir}/cd-create-profile | |
186 | %attr(755,root,root) %{_bindir}/cd-fix-profile | |
187 | %attr(755,root,root) %{_bindir}/cd-iccdump | |
188 | %attr(755,root,root) %{_bindir}/cd-it8 | |
189 | %attr(755,root,root) %{_bindir}/colormgr | |
190 | %attr(755,root,root) %{_libexecdir}/colord | |
191 | %{?with_sane:%attr(755,root,root) %{_libexecdir}/colord-sane} | |
192 | %attr(755,root,root) %{_libexecdir}/colord-session | |
193 | %dir %{_libdir}/colord-plugins | |
194 | %attr(755,root,root) %{_libdir}/colord-plugins/libcolord_sensor_camera.so | |
195 | %{?with_sane:%attr(755,root,root) %{_libdir}/colord-plugins/libcolord_sensor_sane.so} | |
196 | %attr(755,root,root) %{_libdir}/colord-plugins/libcolord_sensor_scanner.so | |
197 | %dir %{_libdir}/colord-sensors | |
198 | %attr(755,root,root) %{_libdir}/colord-sensors/libcolord_sensor_argyll.so | |
199 | %attr(755,root,root) %{_libdir}/colord-sensors/libcolord_sensor_colorhug.so | |
200 | %attr(755,root,root) %{_libdir}/colord-sensors/libcolord_sensor_dtp94.so | |
201 | %attr(755,root,root) %{_libdir}/colord-sensors/libcolord_sensor_dummy.so | |
202 | %attr(755,root,root) %{_libdir}/colord-sensors/libcolord_sensor_huey.so | |
203 | # disabled for now | |
204 | #%attr(755,root,root) %{_libdir}/colord-sensors/libcolord_sensor_munki.so | |
205 | %{_datadir}/colord | |
206 | %{_datadir}/color/icc/colord | |
207 | %{_datadir}/dbus-1/interfaces/org.freedesktop.ColorHelper.xml | |
208 | %{_datadir}/dbus-1/interfaces/org.freedesktop.ColorManager.Device.xml | |
209 | %{_datadir}/dbus-1/interfaces/org.freedesktop.ColorManager.Profile.xml | |
210 | %{_datadir}/dbus-1/interfaces/org.freedesktop.ColorManager.Sensor.xml | |
211 | %{_datadir}/dbus-1/interfaces/org.freedesktop.ColorManager.xml | |
212 | %{_datadir}/dbus-1/services/org.freedesktop.ColorHelper.service | |
213 | %{_datadir}/dbus-1/system-services/org.freedesktop.ColorManager.service | |
214 | %{_datadir}/dbus-1/system.d/org.freedesktop.ColorManager.conf | |
215 | %{_datadir}/glib-2.0/schemas/org.freedesktop.ColorHelper.gschema.xml | |
216 | %{_datadir}/polkit-1/actions/org.freedesktop.color.policy | |
217 | %{_mandir}/man1/cd-create-profile.1* | |
218 | %{_mandir}/man1/cd-fix-profile.1* | |
219 | %{_mandir}/man1/cd-it8.1* | |
220 | %{_mandir}/man1/colormgr.1* | |
221 | %if %{with systemd} | |
222 | %{systemdunitdir}/colord.service | |
223 | %{systemduserunitdir}/colord-session.service | |
224 | %{systemdtmpfilesdir}/colord.conf | |
225 | %endif | |
226 | /lib/udev/rules.d/69-cd-sensors.rules | |
227 | /lib/udev/rules.d/95-cd-devices.rules | |
228 | %attr(755,colord,colord) %dir /var/lib/colord | |
229 | %attr(755,colord,colord) %dir /var/lib/colord/icc | |
230 | ||
231 | %files libs | |
232 | %defattr(644,root,root,755) | |
233 | %attr(755,root,root) %{_libdir}/libcolord.so.*.*.* | |
234 | %attr(755,root,root) %ghost %{_libdir}/libcolord.so.2 | |
235 | %attr(755,root,root) %{_libdir}/libcolordcompat.so | |
236 | %attr(755,root,root) %{_libdir}/libcolordprivate.so.*.*.* | |
237 | %attr(755,root,root) %ghost %{_libdir}/libcolordprivate.so.2 | |
238 | %attr(755,root,root) %{_libdir}/libcolorhug.so.*.*.* | |
239 | %attr(755,root,root) %ghost %{_libdir}/libcolorhug.so.2 | |
240 | %{_libdir}/girepository-1.0/Colord-1.0.typelib | |
241 | %{_libdir}/girepository-1.0/Colorhug-1.0.typelib | |
242 | ||
243 | %files devel | |
244 | %defattr(644,root,root,755) | |
245 | %attr(755,root,root) %{_libdir}/libcolord.so | |
246 | %attr(755,root,root) %{_libdir}/libcolordprivate.so | |
247 | %attr(755,root,root) %{_libdir}/libcolorhug.so | |
248 | %{_includedir}/colord-1 | |
249 | %{_pkgconfigdir}/colord.pc | |
250 | %{_pkgconfigdir}/colorhug.pc | |
251 | %{_datadir}/gir-1.0/Colord-1.0.gir | |
252 | %{_datadir}/gir-1.0/Colorhug-1.0.gir | |
253 | ||
254 | %if %{with apidocs} | |
255 | %files apidocs | |
256 | %defattr(644,root,root,755) | |
257 | %{_gtkdocdir}/colord | |
258 | %endif | |
259 | ||
260 | %if %{with vala} | |
261 | %files -n vala-colord | |
262 | %defattr(644,root,root,755) | |
263 | %{_datadir}/vala/vapi/colord.deps | |
264 | %{_datadir}/vala/vapi/colord.vapi | |
265 | %endif | |
266 | ||
267 | %files -n bash-completion-colord | |
268 | %defattr(644,root,root,755) | |
269 | %{bash_compdir}/colormgr |