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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Nov 22 01:26:43 2005 UTC (13 years, 5 months ago) by compnerd
Branch: MAIN
Version bumping hal with upstream; Bug #112881
(Portage version: 2.0.53_rc7)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
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="~x86 ~amd64 ~ia64 ~ppc ~ppc64 ~sparc"
14 IUSE="acpi debug doc pam_console pcmcia"
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 DEPEND="${RDEPEND}
26 dev-util/pkgconfig
27 >=dev-util/intltool-0.29
28 doc? ( app-doc/doxygen app-text/docbook-sgml-utils )"
29
30 ## HAL Daemon drops privledges so we need group access to read disks
31 HALDAEMON_GROUPS="haldaemon,disk,cdrom,cdrw,floppy,usb"
32
33 pkg_setup() {
34 linux-info_pkg_setup
35
36 kernel_is ge 2 6 13 \
37 || die "You need a 2.6.13 or newer kernel to run this package"
38
39 if use acpi ; then
40 linux_chkconfig_present PROC_FS \
41 || die "ACPI support requires PROC_FS support in kernel"
42 fi
43
44 if use pam_console && ! built_with_use sys-libs/pam pam_console ; then
45 eerror "You need to build pam with pam_console support"
46 eerror "Please remerge sys-libs/pam with USE=pam_console"
47 die "pam without pam_console detected"
48 fi
49
50 if [ -d ${ROOT}/etc/hal/device.d ]; then
51 eerror "HAL 0.5.x will not run with the HAL 0.4.x series of"
52 eerror "/etc/hal/device.d/ so please remove this directory"
53 eerror "with rm -rf /etc/hal/device.d/ and then re-emerge."
54 eerror "This is due to configuration protection of /etc/"
55 die "remove /etc/hal/device.d/"
56 fi
57 }
58
59
60 src_unpack() {
61 unpack ${A}
62 cd ${S}
63 # remove pamconsole option
64 use pam_console || epatch ${FILESDIR}/${PN}-0.5.1-old_storage_policy.patch
65 }
66
67 src_compile() {
68 econf \
69 --with-os-type=gentoo \
70 --with-pid-file=/var/run/hald.pid \
71 $(use_enable debug verbose-mode) \
72 $(use_enable pcmcia pcmcia-support) \
73 $(use_enable acpi acpi-proc) \
74 $(use_enable doc docbook-docs) \
75 $(use_enable doc doxygen-docs) \
76 || die "configure failed"
77
78 emake || die "make failed"
79 }
80
81 src_install() {
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 newinitd ${FILESDIR}/0.5-hald.rc hald
89
90 dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
91
92 # Script to unmount devices if they are yanked out (from upstream)
93 exeinto /etc/dev.d/default
94 doexe ${FILESDIR}/hal-unmount.dev
95 }
96
97 pkg_postinst() {
98 ## We need to add the user/groups *after* package compilation/installation, so that we
99 ## don't change the user without the package being installed.
100 ##
101 enewgroup haldaemon || die "Problem adding haldaemon group"
102 # HAL drops priviledges by default now ...
103 # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups)
104 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS} || die "Problem adding haldaemon user"
105
106 # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS}
107 # If users have a problem with this, let them file a bug
108 usermod -G ${HALDAEMON_GROUPS} haldaemon
109
110 einfo "The HAL daemon needs to be running for certain applications to"
111 einfo "work. Suggested is to add the init script to your start-up"
112 einfo "scripts, this should be done like this :"
113 einfo "\`rc-update add hald default\`"
114 }

  ViewVC Help
Powered by ViewVC 1.1.20