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