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