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

Diff of /sys-apps/hal/hal-0.5.5.1-r1.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.5.1-r1.ebuild,v 1.1 2005/12/16 15:57:32 spider Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/Attic/hal-0.5.5.1-r1.ebuild,v 1.2 2005/12/21 09:41:19 cardoe Exp $
4 4
5inherit eutils linux-info 5inherit eutils linux-info debug
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
46 linux-info_pkg_setup 46 linux-info_pkg_setup
47 47
48 kernel_is ge 2 6 13 \ 48 kernel_is ge 2 6 13 \
49 || die "You need a 2.6.13 or newer kernel to run this package" 49 || die "You need a 2.6.13 or newer kernel to run this package"
50 50
51 if [ kernel_is le 2 6 15 ]; then
51 linux_chkconfig_present KOBJECT_UEVENT \ 52 linux_chkconfig_present KOBJECT_UEVENT || notify_uevent
52 || notify_uevent 53 fi
53 54
54 if use acpi ; then 55 if use acpi ; then
55 linux_chkconfig_present PROC_FS \ 56 linux_chkconfig_present PROC_FS \
56 || die "ACPI support requires PROC_FS support in kernel" 57 || die "ACPI support requires PROC_FS support in kernel"
57 fi 58 fi
60 eerror "You need to build pam with pam_console support" 61 eerror "You need to build pam with pam_console support"
61 eerror "Please remerge sys-libs/pam with USE=pam_console" 62 eerror "Please remerge sys-libs/pam with USE=pam_console"
62 die "pam without pam_console detected" 63 die "pam without pam_console detected"
63 fi 64 fi
64 65
65 if [ -d ${ROOT}/etc/hal/device.d ]; then 66 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 "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 "/etc/hal/device.d/ so please remove this directory"
68 eerror "with rm -rf /etc/hal/device.d/ and then re-emerge." 69 eerror "with rm -rf /etc/hal/device.d/ and then re-emerge."
69 eerror "This is due to configuration protection of /etc/" 70 eerror "This is due to configuration protection of /etc/"
70 die "remove /etc/hal/device.d/" 71 die "remove /etc/hal/device.d/"
71 fi 72 fi
72} 73}
73 74
74 75
75src_unpack() { 76src_unpack() {
76 unpack ${A} 77 unpack "${A}"
77 cd ${S} 78 cd "${S}"
78 epatch ${FILESDIR}/${P}-RBC.patch 79 epatch "${FILESDIR}"/${P}-RBC.patch
79 80
80 # remove pamconsole option 81 # remove pamconsole option
81 use pam_console || epatch ${FILESDIR}/${PN}-0.5.1-old_storage_policy.patch 82 use pam_console || epatch "${FILESDIR}"/${PN}-0.5.1-old_storage_policy.patch
82} 83}
83 84
84src_compile() { 85src_compile() {
85 econf \ 86 econf \
86 --with-os-type=gentoo \ 87 --with-os-type=gentoo \
94 95
95 emake || die "make failed" 96 emake || die "make failed"
96} 97}
97 98
98src_install() { 99src_install() {
99 make DESTDIR=${D} install || die 100 make DESTDIR="${D}" install || die
100 101
101 # We install this in a seperate package to avoid gnome-python dep 102 # We install this in a seperate package to avoid gnome-python dep
102 rm ${D}/usr/bin/hal-device-manager 103 rm "${D}"/usr/bin/hal-device-manager
103 104
104 # initscript 105 # initscript
105 newinitd ${FILESDIR}/0.5-hald.rc hald 106 newinitd "${FILESDIR}"/0.5-hald.rc hald
106 107
107 dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README 108 dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
108 109
109 # Script to unmount devices if they are yanked out (from upstream) 110 # Script to unmount devices if they are yanked out (from upstream)
110 exeinto /etc/dev.d/default 111 exeinto /etc/dev.d/default
111 doexe ${FILESDIR}/hal-unmount.dev 112 doexe "${FILESDIR}"/hal-unmount.dev
113}
114
115pkg_preinst() {
116 enewgroup haldaemon || die "Problem adding haldaemon group"
117 enewuser haldaemon -1 "-1" -1 ${HALDAEMON_GROUPS} || die "Problem adding haldaemon user"
118 usermod -G ${HALDAEMON_GROUPS} haldaemon
112} 119}
113 120
114pkg_postinst() { 121pkg_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" 122 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" 123 einfo "work. Suggested is to add the init script to your start-up"
129 einfo "scripts, this should be done like this :" 124 einfo "scripts, this should be done like this :"
130 einfo "\`rc-update add hald default\`" 125 einfo "\`rc-update add hald default\`"
131} 126}

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

  ViewVC Help
Powered by ViewVC 1.1.20