/[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.4 - (hide annotations) (download)
Wed Dec 21 09:41:20 2005 UTC (9 years, 1 month ago) by cardoe
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
ebuild clean ups
(Portage version: 2.1_pre1)

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

  ViewVC Help
Powered by ViewVC 1.1.20