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

Contents of /sys-apps/hal/hal-0.5.5.1-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (show annotations) (download)
Tue Jan 30 16:42:06 2007 UTC (7 years, 5 months ago) by cardoe
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +1 -1 lines
FILE REMOVED
Fixed hotplug depend. Fixed installing old unused udev rule. Fix for bug #133743 from Gilles Dartiguelongue <dartigug@esiee.fr>. Fix bug #154648. Fix bug #158304. Fix bug #163233.
(Portage version: 2.1.2-r5)

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.5.1-r3.ebuild,v 1.16 2007/01/05 04:41:12 flameeyes Exp $
4
5 inherit eutils linux-info
6
7 DESCRIPTION="Hardware Abstraction Layer"
8 HOMEPAGE="http://www.freedesktop.org/Software/hal"
9 SRC_URI="http://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 ppc ppc64 sh sparc x86"
14 IUSE="acpi debug doc pam_console pcmcia selinux"
15
16 RDEPEND=">=dev-libs/glib-2.6
17 >=sys-apps/dbus-0.50
18 >=sys-fs/udev-071
19 >=sys-apps/util-linux-2.12i
20 || ( >=sys-kernel/linux-headers-2.6 >=sys-kernel/mips-headers-2.6 )
21 dev-libs/expat
22 dev-libs/libusb
23 sys-apps/hotplug
24 pam_console? ( sys-libs/pam )
25 selinux? ( sys-libs/libselinux )"
26
27 DEPEND="${RDEPEND}
28 dev-util/pkgconfig
29 >=dev-util/intltool-0.29
30 doc? ( app-doc/doxygen app-text/docbook-sgml-utils )"
31
32 ## HAL Daemon drops privledges so we need group access to read disks
33 HALDAEMON_GROUPS="haldaemon,disk,cdrom,cdrw,floppy,usb"
34
35 function notify_uevent() {
36 eerror
37 eerror "You must enable Kernel Userspace Events in your kernel."
38 eerror "This can be set under 'General Setup'. It is marked as"
39 eerror "CONFIG_KOBJECT_UEVENT in the config file."
40 eerror
41 ebeep 5
42
43 die "KOBJECT_UEVENT is not set"
44 }
45
46 pkg_setup() {
47 linux-info_pkg_setup
48
49 kernel_is ge 2 6 13 \
50 || die "You need a 2.6.13 or newer kernel to run this package"
51
52 if kernel_is lt 2 6 15; then
53 linux_chkconfig_present KOBJECT_UEVENT || notify_uevent
54 fi
55
56 if use acpi ; then
57 linux_chkconfig_present PROC_FS \
58 || die "ACPI support requires PROC_FS support in kernel"
59 fi
60
61 if use pam_console && ! built_with_use sys-libs/pam pam_console ; then
62 eerror "You need to build pam with pam_console support"
63 eerror "Please remerge sys-libs/pam with USE=pam_console"
64 die "pam without pam_console detected"
65 fi
66
67 if [ -d "${ROOT}"/etc/hal/device.d ]; then
68 eerror "HAL 0.5.x will not run with the HAL 0.4.x series of"
69 eerror "/etc/hal/device.d/ so please remove this directory"
70 eerror "with rm -rf /etc/hal/device.d/ and then re-emerge."
71 eerror "This is due to configuration protection of /etc/"
72 die "remove /etc/hal/device.d/"
73 fi
74 }
75
76
77 src_unpack() {
78 unpack "${A}"
79 cd "${S}"
80 epatch "${FILESDIR}"/${P}-RBC.patch
81
82 # remove pamconsole option
83 use pam_console || epatch "${FILESDIR}"/${PN}-0.5.1-old_storage_policy.patch
84 }
85
86 src_compile() {
87 econf \
88 --with-doc-dir=/usr/share/doc/${PF} \
89 --with-os-type=gentoo \
90 --with-pid-file=/var/run/hald.pid \
91 $(use_enable debug verbose-mode) \
92 $(use_enable pcmcia pcmcia-support) \
93 $(use_enable acpi acpi-proc) \
94 $(use_enable doc docbook-docs) \
95 $(use_enable doc doxygen-docs) \
96 $(use_enable selinux) \
97 || die "configure failed"
98
99 # --disable-acpi-acpid when HAL handles all that acpid handles
100
101 emake || die "make failed"
102 }
103
104 src_install() {
105 make DESTDIR="${D}" install || die
106
107 # We install this in a seperate package to avoid gnome-python dep
108 rm "${D}"/usr/bin/hal-device-manager
109
110 # initscript
111 newinitd "${FILESDIR}"/0.5-hald.rc hald
112
113 dodoc AUTHORS ChangeLog NEWS README
114
115 # Script to unmount devices if they are yanked out (from upstream)
116 exeinto /etc/dev.d/default
117 doexe "${FILESDIR}"/hal-unmount.dev
118 }
119
120 pkg_preinst() {
121 enewgroup haldaemon || die "Problem adding haldaemon group"
122 enewuser haldaemon -1 "-1" -1 ${HALDAEMON_GROUPS} || die "Problem adding haldaemon user"
123 usermod -G ${HALDAEMON_GROUPS} haldaemon
124 }
125
126 pkg_postinst() {
127 einfo "The HAL daemon needs to be running for certain applications to"
128 einfo "work. Suggested is to add the init script to your start-up"
129 einfo "scripts, this should be done like this :"
130 einfo "\`rc-update add hald default\`"
131 }

  ViewVC Help
Powered by ViewVC 1.1.20