| 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.7.ebuild,v 1.1 2005/02/06 17:21:27 foser Exp $
|
| 4 |
|
| 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 |
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 |
# 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 |
kernel_is ge 2 6 10 && break
|
| 39 |
else
|
| 40 |
RKV=$(uname -r)
|
| 41 |
RKV=${RKV//-*}
|
| 42 |
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}/${PN}-0.4.5-gentoo_gphoto2_usermap.patch
|
| 59 |
|
| 60 |
}
|
| 61 |
|
| 62 |
src_compile() {
|
| 63 |
|
| 64 |
# FIXME : docs
|
| 65 |
econf \
|
| 66 |
`use_enable debug verbose-mode` \
|
| 67 |
`use_enable pcmcia pcmcia-support` \
|
| 68 |
--enable-sysfs-carrier \
|
| 69 |
--enable-fstab-sync \
|
| 70 |
--enable-hotplug-map \
|
| 71 |
--disable-docbook-docs \
|
| 72 |
`use_enable doc doxygen-docs` \
|
| 73 |
--with-pid-file=/var/run/hald/hald.pid \
|
| 74 |
|| die
|
| 75 |
|
| 76 |
emake || die
|
| 77 |
|
| 78 |
}
|
| 79 |
|
| 80 |
src_install() {
|
| 81 |
|
| 82 |
make DESTDIR=${D} install || die
|
| 83 |
|
| 84 |
# We install this in a seperate package to avoid gnome-python dep
|
| 85 |
rm ${D}/usr/bin/hal-device-manager
|
| 86 |
|
| 87 |
# initscript
|
| 88 |
exeinto /etc/init.d/
|
| 89 |
doexe ${FILESDIR}/hald
|
| 90 |
|
| 91 |
# place our pid file
|
| 92 |
keepdir /var/run/hald
|
| 93 |
|
| 94 |
dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
|
| 95 |
|
| 96 |
}
|
| 97 |
|
| 98 |
pkg_preinst() {
|
| 99 |
|
| 100 |
enewgroup haldaemon || die "Problem adding haldaemon group"
|
| 101 |
enewuser haldaemon -1 /bin/false /dev/null haldaemon || die "Problem adding haldaemon user"
|
| 102 |
|
| 103 |
}
|
| 104 |
|
| 105 |
pkg_postinst() {
|
| 106 |
|
| 107 |
# make sure the permissions on the pid dir are alright & after preinst
|
| 108 |
chown haldaemon:haldaemon /var/run/hald
|
| 109 |
|
| 110 |
ewarn "Enabled in this ebuild by default is the usage of fstab-sync"
|
| 111 |
ewarn "that will create mount rules for non-existing devices in"
|
| 112 |
ewarn "fstab if needed, mount points will be created in /media."
|
| 113 |
ewarn "This functionality alters /etc/fstab runtime on the filesystem"
|
| 114 |
ewarn "and should be considered a security risk."
|
| 115 |
echo
|
| 116 |
einfo "The HAL daemon needs to be running for certain applications to"
|
| 117 |
einfo "work. Suggested is to add the init script to your start-up"
|
| 118 |
einfo "scripts, this should be done like this :"
|
| 119 |
einfo "\`rc-update add hald default\`"
|
| 120 |
|
| 121 |
}
|