]>
Commit | Line | Data |
---|---|---|
fcc19dbc PS |
1 | # |
2 | # Conditional build: | |
7dc92a3c | 3 | %bcond_without doc # disable documentation building |
4c998803 | 4 | %bcond_with policykit # http://lists.pld-linux.org/mailman/pipermail/pld-devel-pl/2010-January/150972.html |
19642e0e | 5 | %bcond_without consolekit # ConsoleKit support |
d8e90509 | 6 | |
7718c825 | 7 | Summary: HAL - Hardware Abstraction Layer |
4c670616 | 8 | Summary(pl.UTF-8): HAL - abstrakcyjna warstwa dostępu do sprzętu |
7718c825 | 9 | Name: hal |
e8c4452e | 10 | Version: 0.5.14 |
d98b0617 | 11 | Release: 13 |
7718c825 | 12 | License: AFL v2.0 or GPL v2 |
13 | Group: Libraries | |
949f2166 | 14 | Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz |
e8c4452e | 15 | # Source0-md5: e9163df591a6f38f59fdbfe33e73bf20 |
60a73517 SP |
16 | Source1: %{name}daemon.init |
17 | Source2: %{name}d.sysconfig | |
f231d23a | 18 | Source3: %{name}-storage-policy-fixed-drives.fdi |
d8e90509 | 19 | Source4: %{name}daemon.upstart |
f231d23a | 20 | Patch0: %{name}-tools.patch |
c7ea696a | 21 | Patch1: %{name}-ac.patch |
6ae8a7dc | 22 | Patch2: %{name}-link.patch |
539a28e8 | 23 | Patch3: %{name}-rethink.patch |
4c831c62 JR |
24 | Patch4: %{name}-showexec.patch |
25 | Patch5: %{name}-x11-zap.patch | |
5bd6d3ff | 26 | Patch6: %{name}-out.patch |
ed14ca9b | 27 | Patch7: %{name}-fixes.patch |
19642e0e | 28 | Patch8: %{name}-kill-v4l1.patch |
7718c825 | 29 | URL: http://freedesktop.org/Software/hal |
d5bed34d | 30 | %{?with_consolekit:BuildRequires: ConsoleKit-devel} |
4c998803 | 31 | %{?with_policykit:BuildRequires: PolicyKit-devel >= 0.7} |
c7ea696a JB |
32 | BuildRequires: autoconf >= 2.60 |
33 | BuildRequires: automake >= 1:1.9 | |
98ba1c22 | 34 | BuildRequires: dbus-glib-devel >= 0.71 |
7dc92a3c | 35 | %if %{with doc} |
82a991de | 36 | BuildRequires: docbook-dtd41-sgml |
6be4bb7e | 37 | BuildRequires: docbook-dtd412-xml |
82a991de | 38 | BuildRequires: docbook-utils |
39 | BuildRequires: doxygen | |
40 | %endif | |
3c9be745 | 41 | BuildRequires: expat-devel >= 1:1.95.8 |
e9fa310a | 42 | BuildRequires: gettext-devel |
c7ea696a | 43 | BuildRequires: glib2-devel >= 1:2.14.0 |
f231d23a | 44 | BuildRequires: gperf |
01e17c84 | 45 | %if %{with doc} |
6ae8a7dc | 46 | BuildRequires: gtk-doc >= 1.3 |
01e17c84 | 47 | %endif |
f14fe767 | 48 | BuildRequires: intltool >= 0.22 |
ec9dd7ad | 49 | BuildRequires: libblkid-devel >= 2.15 |
6ae8a7dc JB |
50 | %ifarch %{ix86} %{x8664} |
51 | BuildRequires: libsmbios-devel >= 0.13.4 | |
52 | %endif | |
7718c825 | 53 | BuildRequires: libtool |
3ea366a9 | 54 | BuildRequires: libusb-compat-devel |
59fe8435 JB |
55 | # 1.7.1 or 1.8.0+ |
56 | BuildRequires: parted-devel >= 1.8.0 | |
3c9be745 | 57 | BuildRequires: pciutils-devel >= 2.2.3 |
b0245b7e | 58 | BuildRequires: pkgconfig |
b0245b7e | 59 | BuildRequires: python-modules |
afa9607f | 60 | BuildRequires: rpm-pythonprov |
044de027 | 61 | BuildRequires: rpmbuild(macros) >= 1.228 |
b0245b7e | 62 | BuildRequires: which |
68afb106 | 63 | BuildRequires: xmlto |
3c9be745 | 64 | # R: cryptsetup-luks >= 1.0.1 (at runtime) |
6be4bb7e | 65 | Requires(post,preun): /sbin/chkconfig |
8ea667fd | 66 | Requires(pre): /bin/id |
6be4bb7e | 67 | Requires(pre): /usr/bin/getgid |
c6a3a030 | 68 | Requires(pre): /usr/bin/polkit-auth |
8ea667fd | 69 | Requires(pre): /usr/sbin/groupadd |
70 | Requires(pre): /usr/sbin/useradd | |
d531c3ca | 71 | Requires: rc-scripts >= 0.4.3.0 |
d736641f | 72 | %pyrequires_eq python |
45d9e072 | 73 | Requires: %{name}-libs = %{version}-%{release} |
4c998803 | 74 | %if %{with policykit} |
044c1d2a | 75 | Requires: PolicyKit >= 0.7 |
4c998803 | 76 | %else |
d5bed34d | 77 | %if %{with consolekit} |
4c998803 AM |
78 | Requires: ConsoleKit |
79 | %endif | |
d5bed34d | 80 | %endif |
98ba1c22 | 81 | Requires: dbus >= 0.91 |
3c9be745 | 82 | Requires: dmidecode >= 2.7 |
c7ea696a | 83 | Requires: glib2 >= 1:2.14.0 |
c771b7c2 | 84 | Requires: hal-info |
98ba1c22 | 85 | Requires: python-dbus >= 0.71 |
9d460961 | 86 | Requires: udev-acl |
ec9dd7ad | 87 | Requires: udev-core >= 1:125 |
6ae8a7dc JB |
88 | # require pciutils and usbutils with .ids in expected location |
89 | Requires: /etc/pci.ids | |
90 | Requires: /etc/usb.ids | |
f231d23a | 91 | Obsoletes: hal-device-manager |
d736641f | 92 | Obsoletes: hal-fstab-sync |
7718c825 | 93 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
94 | ||
6f4205b6 AM |
95 | %define _libexecdir %{_libdir}/%{name} |
96 | ||
7718c825 | 97 | %description |
98 | HAL is an implementation of a hardware abstraction layer. | |
99 | ||
bfb4c1b6 JR |
100 | %description -l pl.UTF-8 |
101 | HAL jest implementacją abstrakcyjnej warstwy dostępu do sprzętu. | |
7718c825 | 102 | |
4405b987 JB |
103 | %package libs |
104 | Summary: HAL library | |
4c670616 | 105 | Summary(pl.UTF-8): Biblioteka HAL |
4405b987 | 106 | Group: Libraries |
98ba1c22 | 107 | Requires: dbus-libs >= 0.91 |
4405b987 JB |
108 | |
109 | %description libs | |
110 | HAL library. | |
111 | ||
bfb4c1b6 | 112 | %description libs -l pl.UTF-8 |
4405b987 JB |
113 | Biblioteka HAL. |
114 | ||
7718c825 | 115 | %package devel |
116 | Summary: Header files for HAL library | |
4c670616 | 117 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki HAL |
7718c825 | 118 | Group: Development/Libraries |
3861dc0b | 119 | Requires: %{name}-libs = %{version}-%{release} |
98ba1c22 | 120 | Requires: dbus-devel >= 0.91 |
7718c825 | 121 | |
122 | %description devel | |
123 | Header files for HAL library. | |
124 | ||
bfb4c1b6 JR |
125 | %description devel -l pl.UTF-8 |
126 | Pliki nagłówkowe biblioteki HAL. | |
7718c825 | 127 | |
128 | %package static | |
129 | Summary: Static HAL library | |
4c670616 | 130 | Summary(pl.UTF-8): Statyczna biblioteka HAL |
7718c825 | 131 | Group: Development/Libraries |
8ea667fd | 132 | Requires: %{name}-devel = %{version}-%{release} |
7718c825 | 133 | |
134 | %description static | |
135 | Static HAL library. | |
136 | ||
bfb4c1b6 | 137 | %description static -l pl.UTF-8 |
7718c825 | 138 | Statyczna biblioteka HAL. |
139 | ||
8f20411f JB |
140 | %package apidocs |
141 | Summary: HAL API documentation | |
4c670616 | 142 | Summary(pl.UTF-8): Dokumentacja API biblioteki HAL |
8f20411f JB |
143 | Group: Documentation |
144 | Requires: gtk-doc-common | |
145 | ||
146 | %description apidocs | |
147 | HAL API documentation. | |
148 | ||
bfb4c1b6 | 149 | %description apidocs -l pl.UTF-8 |
8f20411f JB |
150 | Dokumentacja API biblioteki HAL. |
151 | ||
7718c825 | 152 | %prep |
949f2166 | 153 | %setup -q |
f14fe767 | 154 | %patch0 -p1 |
c7ea696a | 155 | %patch1 -p1 |
6ae8a7dc | 156 | %patch2 -p1 |
25541660 | 157 | %patch3 -p1 |
4c831c62 JR |
158 | %patch4 -p1 |
159 | %patch5 -p1 | |
5bd6d3ff | 160 | %patch6 -p1 |
ed14ca9b | 161 | %patch7 -p1 |
19642e0e | 162 | %patch8 -p1 |
7718c825 | 163 | |
164 | %build | |
f72fa6f1 | 165 | %{__rm} acinclude.m4 |
b66a397f | 166 | %{__gtkdocize} |
7718c825 | 167 | %{__libtoolize} |
168 | %{__aclocal} | |
0904f2a2 | 169 | %{__autoheader} |
7718c825 | 170 | %{__autoconf} |
171 | %{__automake} | |
172 | %configure \ | |
68afb106 | 173 | POLKIT_POLICY_FILE_VALIDATE=%{_bindir}/polkit-policy-file-validate \ |
e9ff872e BZ |
174 | --%{?with_doc:en}%{!?with_doc:dis}able-docbook-docs \ |
175 | --%{?with_doc:en}%{!?with_doc:dis}able-gtk-doc \ | |
f72fa6f1 | 176 | --disable-silent-rules \ |
9e96b47c | 177 | %{?with_policykit:--enable-acl-management} \ |
012995c0 AM |
178 | --enable-acpi-ibm \ |
179 | --enable-acpi-toshiba \ | |
d8e90509 | 180 | --%{!?with_consolekit:dis}%{?with_consolekit:en}able-console-kit \ |
6ae8a7dc | 181 | --enable-parted \ |
d8e90509 | 182 | --%{!?with_policykit:dis}%{?with_policykit:en}able-policy-kit \ |
012995c0 AM |
183 | --enable-sonypic \ |
184 | --enable-umount-helper \ | |
6ae8a7dc JB |
185 | --with-cpufreq \ |
186 | --with-html-dir=%{_gtkdocdir} \ | |
68afb106 | 187 | --with-hwdata=%{_sysconfdir} \ |
d8e90509 | 188 | --with-udev-prefix=/lib \ |
cf8c7f67 | 189 | %ifarch %{ix86} %{x8664} |
012995c0 AM |
190 | --with-macbook \ |
191 | --with-macbookpro \ | |
cf8c7f67 | 192 | %endif |
6ae8a7dc JB |
193 | --with-pid-file=%{_localstatedir}/run/hald.pid \ |
194 | --with-usb-csr | |
7718c825 | 195 | %{__make} |
196 | ||
197 | %install | |
198 | rm -rf $RPM_BUILD_ROOT | |
8ea667fd | 199 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \ |
d8e90509 | 200 | $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d,init},%{_desktopdir}} \ |
68afb106 | 201 | $RPM_BUILD_ROOT%{_sysconfdir}/hal/fdi/{information,policy,preprobe} \ |
d8e90509 | 202 | $RPM_BUILD_ROOT/lib/udev/rules.d |
7718c825 | 203 | |
204 | %{__make} install \ | |
205 | DESTDIR=$RPM_BUILD_ROOT | |
206 | ||
f231d23a | 207 | #find $RPM_BUILD_ROOT%{_datadir}/hal/device-manager -name "*.py" -exec rm -f {} \; |
8e7c4987 | 208 | |
d8e90509 ER |
209 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/haldaemon |
210 | cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/init/haldaemon.conf | |
211 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/hald | |
337f63c0 | 212 | |
d736641f | 213 | # policy file to ignore fixed disks. |
d8e90509 | 214 | cp -p %{SOURCE3} \ |
d736641f | 215 | $RPM_BUILD_ROOT%{_datadir}/%{name}/fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi |
ce201e78 | 216 | |
337f63c0 | 217 | rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/hotplug.d |
d736641f | 218 | rm -rf $RPM_BUILD_ROOT%{_libdir}/hal.hotplug |
d8e90509 | 219 | rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name} |
aed133f7 | 220 | |
7718c825 | 221 | %clean |
222 | rm -rf $RPM_BUILD_ROOT | |
223 | ||
8ea667fd | 224 | %pre |
7f90f577 ER |
225 | %groupadd -g 126 -r -f haldaemon |
226 | %useradd -u 126 -r -d /usr/share/empty -s /bin/false -c "HAL daemon" -g haldaemon haldaemon | |
4c998803 | 227 | %{?with_policykit:/usr/bin/polkit-auth --user haldaemon --grant org.freedesktop.policykit.read 2> /dev/null || :} |
044c1d2a | 228 | |
7718c825 | 229 | %post |
8ea667fd | 230 | /sbin/chkconfig --add haldaemon |
ac1c9f67 | 231 | %service haldaemon restart |
7718c825 | 232 | |
8ea667fd | 233 | %preun |
ac1c9f67 | 234 | if [ "$1" = "0" ]; then |
235 | %service -q haldaemon stop | |
8ea667fd | 236 | /sbin/chkconfig --del haldaemon |
237 | fi | |
93e047bb | 238 | |
7cca35d3 | 239 | %post libs -p /sbin/ldconfig |
240 | %postun libs -p /sbin/ldconfig | |
60a73517 | 241 | |
e10cfd0c | 242 | |
f231d23a | 243 | %files |
7718c825 | 244 | %defattr(644,root,root,755) |
f231d23a | 245 | %doc AUTHORS NEWS README doc/TODO |
6ddae4f3 | 246 | %attr(755,root,root) %{_bindir}/hal-device |
d257104b | 247 | %attr(755,root,root) %{_bindir}/hal-disable-polling |
6ddae4f3 | 248 | %attr(755,root,root) %{_bindir}/hal-find-by-capability |
249 | %attr(755,root,root) %{_bindir}/hal-find-by-property | |
0c9a4de6 | 250 | %attr(755,root,root) %{_bindir}/hal-get-property |
d257104b | 251 | %attr(755,root,root) %{_bindir}/hal-is-caller-locked-out |
9e96b47c | 252 | %{?with_policykit:%attr(755,root,root) %{_bindir}/hal-is-caller-privileged} |
d257104b | 253 | %attr(755,root,root) %{_bindir}/hal-lock |
0c9a4de6 | 254 | %attr(755,root,root) %{_bindir}/hal-set-property |
f231d23a | 255 | %attr(755,root,root) %{_bindir}/hal-setup-keymap |
0c9a4de6 | 256 | %attr(755,root,root) %{_bindir}/lshal |
d736641f | 257 | %attr(755,root,root) %{_sbindir}/hald |
f231d23a | 258 | %attr(755,root,root) /sbin/umount.hal |
6f4205b6 AM |
259 | %dir %{_libexecdir} |
260 | %attr(755,root,root) %{_libexecdir}/hald-* | |
d736641f | 261 | %attr(755,root,root) %{_libexecdir}/hal-* |
262 | %dir %{_libdir}/hal | |
263 | %dir %{_libdir}/hal/scripts | |
264 | %attr(755,root,root) %{_libdir}/hal/scripts/* | |
265 | ||
e8a9898d JB |
266 | %dir %{_sysconfdir}/%{name} |
267 | %{_sysconfdir}/%{name}/fdi | |
337f63c0 | 268 | |
d8e90509 ER |
269 | %attr(754,root,root) /etc/rc.d/init.d/haldaemon |
270 | %config(noreplace) %verify(not md5 mtime size) /etc/init/haldaemon.conf | |
cd6b1e16 | 271 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/hald |
65e44aa2 | 272 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dbus*/system.d/hal.conf |
d8e90509 | 273 | /lib/udev/rules.d/90-hal.rules |
4c998803 | 274 | %{?with_policykit:%config(noreplace) %verify(not md5 mtime size) %{_datadir}/PolicyKit/policy/*.policy} |
6be4bb7e | 275 | |
8e7c4987 | 276 | %dir %{_datadir}/%{name} |
cd6b1e16 | 277 | %{_datadir}/%{name}/fdi |
7718c825 | 278 | |
d257104b | 279 | %dir /var/cache/hald |
d257104b | 280 | %dir /var/run/hald |
281 | %dir /var/run/hald/hald-local | |
282 | %dir /var/run/hald/hald-runner | |
283 | ||
cd808d48 | 284 | %{_mandir}/man[18]/* |
d257104b | 285 | |
4405b987 JB |
286 | %files libs |
287 | %defattr(644,root,root,755) | |
65e44aa2 | 288 | %attr(755,root,root) %{_libdir}/libhal.so.*.*.* |
40046832 | 289 | %attr(755,root,root) %ghost %{_libdir}/libhal.so.1 |
65e44aa2 | 290 | %attr(755,root,root) %{_libdir}/libhal-storage.so.*.*.* |
40046832 | 291 | %attr(755,root,root) %ghost %{_libdir}/libhal-storage.so.1 |
4405b987 | 292 | |
7718c825 | 293 | %files devel |
294 | %defattr(644,root,root,755) | |
65e44aa2 JB |
295 | %attr(755,root,root) %{_libdir}/libhal.so |
296 | %attr(755,root,root) %{_libdir}/libhal-storage.so | |
297 | %{_libdir}/libhal.la | |
298 | %{_libdir}/libhal-storage.la | |
7718c825 | 299 | %{_includedir}/%{name} |
300 | %{_pkgconfigdir}/*.pc | |
301 | ||
302 | %files static | |
303 | %defattr(644,root,root,755) | |
65e44aa2 JB |
304 | %{_libdir}/libhal.a |
305 | %{_libdir}/libhal-storage.a | |
0c9a4de6 | 306 | |
8f20411f JB |
307 | %files apidocs |
308 | %defattr(644,root,root,755) | |
d257104b | 309 | %{_gtkdocdir}/libhal |
310 | %{_gtkdocdir}/libhal-storage |