1 |
# Copyright 1999-2004 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.4.1.ebuild,v 1.3 2004/11/08 21:41:39 vapier Exp $ |
4 |
|
5 |
inherit eutils debug python |
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="~x86 ~amd64 ~ia64 ~ppc ~ppc64" |
14 |
IUSE="" |
15 |
|
16 |
RDEPEND=">=dev-libs/glib-2.2.2 |
17 |
>=sys-apps/dbus-0.22-r1 |
18 |
dev-libs/expat |
19 |
sys-fs/udev |
20 |
sys-apps/hotplug |
21 |
sys-libs/libcap |
22 |
>=sys-apps/util-linux-2.12i |
23 |
sys-kernel/linux26-headers" |
24 |
|
25 |
DEPEND="${RDEPEND} |
26 |
dev-util/pkgconfig" |
27 |
|
28 |
# dep on a specific util-linux version for |
29 |
# managed mount patches #70873 |
30 |
|
31 |
src_unpack() { |
32 |
|
33 |
unpack ${A} |
34 |
|
35 |
cd ${S} |
36 |
# remove pamconsole option |
37 |
epatch ${FILESDIR}/${PN}-0.4.1-old_storage_policy.patch |
38 |
# fix floppy drives be shown |
39 |
epatch ${FILESDIR}/${PN}-0.4.0-allow-floppy-drives.patch |
40 |
# smallish device manaager fix |
41 |
cd ${S}/tools/device-manager |
42 |
epatch ${FILESDIR}/${P}-dm_devices_tab.patch |
43 |
|
44 |
} |
45 |
|
46 |
src_compile() { |
47 |
|
48 |
# FIXME : docs |
49 |
econf \ |
50 |
--enable-fstab-sync \ |
51 |
--enable-hotplug-map \ |
52 |
--disable-doxygen-docs \ |
53 |
--disable-docbook-docs \ |
54 |
--with-pid-file=/var/run/hald/hald.pid \ |
55 |
|| die |
56 |
|
57 |
emake || die |
58 |
|
59 |
} |
60 |
|
61 |
src_install() { |
62 |
|
63 |
make DESTDIR=${D} install || die |
64 |
|
65 |
# We install this in a seperate package to avoid gnome-python dep |
66 |
rm ${D}/usr/bin/hal-device-manager |
67 |
|
68 |
# initscript |
69 |
exeinto /etc/init.d/ |
70 |
doexe ${FILESDIR}/hald |
71 |
|
72 |
# place our pid file |
73 |
keepdir /var/run/hald |
74 |
|
75 |
dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README |
76 |
|
77 |
} |
78 |
|
79 |
pkg_preinst() { |
80 |
|
81 |
enewgroup haldaemon || die "Problem adding haldaemon group" |
82 |
enewuser haldaemon -1 /bin/false /dev/null haldaemon || die "Problem adding haldaemon user" |
83 |
|
84 |
} |
85 |
|
86 |
pkg_postinst() { |
87 |
|
88 |
# make sure the permissions on the pid dir are alright & after preinst |
89 |
chown haldaemon:haldaemon /var/run/hald |
90 |
|
91 |
ewarn "Enabled in this ebuild by default is the usage of fstab-sync" |
92 |
ewarn "that will create mount rules for non-existing devices in" |
93 |
ewarn "fstab if needed, mount points will be created in /media." |
94 |
ewarn "This functionality alters /etc/fstab runtime on the filesystem" |
95 |
ewarn "and might have unforseen side-effects." |
96 |
echo |
97 |
einfo "The HAL daemon needs to be running for certain applications to" |
98 |
einfo "work. Suggested is to add the init script to your start-up" |
99 |
einfo "scripts, this should be done like this :" |
100 |
einfo "\`rc-update add hald default\`" |
101 |
|
102 |
} |