/[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.1 - (hide annotations) (download)
Fri Dec 16 15:57:32 2005 UTC (8 years, 4 months ago) by spider
Branch: MAIN
Adding the RBC/disk patch from the hal mailinglist which finally(!) (fixes gen3 (and below) ipods on firewire connections.
(Portage version: 2.0.53)

1 spider 1.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.5.5.1.ebuild,v 1.3 2005/12/14 07:04:06 cardoe Exp $
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    
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     linux_chkconfig_present KOBJECT_UEVENT \
52     || notify_uevent
53    
54     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     epatch ${FILESDIR}/${P}-RBC.patch
79    
80     # remove pamconsole option
81     use pam_console || epatch ${FILESDIR}/${PN}-0.5.1-old_storage_policy.patch
82     }
83    
84     src_compile() {
85     econf \
86     --with-os-type=gentoo \
87     --with-pid-file=/var/run/hald.pid \
88     $(use_enable debug verbose-mode) \
89     $(use_enable pcmcia pcmcia-support) \
90     $(use_enable acpi acpi-proc) \
91     $(use_enable doc docbook-docs) \
92     $(use_enable doc doxygen-docs) \
93     || die "configure failed"
94    
95     emake || die "make failed"
96     }
97    
98     src_install() {
99     make DESTDIR=${D} install || die
100    
101     # We install this in a seperate package to avoid gnome-python dep
102     rm ${D}/usr/bin/hal-device-manager
103    
104     # initscript
105     newinitd ${FILESDIR}/0.5-hald.rc hald
106    
107     dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
108    
109     # Script to unmount devices if they are yanked out (from upstream)
110     exeinto /etc/dev.d/default
111     doexe ${FILESDIR}/hal-unmount.dev
112     }
113    
114     pkg_postinst() {
115     ## We need to add the user/groups *after* package compilation/installation, so that we
116     ## don't change the user without the package being installed.
117     ##
118     enewgroup haldaemon || die "Problem adding haldaemon group"
119     # HAL drops priviledges by default now ...
120     # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups)
121     enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS} || die "Problem adding haldaemon user"
122    
123     # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS}
124     # If users have a problem with this, let them file a bug
125     usermod -G ${HALDAEMON_GROUPS} haldaemon
126    
127     einfo "The HAL daemon needs to be running for certain applications to"
128     einfo "work. Suggested is to add the init script to your start-up"
129     einfo "scripts, this should be done like this :"
130     einfo "\`rc-update add hald default\`"
131     }

  ViewVC Help
Powered by ViewVC 1.1.20