/[gentoo-x86]/sys-apps/hal/hal-0.5.9.ebuild
Gentoo

Diff of /sys-apps/hal/hal-0.5.9.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.15 Revision 1.18
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/Attic/hal-0.5.9.ebuild,v 1.15 2007/04/11 15:19:58 cardoe Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/Attic/hal-0.5.9.ebuild,v 1.18 2007/04/12 16:43:50 cardoe Exp $
4 4
5inherit eutils linux-info autotools flag-o-matic 5inherit eutils linux-info autotools flag-o-matic
6 6
7DESCRIPTION="Hardware Abstraction Layer" 7DESCRIPTION="Hardware Abstraction Layer"
8HOMEPAGE="http://www.freedesktop.org/Software/hal" 8HOMEPAGE="http://www.freedesktop.org/Software/hal"
41 doc? ( app-doc/doxygen app-text/docbook-sgml-utils )" 41 doc? ( app-doc/doxygen app-text/docbook-sgml-utils )"
42 42
43PDEPEND="app-misc/hal-info" 43PDEPEND="app-misc/hal-info"
44 44
45## HAL Daemon drops privledges so we need group access to read disks 45## HAL Daemon drops privledges so we need group access to read disks
46HALDAEMON_GROUPS="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb" 46HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
47HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator"
47 48
48function notify_uevent() { 49function notify_uevent() {
49 ewarn 50 ewarn
50 ewarn "You must enable Kernel Userspace Events in your kernel." 51 ewarn "You must enable Kernel Userspace Events in your kernel."
51 ewarn "For this you need to enable 'Hotplug' under 'General Setup' and" 52 ewarn "For this you need to enable 'Hotplug' under 'General Setup' and"
73 ewarn 74 ewarn
74 ebeep 5 75 ebeep 5
75} 76}
76 77
77pkg_setup() { 78pkg_setup() {
79 if use kernel_linux; then
78 kernel_is ge 2 6 17 || ewarn "HAL requires a kernel version 2.6.17 or newer" 80 kernel_is ge 2 6 17 || ewarn "HAL requires a kernel version 2.6.17 or newer"
79 81
80 if ! ( linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET ) 82 if ! ( linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET )
81 then 83 then
82 notify_uevent 84 notify_uevent
83 fi 85 fi
84 86
85 linux_chkconfig_present INOTIFY_USER || notify_inotify 87 linux_chkconfig_present INOTIFY_USER || notify_inotify
86 88
87 if use acpi ; then 89 if use acpi ; then
88 linux_chkconfig_present PROC_FS || notify_procfs 90 linux_chkconfig_present PROC_FS || notify_procfs
91 fi
89 fi 92 fi
90 93
91 if [[ -d ${ROOT}/etc/hal/device.d ]]; then 94 if [[ -d ${ROOT}/etc/hal/device.d ]]; then
92 eerror "HAL 0.5.x will not run with the HAL 0.4.x series of" 95 eerror "HAL 0.5.x will not run with the HAL 0.4.x series of"
93 eerror "/etc/hal/device.d/ so please remove this directory" 96 eerror "/etc/hal/device.d/ so please remove this directory"
101 unpack ${A} 104 unpack ${A}
102 cd ${S} 105 cd ${S}
103 106
104 # Gentoo Patch Set 107 # Gentoo Patch Set
105 EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch ${FILESDIR}/${PV} 108 EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch ${FILESDIR}/${PV}
109
110 eautoreconf
106} 111}
107 112
108src_compile() { 113src_compile() {
109 local backend="" 114 local backend=""
110 local acpi="" 115 local acpi=""
189 enewgroup haldaemon || die "Problem adding haldaemon group" 194 enewgroup haldaemon || die "Problem adding haldaemon group"
190 enewgroup plugdev || die "Problem adding plugdev group" 195 enewgroup plugdev || die "Problem adding plugdev group"
191 196
192 # HAL drops priviledges by default now ... 197 # HAL drops priviledges by default now ...
193 # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups) 198 # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups)
194 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS} || die "Problem adding haldaemon user" 199 if use kernel_linux; then
200 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_LINUX} \
201 || die "Problem adding haldaemon user"
202 elif use kernel_FreeBSD; then
203 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_FREEBSD} \
204 || die "Problem addding haldaemon user"
205 fi
195 206
196 # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS} 207 # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS}
197 # If users have a problem with this, let them file a bug 208 # If users have a problem with this, let them file a bug
209 if use kernel_linux; then
198 usermod -G ${HALDAEMON_GROUPS} haldaemon 210 usermod -G ${HALDAEMON_GROUPS_LINUX} haldaemon
211 elif use kernel_FreeBSD; then
212 usermod -G ${HALDAEMON_GROUPS_FREEBSD} haldaemon
213 fi
199 214
200 elog "The HAL daemon needs to be running for certain applications to" 215 elog "The HAL daemon needs to be running for certain applications to"
201 elog "work. Suggested is to add the init script to your start-up" 216 elog "work. Suggested is to add the init script to your start-up"
202 elog "scripts, this should be done like this :" 217 elog "scripts, this should be done like this :"
203 elog "\`rc-update add hald default\`" 218 elog "\`rc-update add hald default\`"

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.20