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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Tue Apr 3 13:30:41 2007 UTC (7 years, 7 months ago) by steev
Branch: MAIN
Hal 0.5.9 release. remove the release candidates.
(Portage version: 2.1.2.3)

1 steev 1.1 # Copyright 1999-2007 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.5.9_rc3.ebuild,v 1.5 2007/04/02 17:06:31 cardoe Exp $
4    
5     inherit eutils linux-info autotools flag-o-matic
6    
7     DESCRIPTION="Hardware Abstraction Layer"
8     HOMEPAGE="http://www.freedesktop.org/Software/hal"
9     SRC_URI="http://people.freedesktop.org/~david/dist/${P}.tar.gz"
10    
11     LICENSE="|| ( GPL-2 AFL-2.0 )"
12     SLOT="0"
13     KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 -mips ~ppc ~ppc64 ~sh ~sparc ~x86"
14     IUSE="acpi crypt debug dell disk-partition doc mactel pcmcia selinux"
15    
16     RDEPEND=">=dev-libs/glib-2.6
17     >=dev-libs/dbus-glib-0.61
18     >=sys-fs/udev-104
19     >=sys-apps/util-linux-2.12r-r1
20     >=sys-kernel/linux-headers-2.6.17
21     >=dev-libs/expat-1.95.8
22     >=sys-apps/pciutils-2.2.3
23     >=dev-libs/libusb-0.1.10a
24     virtual/eject
25     amd64? ( >=sys-apps/dmidecode-2.7 )
26     x86? ( >=sys-apps/dmidecode-2.7 )
27     ia64? ( >=sys-apps/dmidecode-2.7 )
28     dell? ( >=sys-libs/libsmbios-0.13.4 )
29     disk-partition? ( >=sys-apps/parted-1.7.1 )
30     crypt? ( >=sys-fs/cryptsetup-luks-1.0.1 )
31     selinux? ( sys-libs/libselinux )"
32    
33     DEPEND="${RDEPEND}
34     dev-util/pkgconfig
35     >=dev-util/intltool-0.35
36     doc? ( app-doc/doxygen app-text/docbook-sgml-utils )"
37    
38     PDEPEND="app-misc/hal-info"
39    
40     ## HAL Daemon drops privledges so we need group access to read disks
41     HALDAEMON_GROUPS="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
42    
43     function notify_uevent() {
44     ewarn
45     ewarn "You must enable Kernel Userspace Events in your kernel."
46     ewarn "For this you need to enable 'Hotplug' under 'General Setup' and"
47     ewarn "basic networking. They are marked CONFIG_HOTPLUG and CONFIG_NET"
48     ewarn "in the config file."
49     ewarn
50     ebeep 5
51     }
52    
53     function notify_procfs() {
54     ewarn
55     ewarn "You must enable the proc filesystem in your kernel."
56     ewarn "For this you need to enable '/proc file system support' under"
57     ewarn "'Pseudo filesystems' in 'File systems'. It is marked"
58     ewarn "CONFIG_PROC_FS in the config file."
59     ewarn
60     ebeep 5
61     }
62    
63     pkg_setup() {
64     kernel_is ge 2 6 17 || ewarn "HAL requires a kernel version 2.6.17 or newer"
65    
66     if ! ( linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET )
67     then
68     notify_uevent
69     fi
70    
71     if use acpi ; then
72     linux_chkconfig_present PROC_FS || notify_procfs
73     fi
74    
75     if [[ -d ${ROOT}/etc/hal/device.d ]]; then
76     eerror "HAL 0.5.x will not run with the HAL 0.4.x series of"
77     eerror "/etc/hal/device.d/ so please remove this directory"
78     eerror "with rm -rf /etc/hal/device.d/ and then re-emerge."
79     eerror "This is due to configuration protection of /etc/"
80     die "remove /etc/hal/device.d/"
81     fi
82     }
83    
84     src_unpack() {
85     unpack ${A}
86     cd ${S}
87     epatch ${FILESDIR}/${PN}-0.5.7-plugdev-allow-send.patch
88     }
89    
90     src_compile() {
91     # TODO :: policykit should have a pam useflag
92     append-flags -rdynamic
93    
94     econf --disable-policy-kit \
95     --with-doc-dir=/usr/share/doc/${PF} \
96     --with-os-type=gentoo \
97     --with-pid-file=/var/run/hald.pid \
98     --with-hwdata=/usr/share/misc \
99     --enable-hotplug-map \
100     $(use_enable debug verbose-mode) \
101     $(use_enable disk-partition parted) \
102     $(use_enable pcmcia pcmcia-support) \
103     $(use_enable acpi acpi-proc) \
104     $(use_enable doc docbook-docs) \
105     $(use_enable doc doxygen-docs) \
106     $(use_with mactel macbookpro) \
107     $(use_enable selinux) \
108     || die "configure failed"
109    
110     emake || die "make failed"
111     }
112    
113     src_install() {
114     make DESTDIR="${D}" install || die
115     dodoc AUTHORS ChangeLog NEWS README
116    
117     # remove dep on gnome-python
118     mv "${D}"/usr/bin/hal-device-manager "${D}"/usr/share/hal/device-manager/
119    
120     # hal umount for unclean unmounts
121     exeinto /lib/udev/
122     newexe "${FILESDIR}"/hal-unmount.dev hal_unmount
123    
124     # initscript
125     newinitd "${FILESDIR}"/0.5-hald.rc hald
126    
127     # We now create and keep /media here as both gnome-mount and pmount
128     # use these directories, to avoid collision.
129     dodir /media
130     keepdir /media
131     # We also need to create and keep /etc/fdi/{information,policy,preprobe}
132     # or else hal bombs.
133     dodir /etc/hal/fdi/{information,policy,preprobe}
134     keepdir /etc/hal/fdi/{information,policy,preprobe}
135     }
136    
137     pkg_postinst() {
138     # Despite what people keep changing this location. Either one works.. it doesn't matter
139     # http://dev.gentoo.org/~plasmaroo/devmanual/ebuild-writing/functions/
140    
141     # Create groups for hotplugging and HAL
142     enewgroup haldaemon || die "Problem adding haldaemon group"
143     enewgroup plugdev || die "Problem adding plugdev group"
144    
145     # HAL drops priviledges by default now ...
146     # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups)
147     enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS} || die "Problem adding haldaemon user"
148    
149     # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS}
150     # If users have a problem with this, let them file a bug
151     usermod -G ${HALDAEMON_GROUPS} haldaemon
152    
153     elog "The HAL daemon needs to be running for certain applications to"
154     elog "work. Suggested is to add the init script to your start-up"
155     elog "scripts, this should be done like this :"
156     elog "\`rc-update add hald default\`"
157     echo
158     elog "Looking for automounting support? Add yourself to the plugdev group"
159     }

  ViewVC Help
Powered by ViewVC 1.1.20