| 1 |
foser |
1.1 |
# Copyright 1999-2005 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
hansmi |
1.6 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/hal-0.4.5-r2.ebuild,v 1.5 2005/02/20 11:51:52 lanius Exp $
|
| 4 |
foser |
1.1 |
|
| 5 |
|
|
inherit eutils python linux-info versionator flag-o-matic
|
| 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 |
hansmi |
1.6 |
KEYWORDS="x86 ~amd64 ~ia64 ppc ~ppc64"
|
| 14 |
foser |
1.1 |
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 |
|
|
# We need to run at least a 2.6.10 kernel, this is a
|
| 34 |
|
|
# way to ensure that to some extent
|
| 35 |
|
|
pkg_setup() {
|
| 36 |
|
|
|
| 37 |
|
|
if get_version; then
|
| 38 |
foser |
1.2 |
kernel_is ge 2 6 10 && break
|
| 39 |
foser |
1.1 |
else
|
| 40 |
|
|
RKV=$(uname -r)
|
| 41 |
foser |
1.2 |
RKV=${RKV//-*}
|
| 42 |
foser |
1.1 |
if version_is_at_least "2.6.10" ${RKV}; then
|
| 43 |
|
|
break
|
| 44 |
|
|
fi
|
| 45 |
|
|
fi
|
| 46 |
|
|
die "You need a 2.6.10 or newer kernel to build this pack"
|
| 47 |
|
|
|
| 48 |
|
|
}
|
| 49 |
|
|
|
| 50 |
|
|
src_unpack() {
|
| 51 |
|
|
|
| 52 |
|
|
unpack ${A}
|
| 53 |
|
|
|
| 54 |
|
|
cd ${S}
|
| 55 |
|
|
# remove pamconsole option
|
| 56 |
|
|
epatch ${FILESDIR}/${PN}-0.4.1-old_storage_policy.patch
|
| 57 |
|
|
# pick up the gentoo usermap
|
| 58 |
|
|
epatch ${FILESDIR}/${P}-gentoo_gphoto2_usermap.patch
|
| 59 |
|
|
# fix issues with certain misbehaving kernel drivers (#78564)
|
| 60 |
|
|
cd ${S}/hald/linux
|
| 61 |
|
|
epatch ${FILESDIR}/${P}-net_lockup.patch
|
| 62 |
|
|
cd ${S}/hald/linux/volume_id
|
| 63 |
|
|
epatch ${FILESDIR}/${P}-vat_ntfs_labels.patch
|
| 64 |
|
|
|
| 65 |
|
|
}
|
| 66 |
|
|
|
| 67 |
|
|
src_compile() {
|
| 68 |
|
|
|
| 69 |
|
|
# use sysfs stuff added in 2.6.10 kernel
|
| 70 |
|
|
append-flags -DSYSFS_CARRIER_ENABLE
|
| 71 |
|
|
|
| 72 |
|
|
# FIXME : docs
|
| 73 |
|
|
econf \
|
| 74 |
|
|
`use_enable debug verbose-mode` \
|
| 75 |
|
|
`use_enable pcmcia pcmcia-support` \
|
| 76 |
|
|
--enable-fstab-sync \
|
| 77 |
|
|
--enable-hotplug-map \
|
| 78 |
|
|
--disable-docbook-docs \
|
| 79 |
|
|
`use_enable doc doxygen-docs` \
|
| 80 |
|
|
--with-pid-file=/var/run/hald/hald.pid \
|
| 81 |
|
|
|| die
|
| 82 |
|
|
|
| 83 |
|
|
emake || die
|
| 84 |
|
|
|
| 85 |
|
|
}
|
| 86 |
|
|
|
| 87 |
|
|
src_install() {
|
| 88 |
|
|
|
| 89 |
|
|
make DESTDIR=${D} install || die
|
| 90 |
|
|
|
| 91 |
|
|
# We install this in a seperate package to avoid gnome-python dep
|
| 92 |
|
|
rm ${D}/usr/bin/hal-device-manager
|
| 93 |
|
|
|
| 94 |
|
|
# initscript
|
| 95 |
|
|
exeinto /etc/init.d/
|
| 96 |
|
|
doexe ${FILESDIR}/hald
|
| 97 |
|
|
|
| 98 |
|
|
# place our pid file
|
| 99 |
|
|
keepdir /var/run/hald
|
| 100 |
|
|
|
| 101 |
|
|
dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
|
| 102 |
|
|
|
| 103 |
|
|
}
|
| 104 |
|
|
|
| 105 |
|
|
pkg_preinst() {
|
| 106 |
|
|
|
| 107 |
|
|
enewgroup haldaemon || die "Problem adding haldaemon group"
|
| 108 |
|
|
enewuser haldaemon -1 /bin/false /dev/null haldaemon || die "Problem adding haldaemon user"
|
| 109 |
|
|
|
| 110 |
|
|
}
|
| 111 |
|
|
|
| 112 |
|
|
pkg_postinst() {
|
| 113 |
|
|
|
| 114 |
|
|
# make sure the permissions on the pid dir are alright & after preinst
|
| 115 |
|
|
chown haldaemon:haldaemon /var/run/hald
|
| 116 |
|
|
|
| 117 |
|
|
ewarn "Enabled in this ebuild by default is the usage of fstab-sync"
|
| 118 |
|
|
ewarn "that will create mount rules for non-existing devices in"
|
| 119 |
|
|
ewarn "fstab if needed, mount points will be created in /media."
|
| 120 |
|
|
ewarn "This functionality alters /etc/fstab runtime on the filesystem"
|
| 121 |
|
|
ewarn "and should be considered a security risk."
|
| 122 |
|
|
echo
|
| 123 |
|
|
einfo "The HAL daemon needs to be running for certain applications to"
|
| 124 |
|
|
einfo "work. Suggested is to add the init script to your start-up"
|
| 125 |
|
|
einfo "scripts, this should be done like this :"
|
| 126 |
|
|
einfo "\`rc-update add hald default\`"
|
| 127 |
|
|
|
| 128 |
|
|
}
|