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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Wed Nov 30 09:56:17 2005 UTC (12 years, 7 months ago) by chriswhite
Changes since 1.1: +11 -30 lines
*** empty log message ***

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

  ViewVC Help
Powered by ViewVC 1.1.20