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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/Attic/hal-0.5.4.ebuild,v 1.1 2005/08/27 04:09:31 cardoe Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/Attic/hal-0.5.4.ebuild,v 1.2 2005/09/05 20:03:09 cardoe Exp $
4 4
5inherit eutils linux-info versionator flag-o-matic 5inherit eutils linux-info
6 6
7DESCRIPTION="Hardware Abstraction Layer" 7DESCRIPTION="Hardware Abstraction Layer"
8HOMEPAGE="http://www.freedesktop.org/Software/hal" 8HOMEPAGE="http://www.freedesktop.org/Software/hal"
9SRC_URI="http://freedesktop.org/~david/dist/${P}.tar.gz" 9SRC_URI="http://freedesktop.org/~david/dist/${P}.tar.gz"
10 10
11LICENSE="|| ( GPL-2 AFL-2.0 )" 11LICENSE="|| ( GPL-2 AFL-2.0 )"
12SLOT="0" 12SLOT="0"
13KEYWORDS="~x86 ~amd64 ~ia64 ~ppc ~ppc64" 13KEYWORDS="~x86 ~amd64 ~ia64 ~ppc ~ppc64"
14IUSE="debug pcmcia doc pam_console" 14IUSE="debug pcmcia doc pam_console"
15 15
16
17### We don't technically "need" pam, but without pam_console, stuff
18### doesn't work (particularly NetworkManager).
19### dep on a specific util-linux version for managed mount patches #70873
20RDEPEND=">=dev-libs/glib-2.6 16RDEPEND=">=dev-libs/glib-2.6
21 >=sys-apps/dbus-0.33 17 >=sys-apps/dbus-0.33
22 dev-libs/expat 18 dev-libs/expat
23 >=sys-fs/udev-063 19 >=sys-fs/udev-063
24 sys-apps/hotplug 20 sys-apps/hotplug
33 doc? ( app-doc/doxygen )" 29 doc? ( app-doc/doxygen )"
34 30
35## HAL Daemon drops privledges so we need group access to read disks 31## HAL Daemon drops privledges so we need group access to read disks
36HALDAEMON_GROUPS="haldaemon,disk,cdrom,cdrw,floppy" 32HALDAEMON_GROUPS="haldaemon,disk,cdrom,cdrw,floppy"
37 33
38# We need to run at least a 2.6.10 kernel, this is a
39# way to ensure that to some extent
40pkg_setup() { 34pkg_setup() {
41 35
42 linux-info_pkg_setup 36 linux-info_pkg_setup
43 kernel_is ge 2 6 10 \ 37 kernel_is ge 2 6 10 \
44 || die "You need a 2.6.10 or newer kernel to run this package" 38 || die "You need a 2.6.10 or newer kernel to run this package"
47 eerror "You need to build pam with pam_console support" 41 eerror "You need to build pam with pam_console support"
48 eerror "Please remerge sys-libs/pam with USE=pam_console" 42 eerror "Please remerge sys-libs/pam with USE=pam_console"
49 die "pam without pam_console detected" 43 die "pam without pam_console detected"
50 fi 44 fi
51 45
52 if [ -d ${D}/etc/hal/device.d ]; then 46 if [ -d ${ROOT}/etc/hal/device.d ]; then
53 eerror "HAL 0.5.x will not run with the HAL 0.4.x series of" 47 eerror "HAL 0.5.x will not run with the HAL 0.4.x series of"
54 eerror "/etc/hal/device.d/ so please remove this directory" 48 eerror "/etc/hal/device.d/ so please remove this directory"
55 eerror "with rm -rf /etc/hal/device.d/ and then re-emerge." 49 eerror "with rm -rf /etc/hal/device.d/ and then re-emerge."
56 eerror "This is due to configuration protection of /etc/" 50 eerror "This is due to configuration protection of /etc/"
57 die "remove /etc/hal/device.d/" 51 die "remove /etc/hal/device.d/"
65 # remove pamconsole option 59 # remove pamconsole option
66 use pam_console || epatch ${FILESDIR}/${PN}-0.5.1-old_storage_policy.patch 60 use pam_console || epatch ${FILESDIR}/${PN}-0.5.1-old_storage_policy.patch
67} 61}
68 62
69src_compile() { 63src_compile() {
70
71 local myconf
72
73 # NOTE: fstab-sync dies at an assert() and is deprecated upstream.
74 # As such, no need to support it.
75 econf \ 64 econf \
76 `use_enable debug verbose-mode` \ 65 $(use_enable debug verbose-mode) \
77 `use_enable pcmcia pcmcia-support` \ 66 $(use_enable pcmcia pcmcia-support) \
78 --enable-sysfs-carrier \ 67 --enable-sysfs-carrier \
79 --enable-hotplug-map \ 68 --enable-hotplug-map \
80 `use_enable doc docbook-docs` \ 69 $(use_enable doc docbook-docs) \
81 `use_enable doc doxygen-docs` \ 70 $(use_enable doc doxygen-docs) \
82 --with-pid-file=/var/run/hald.pid \ 71 --with-pid-file=/var/run/hald.pid \
83 || die "configure failed" 72 || die "configure failed"
84 73
85 emake || die "make failed" 74 emake || die "make failed"
86
87} 75}
88 76
89src_install() { 77src_install() {
90
91 make DESTDIR=${D} install || die 78 make DESTDIR=${D} install || die
92 79
93 # We install this in a seperate package to avoid gnome-python dep 80 # We install this in a seperate package to avoid gnome-python dep
94 rm ${D}/usr/bin/hal-device-manager 81 rm ${D}/usr/bin/hal-device-manager
95 82
99 dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README 86 dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
100 87
101 # Script to unmount devices if they are yanked out (from upstream) 88 # Script to unmount devices if they are yanked out (from upstream)
102 exeinto /etc/dev.d/default 89 exeinto /etc/dev.d/default
103 doexe ${FILESDIR}/hal-unmount.dev 90 doexe ${FILESDIR}/hal-unmount.dev
104
105
106} 91}
107 92
108pkg_postinst() { 93pkg_postinst() {
109 ##
110 ## The old hal ran as root. This was *very* bad because of all the user IO that HAL does.
111 ## The new hal runs as 'haldaemon', but haldaemon needs to be in the appropriate groups to work.
112 ## Below is a hack to make this transition (upgrade from previous versions) smooth.
113 ## We need to add the user/groups *after* package compilation/installation, so that we 94 ## 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. 95 ## don't change the user without the package being installed.
115 ## 96 ##
116 enewgroup haldaemon || die "Problem adding haldaemon group" 97 enewgroup haldaemon || die "Problem adding haldaemon group"
117 # HAL drops priviledges by default now ... 98 # HAL drops priviledges by default now ...

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20