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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Tue Dec 27 19:41:44 2005 UTC (8 years, 11 months ago) by cardoe
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Fixed /usr/share/doc path (bug #116864) and fixed depend on hotplug (bug #106751)
(Portage version: 2.1_pre2)

1 spider 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-r1.ebuild,v 1.3 2005/12/24 22:15:27 genstef Exp $
4 spider 1.1
5 cardoe 1.2 inherit eutils linux-info debug
6 spider 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     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    
26     DEPEND="${RDEPEND}
27     dev-util/pkgconfig
28     >=dev-util/intltool-0.29
29     doc? ( app-doc/doxygen app-text/docbook-sgml-utils )"
30    
31     ## HAL Daemon drops privledges so we need group access to read disks
32     HALDAEMON_GROUPS="haldaemon,disk,cdrom,cdrw,floppy,usb"
33    
34     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     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 genstef 1.3 if kernel_is le 2 6 15; then
52 cardoe 1.2 linux_chkconfig_present KOBJECT_UEVENT || notify_uevent
53     fi
54 spider 1.1
55     if use acpi ; then
56     linux_chkconfig_present PROC_FS \
57     || die "ACPI support requires PROC_FS support in kernel"
58     fi
59    
60     if use pam_console && ! built_with_use sys-libs/pam pam_console ; then
61     eerror "You need to build pam with pam_console support"
62     eerror "Please remerge sys-libs/pam with USE=pam_console"
63     die "pam without pam_console detected"
64     fi
65    
66 cardoe 1.2 if [ -d "${ROOT}"/etc/hal/device.d ]; then
67 spider 1.1 eerror "HAL 0.5.x will not run with the HAL 0.4.x series of"
68     eerror "/etc/hal/device.d/ so please remove this directory"
69     eerror "with rm -rf /etc/hal/device.d/ and then re-emerge."
70     eerror "This is due to configuration protection of /etc/"
71     die "remove /etc/hal/device.d/"
72     fi
73     }
74    
75    
76     src_unpack() {
77 cardoe 1.2 unpack "${A}"
78     cd "${S}"
79     epatch "${FILESDIR}"/${P}-RBC.patch
80 spider 1.1
81     # remove pamconsole option
82 cardoe 1.2 use pam_console || epatch "${FILESDIR}"/${PN}-0.5.1-old_storage_policy.patch
83 spider 1.1 }
84    
85     src_compile() {
86     econf \
87     --with-os-type=gentoo \
88     --with-pid-file=/var/run/hald.pid \
89     $(use_enable debug verbose-mode) \
90     $(use_enable pcmcia pcmcia-support) \
91     $(use_enable acpi acpi-proc) \
92     $(use_enable doc docbook-docs) \
93     $(use_enable doc doxygen-docs) \
94     || die "configure failed"
95    
96     emake || die "make failed"
97     }
98    
99     src_install() {
100 cardoe 1.2 make DESTDIR="${D}" install || die
101 spider 1.1
102     # We install this in a seperate package to avoid gnome-python dep
103 cardoe 1.2 rm "${D}"/usr/bin/hal-device-manager
104 spider 1.1
105     # initscript
106 cardoe 1.2 newinitd "${FILESDIR}"/0.5-hald.rc hald
107 spider 1.1
108     dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
109    
110     # Script to unmount devices if they are yanked out (from upstream)
111     exeinto /etc/dev.d/default
112 cardoe 1.2 doexe "${FILESDIR}"/hal-unmount.dev
113 spider 1.1 }
114    
115 cardoe 1.2 pkg_preinst() {
116 spider 1.1 enewgroup haldaemon || die "Problem adding haldaemon group"
117 cardoe 1.2 enewuser haldaemon -1 "-1" -1 ${HALDAEMON_GROUPS} || die "Problem adding haldaemon user"
118 spider 1.1 usermod -G ${HALDAEMON_GROUPS} haldaemon
119 cardoe 1.2 }
120 spider 1.1
121 cardoe 1.2 pkg_postinst() {
122 spider 1.1 einfo "The HAL daemon needs to be running for certain applications to"
123     einfo "work. Suggested is to add the init script to your start-up"
124     einfo "scripts, this should be done like this :"
125     einfo "\`rc-update add hald default\`"
126     }

  ViewVC Help
Powered by ViewVC 1.1.20