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