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

Diff of /sys-apps/hal/hal-0.5.9.1-r3.ebuild

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

Revision 1.2 Revision 1.13
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2009 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.1-r3.ebuild,v 1.2 2007/11/12 16:13:28 armin76 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/Attic/hal-0.5.9.1-r3.ebuild,v 1.13 2009/02/05 10:18:24 chainsaw 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"
9SRC_URI="http://people.freedesktop.org/~david/dist/${P}.tar.gz 9SRC_URI="http://people.freedesktop.org/~david/dist/${P}.tar.gz
10 http://dev.gentoo.org/~cardoe/files/hal/${P}-r2.tar.bz2" 10 http://dev.gentoo.org/~cardoe/files/hal/${P}-r2.tar.bz2"
11 11
12LICENSE="|| ( GPL-2 AFL-2.0 )" 12LICENSE="|| ( GPL-2 AFL-2.0 )"
13SLOT="0" 13SLOT="0"
14KEYWORDS="alpha ~amd64 ~arm ~hppa ia64 -mips ~ppc -ppc64 ~sh sparc x86 ~x86-fbsd" 14KEYWORDS="alpha amd64 arm hppa ia64 -mips ppc -ppc64 sh sparc x86 ~x86-fbsd"
15 15
16KERNEL_IUSE="kernel_linux kernel_FreeBSD" 16KERNEL_IUSE="kernel_linux kernel_FreeBSD"
17IUSE="acpi crypt debug dell disk-partition doc pcmcia selinux ${KERNEL_IUSE}" 17IUSE="acpi crypt debug dell disk-partition doc pcmcia selinux ${KERNEL_IUSE}"
18 18
19RDEPEND=">=dev-libs/glib-2.6 19RDEPEND=">=dev-libs/glib-2.6
30 amd64? ( >=sys-apps/dmidecode-2.7 ) 30 amd64? ( >=sys-apps/dmidecode-2.7 )
31 x86? ( >=sys-apps/dmidecode-2.7 ) 31 x86? ( >=sys-apps/dmidecode-2.7 )
32 ia64? ( >=sys-apps/dmidecode-2.7 ) 32 ia64? ( >=sys-apps/dmidecode-2.7 )
33 dell? ( >=sys-libs/libsmbios-0.13.4 ) 33 dell? ( >=sys-libs/libsmbios-0.13.4 )
34 disk-partition? ( <=sys-apps/parted-1.8.7 ) 34 disk-partition? ( <=sys-apps/parted-1.8.7 )
35 kernel_linux? ( crypt? ( || ( >=sys-fs/cryptsetup-1.0.5 35 kernel_linux? ( crypt? ( >=sys-fs/cryptsetup-1.0.5 ) )
36 >=sys-fs/cryptsetup-luks-1.0.1 ) ) )
37 selinux? ( sys-libs/libselinux 36 selinux? ( sys-libs/libselinux
38 sec-policy/selinux-hal )" 37 sec-policy/selinux-hal )"
39# pam? ( sys-auth/consolekit )" 38# pam? ( sys-auth/consolekit )"
40 39
41DEPEND="${RDEPEND} 40DEPEND="${RDEPEND}
49 48
50## HAL Daemon drops privledges so we need group access to read disks 49## HAL Daemon drops privledges so we need group access to read disks
51HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb" 50HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
52HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator" 51HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator"
53 52
54function notify_uevent() { 53function check_hotplug_net() {
55 ewarn 54 local CONFIG_CHECK="~HOTPLUG ~NET"
56 ewarn "You must enable Kernel Userspace Events in your kernel." 55 local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)
57 ewarn "For this you need to enable 'Hotplug' under 'General Setup' and" 56"
58 ewarn "basic networking. They are marked CONFIG_HOTPLUG and CONFIG_NET" 57 local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)
59 ewarn "in the config file." 58"
60 ewarn 59 check_extra_config
61 ebeep 5
62} 60}
63 61
64function notify_procfs() {
65 ewarn
66 ewarn "You must enable the proc filesystem in your kernel."
67 ewarn "For this you need to enable '/proc file system support' under"
68 ewarn "'Pseudo filesystems' in 'File systems'. It is marked"
69 ewarn "CONFIG_PROC_FS in the config file."
70 ewarn
71 ebeep 5
72}
73
74function notify_inotify() { 62function check_inotify() {
75 ewarn 63 local CONFIG_CHECK="~INOTIFY_USER"
76 ewarn "You must enable the Inotify system in your kernel." 64 local WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER:\tis not set (required for HAL)
77 ewarn "For this you need to enable 'Inotify support for userspace'" 65"
78 ewarn "in 'File systems'. It is marked CONFIG_INOTIFY_USER in the config file." 66 check_extra_config
79 ewarn 67}
80 ebeep 5 68
69function check_procfs() {
70 local CONFIG_CHECK="~PROC_FS"
71 local WARNING_PROC_FS="CONFIG_PROC_FS:\tis not set (required for HAL)
72"
73 check_extra_config
81} 74}
82 75
83pkg_setup() { 76pkg_setup() {
84 if use kernel_linux; then 77 if ! built_with_use --missing true sys-apps/pciutils hal ; then
85 kernel_is ge 2 6 17 || ewarn "HAL requires a kernel version 2.6.17 or newer" 78 if built_with_use --missing false sys-apps/pciutils zlib ; then
86 79 die "You MUST build sys-apps/pciutils without the zlib USE flag"
87 if ! ( linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET )
88 then
89 notify_uevent
90 fi 80 fi
81 fi
91 82
92 linux_chkconfig_present INOTIFY_USER || notify_inotify 83 if use kernel_linux ; then
93 84 if [ -e "${ROOT}/usr/src/linux/.config" ] ; then
94 if use acpi ; then 85 kernel_is ge 2 6 17 || \
95 linux_chkconfig_present PROC_FS || notify_procfs 86 ewarn "HAL requires a kernel version 2.6.17 or newer"
96 fi 87 fi
88
89 check_hotplug_net
90 check_inotify
91 use acpi && check_procfs
97 fi 92 fi
98 93
99 if [[ -d ${ROOT}/etc/hal/device.d ]]; then 94 if [[ -d ${ROOT}/etc/hal/device.d ]]; then
100 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"
101 eerror "/etc/hal/device.d/ so please remove this directory" 96 eerror "/etc/hal/device.d/ so please remove this directory"
105 fi 100 fi
106} 101}
107 102
108src_unpack() { 103src_unpack() {
109 unpack ${A} 104 unpack ${A}
110 cd ${S} 105 cd "${S}"
111 106
112 EPATCH_SUFFIX="patch" \ 107 EPATCH_SUFFIX="patch" \
113 EPATCH_FORCE="yes" \ 108 EPATCH_FORCE="yes" \
114 epatch "${WORKDIR}"/hal-patches 109 epatch "${WORKDIR}"/hal-patches
115 110
201pkg_postinst() { 196pkg_postinst() {
202 # Despite what people keep changing this location. Either one works.. it doesn't matter 197 # Despite what people keep changing this location. Either one works.. it doesn't matter
203 # http://dev.gentoo.org/~plasmaroo/devmanual/ebuild-writing/functions/ 198 # http://dev.gentoo.org/~plasmaroo/devmanual/ebuild-writing/functions/
204 199
205 # Create groups for hotplugging and HAL 200 # Create groups for hotplugging and HAL
206 enewgroup haldaemon || die "Problem adding haldaemon group" 201 enewgroup haldaemon
207 enewgroup plugdev || die "Problem adding plugdev group" 202 enewgroup plugdev
208 203
209 # HAL drops priviledges by default now ... 204 # HAL drops priviledges by default now ...
210 # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups) 205 # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups)
211 if use kernel_linux; then 206 if use kernel_linux; then
212 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_LINUX} \ 207 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_LINUX}
213 || die "Problem adding haldaemon user"
214 elif use kernel_FreeBSD; then 208 elif use kernel_FreeBSD; then
215 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_FREEBSD} \ 209 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS_FREEBSD}
216 || die "Problem addding haldaemon user"
217 fi 210 fi
218 211
219 # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS} 212 # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS}
220 # If users have a problem with this, let them file a bug 213 # If users have a problem with this, let them file a bug
221 if [[ ${ROOT} == / ]] ; then 214 if [[ ${ROOT} == / ]] ; then

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20