Gentoo Archives: gentoo-commits

From: "Saleem Abdulrasool (compnerd)" <compnerd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/hal: ChangeLog hal-0.5.10.ebuild
Date: Fri, 23 Nov 2007 06:29:59
Message-Id: E1IvS2x-00017f-RH@stork.gentoo.org
1 compnerd 07/11/23 06:29:51
2
3 Modified: ChangeLog
4 Added: hal-0.5.10.ebuild
5 Log:
6 version bump from upstream
7 (Portage version: 2.1.3.16)
8
9 Revision Changes Path
10 1.215 sys-apps/hal/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/hal/ChangeLog?rev=1.215&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/hal/ChangeLog?rev=1.215&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/hal/ChangeLog?r1=1.214&r2=1.215
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v
19 retrieving revision 1.214
20 retrieving revision 1.215
21 diff -u -r1.214 -r1.215
22 --- ChangeLog 22 Nov 2007 18:29:46 -0000 1.214
23 +++ ChangeLog 23 Nov 2007 06:29:51 -0000 1.215
24 @@ -1,6 +1,13 @@
25 # ChangeLog for sys-apps/hal
26 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.214 2007/11/22 18:29:46 cardoe Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.215 2007/11/23 06:29:51 compnerd Exp $
29 +
30 +*hal-0.5.10 (23 Nov 2007)
31 +
32 + 23 Nov 2007; Saleem Abdulrasool <compnerd@g.o>
33 + +files/0.5.10-hald.conf, +files/0.5.10-hald.rc,
34 + +files/hal-0.5.9-hide-recovery-partitions.patch, +hal-0.5.10.ebuild:
35 + Version bump from upstream
36
37 22 Nov 2007; Doug Klima <cardoe@g.o> metadata.xml:
38 Provide explicit USE flag descriptions in metadata.xml
39
40
41
42 1.1 sys-apps/hal/hal-0.5.10.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/hal/hal-0.5.10.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/hal/hal-0.5.10.ebuild?rev=1.1&content-type=text/plain
46
47 Index: hal-0.5.10.ebuild
48 ===================================================================
49 # Copyright 1999-2007 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.10.ebuild,v 1.1 2007/11/23 06:29:51 compnerd Exp $
52
53 inherit eutils linux-info autotools flag-o-matic
54
55 DESCRIPTION="Hardware Abstraction Layer"
56 HOMEPAGE="http://www.freedesktop.org/Software/hal"
57 SRC_URI="http://hal.freedesktop.org/releases/${P}.tar.gz"
58
59 LICENSE="|| ( GPL-2 AFL-2.0 )"
60 SLOT="0"
61 KEYWORDS="~amd64 -mips -ppc64 ~x86"
62
63 KERNEL_IUSE="kernel_linux kernel_FreeBSD"
64 IUSE="acpi apm crypt debug dell disk-partition doc selinux ${KERNEL_IUSE}"
65
66 RDEPEND=">=dev-libs/glib-2.6
67 >=dev-libs/dbus-glib-0.61
68 >=dev-libs/expat-1.95.8
69 >=sys-apps/pciutils-2.2.7-r1
70 >=dev-libs/libusb-0.1.10a
71 >=dev-util/gperf-3.0.3
72 >=sys-auth/consolekit-0.2
73 >=sys-auth/policykit-0.6
74 sys-apps/usbutils
75 virtual/eject
76 amd64? ( >=sys-apps/dmidecode-2.7 )
77 dell? ( >=sys-libs/libsmbios-0.13.4 )
78 disk-partition? (
79 || (
80 ~sys-apps/parted-1.7.1
81 ~sys-apps/parted-1.8.6
82 ~sys-apps/parted-1.8.7
83 )
84 )
85 ia64? ( >=sys-apps/dmidecode-2.7 )
86 kernel_linux? (
87 >=sys-fs/udev-111
88 >=sys-apps/util-linux-2.13
89 >=sys-kernel/linux-headers-2.6.19
90 crypt? (
91 || (
92 >=sys-fs/cryptsetup-1.0.5
93 >=sys-fs/cryptsetup-luks-1.0.1
94 )
95 )
96 )
97 kernel_FreeBSD? ( dev-libs/libvolume_id )
98 x86? ( >=sys-apps/dmidecode-2.7 )
99 selinux? ( sys-libs/libselinux sec-policy/selinux-hal )"
100 DEPEND="${RDEPEND}
101 dev-util/pkgconfig
102 >=dev-util/intltool-0.35
103 doc? (
104 app-doc/doxygen
105 app-text/docbook-sgml-utils
106 app-text/xmlto
107 dev-libs/libxml2
108 )"
109 PDEPEND=">=app-misc/hal-info-20071011
110 >=sys-power/pm-utils-0.99.3"
111
112 ## HAL Daemon drops privledges so we need group access to read disks
113 HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
114 HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator"
115
116 function notify_uevent() {
117 ewarn
118 ewarn "You must enable Kernel Userspace Events in your kernel."
119 ewarn "For this you need to enable 'Hotplug' under 'General Setup' and"
120 ewarn "basic networking. They are marked CONFIG_HOTPLUG and CONFIG_NET"
121 ewarn "in the config file."
122 ewarn
123 ebeep 5
124 }
125
126 function notify_inotify() {
127 ewarn
128 ewarn "You must enable the Inotify system in your kernel."
129 ewarn "For this you need to enable 'Inotify support for userspace'"
130 ewarn "in 'File systems'. It is marked CONFIG_INOTIFY_USER in the config file."
131 ewarn
132 ebeep 5
133 }
134
135 function notify_acpi_procfs() {
136 ewarn
137 ewarn "You must enable support for the ACPI proc files in your kernel."
138 ewarn "For this you need to enable '/proc/acpi files' in"
139 ewarn "'ACPI Support (Advanced Configuration and Power Interface) Support'."
140 ewarn "It is marked ewarn CONFIG_ACPI_PROCFS in the config file."
141 ewarn
142 ebeep 5
143 }
144
145 function notify_acpi_proc_event() {
146 ewarn
147 ewarn "You have not enabled support for the /proc/acpi/event interface."
148 ewarn "For this you need to enable '/proc/acpi/event support' in"
149 ewarn "ACPI Support (Advanced Configuration and Power Interface) Support"
150 ewarn
151 ebeep 5
152 }
153
154 pkg_setup() {
155 if use kernel_linux; then
156 kernel_is ge 2 6 19 || ewarn "HAL requires a kernel version 2.6.19 or newer"
157
158 if ! ( linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET )
159 then
160 notify_uevent
161 fi
162
163 linux_chkconfig_present INOTIFY_USER || notify_inotify
164
165 if use acpi ; then
166 linux_chkconfig_present ACPI_PROCFS || notify_acpi_procfs
167 linux_chkconfig_present ACPI_PROC_EVENT || notify_acpi_proc_event
168 fi
169 fi
170
171 # http://devmanual.gentoo.org/ebuild-writing/functions/
172 # http://bugs.gentoo.org/show_bug.cgi?id=191605
173
174 # Create groups for hotplugging and HAL
175 enewgroup haldaemon || die "Problem adding haldaemon group"
176 enewgroup plugdev || die "Problem adding plugdev group"
177
178 # HAL drops priviledges by default now ...
179 # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups)
180 if use kernel_linux; then
181 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_LINUX} \
182 || die "Problem adding haldaemon user"
183 elif use kernel_FreeBSD; then
184 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_FREEBSD} \
185 || die "Problem addding haldaemon user"
186 fi
187
188 # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS}
189 # If users have a problem with this, let them file a bug
190 if [[ ${ROOT} == / ]] ; then
191 if use kernel_linux; then
192 usermod -G ${HALDAEMON_GROUPS_LINUX} haldaemon
193 elif use kernel_FreeBSD; then
194 pw usermod haldaemon -G ${HALDAEMON_GROUPS_FREEBSD}
195 fi
196 fi
197 }
198
199 src_unpack() {
200 unpack ${A}
201 cd "${S}"
202
203 # Hide recovery partitions
204 epatch "${FILESDIR}/hal-0.5.9-hide-recovery-partitions.patch"
205
206 # Enable plugdev support
207 epatch "${FILESDIR}/0.5.9/96_plugdev_allow_send.patch"
208 }
209
210 src_compile() {
211 local acpi="$(use_enable acpi)"
212 local backend=
213 local hardware=
214
215 append-flags -rdynamic
216
217 if use kernel_linux ; then
218 backend="linux"
219 elif use kernel_FreeBSD ; then
220 backend="freebsd"
221 else
222 eerror "Invalid backend"
223 fi
224
225 if use kernel_linux ; then
226 if use acpi ; then
227 # Using IBM ACPI and Toshiba ACPI results in double notification as this
228 # was merged into the Linux Kernel 2.6.22
229 if kernel_is lt 2 6 22 ; then
230 acpi="$acpi --enable-acpi-ibm --enable-acpi-toshiba"
231 else
232 acpi="$acpi --disable-acpi-ibm --disable-acpi-toshiba"
233 fi
234
235 acpi="$acpi --enable-acpi-proc --enable-acpi-acpid"
236 else
237 acpi="$acpi --disable-acpi-ibm --disable-acpi-toshiba"
238 acpi="$acpi --disable-acpi-proc --disable-acpi-acpid"
239 fi
240
241 hardware="--with-cpufreq --with-usb-csr --with-keymaps"
242 use arm && hardware="$hardware --enable-omap"
243
244 if use dell ; then
245 hardware="$hardware --with-dell-backlight"
246 else
247 hardware="$hardware --without-dell-backlight"
248 fi
249 else
250 hardware="--without-cpufreq --without-usb-csr --without-keymaps"
251 hardware="$hardware --disable-omap"
252 hardware="$hardware --without-dell-backlight"
253 hardware="$hardware --enable-acpi-ibm --enable-acpi-toshiba"
254 fi
255
256 econf --with-backend=${backend} \
257 --with-os-type=gentoo \
258 --with-pid-file=/var/run/hald.pid \
259 --with-hwdata=/usr/share/misc \
260 --with-socket-dir=/var/run/hald \
261 --enable-umount-helper \
262 --enable-man-pages \
263 --enable-policy-kit \
264 --enable-console-kit \
265 --enable-acl-management \
266 --enable-pci \
267 --enable-sonypic \
268 $(use_enable apm) \
269 $(use_enable arm pmu) \
270 $(use_enable arm omap) \
271 $(use_enable debug verbose-mode) \
272 $(use_enable disk-partition parted) \
273 $(use_enable doc docbook-docs) \
274 $(use_enable doc doxygen-docs) \
275 --docdir=/usr/share/doc/${PF} \
276 --localstatedir=/var \
277 ${acpi} ${hardware} \
278 || die "configure failed"
279
280 emake || die "make failed"
281 }
282
283 src_install() {
284 make DESTDIR="${D}" install || die
285 dodoc AUTHORS ChangeLog NEWS README
286
287 # remove dep on gnome-python
288 mv "${D}"/usr/bin/hal-device-manager "${D}"/usr/share/hal/device-manager/
289
290 # hal umount for unclean unmounts
291 exeinto /lib/udev/
292 newexe "${FILESDIR}"/hal-unmount.dev hal_unmount
293
294 # initscript
295 newinitd "${FILESDIR}"/0.5.10-hald.rc hald
296
297 # configuration
298 cp "${FILESDIR}"/0.5.10-hald.conf "${WORKDIR}"/
299
300 if use debug; then
301 sed -e 's:HALD_VERBOSE="no":HALD_VERBOSE="yes":' \
302 -i "${WORKDIR}"/0.5.10-hald.conf
303 fi
304 newconfd "${WORKDIR}"/0.5.10-hald.conf hald
305
306 # We now create and keep /media here as both gnome-mount and pmount
307 # use these directories, to avoid collision.
308 keepdir /media
309
310 # We also need to create and keep /etc/fdi/{information,policy,preprobe}
311 # or else hal bombs.
312 keepdir /etc/hal/fdi/{information,policy,preprobe}
313
314 # HAL stores it's fdi cache in /var/lib/cache/hald
315 keepdir /var/lib/cache/hald
316
317 # HAL keeps its unix socket here
318 keepdir /var/run/hald
319 keepdir /var/lib/hal
320 }
321
322 pkg_postinst() {
323 # Despite what people keep changing this location. Either one works.. it doesn't matter
324 # http://dev.gentoo.org/~plasmaroo/devmanual/ebuild-writing/functions/
325
326 elog "The HAL daemon needs to be running for certain applications to"
327 elog "work. Suggested is to add the init script to your start-up"
328 elog "scripts, this should be done like this :"
329 elog "\`rc-update add hald default\`"
330 echo
331 elog "Looking for automounting support? Add yourself to the plugdev group"
332
333 elog "IF you have additional applications which consume ACPI events, you"
334 elog "should consider installing acpid to allow applications to share ACPI"
335 elog "events."
336 }
337
338
339
340 --
341 gentoo-commits@g.o mailing list