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

Contents of /sys-apps/hal/hal-0.5.7.1-r5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.22 - (show annotations) (download)
Tue Dec 23 21:04:59 2008 UTC (5 years, 3 months ago) by cardoe
Branch: MAIN
CVS Tags: HEAD
Changes since 1.21: +1 -1 lines
FILE REMOVED
remove old versions that are no longer supported
(Portage version: 2.1.6.1/cvs/Linux 2.6.27-gentoo-r7 x86_64)

1 # Copyright 1999-2008 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.7.1-r5.ebuild,v 1.21 2008/12/19 17:37:01 pva 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="alpha ~amd64 arm hppa ia64 ~ppc ppc64 sh sparc x86"
14 IUSE="acpi crypt debug dmi doc pcmcia selinux"
15
16 RDEPEND=">=dev-libs/glib-2.6
17 >=dev-libs/dbus-glib-0.71
18 >=sys-fs/udev-083
19 >=sys-apps/util-linux-2.12r
20 || ( >=sys-kernel/linux-headers-2.6 >=sys-kernel/mips-headers-2.6 )
21 dev-libs/expat
22 sys-apps/pciutils
23 dev-libs/libusb
24 virtual/eject
25 dmi? ( >=sys-apps/dmidecode-2.7 )
26 crypt? ( >=sys-fs/cryptsetup-1.0.5 )
27 selinux? ( sys-libs/libselinux )"
28
29 DEPEND="${RDEPEND}
30 dev-util/pkgconfig
31 >=dev-util/intltool-0.29
32 doc? ( app-doc/doxygen app-text/docbook-sgml-utils )"
33
34 ## HAL Daemon drops privledges so we need group access to read disks
35 HALDAEMON_GROUPS="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
36
37 function check_uevent() {
38 local CONFIG_CHECK="~KOBJECT_UEVENT"
39 local WARNING_KOBJECT_UEVENT="CONFIG_KOBJECT_UEVENT:\tis not set (required for HAL)
40 "
41 check_extra_config
42 }
43
44 function check_hotplug_net() {
45 local CONFIG_CHECK="~HOTPLUG ~NET"
46 local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)
47 "
48 local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)
49 "
50 check_extra_config
51 }
52
53 function check_procfs() {
54 local CONFIG_CHECK="~PROC_FS"
55 local WARNING_PROC_FS="CONFIG_PROC_FS:\tis not set (required for HAL)
56 "
57 check_extra_config
58 }
59
60 pkg_setup() {
61 if ! built_with_use --missing true sys-apps/pciutils hal ; then
62 if built_with_use --missing false sys-apps/pciutils zlib ; then
63 die "You MUST build sys-apps/pciutils without the zlib USE flag"
64 fi
65 fi
66
67 if [ -e "${ROOT}/usr/src/linux/.config" ] ; then
68 if kernel_is ge 2 6 16 ; then
69 check_hotplug_net
70 elif kernel_is eq 2 6 15 ; then
71 check_uevent
72 else
73 ewarn "HAL requires a kernel version 2.6.15 or newer"
74 fi
75 fi
76
77 use acpi && check_procfs
78
79 if [ -d "${ROOT}/etc/hal/device.d" ]; then
80 eerror "HAL 0.5.x will not run with the HAL 0.4.x series of"
81 eerror "/etc/hal/device.d/ so please remove this directory"
82 eerror "with rm -rf /etc/hal/device.d/ and then re-emerge."
83 eerror "This is due to configuration protection of /etc/"
84 die "remove /etc/hal/device.d/"
85 fi
86 }
87
88 src_unpack() {
89 unpack ${A}
90 cd "${S}"
91
92 # handle ignored volumes properly
93 epatch "${FILESDIR}"/${PN}-0.5.7.1-ignored-volumes.patch
94
95 # Fix bash in hald scripts
96 epatch "${FILESDIR}"/${PN}-0.5.7.1-hald-scripts.patch
97
98 # probe partition table
99 epatch "${FILESDIR}"/${PN}-0.5.7-part-table.patch
100
101 # fix pmu support crash
102 epatch "${FILESDIR}"/${PN}-0.5.7-pmu-fix.patch
103
104 # unclean unmount
105 epatch "${FILESDIR}"/${PN}-0.5.7-unclean-unmount-r1.patch
106
107 # allow plugdev group people to mount
108 epatch "${FILESDIR}"/${PN}-0.5.7-plugdev-allow-send.patch
109
110 # rescan devices on resume
111 epatch "${FILESDIR}"/${PN}-0.5.7.1-rescan-on-resume.patch
112
113 # dbus deprecated dbus_connection_disconnect
114 epatch "${FILESDIR}"/${PN}-0.5.7.1-dbus-close.patch
115
116 # sr driver fix
117 epatch "${FILESDIR}"/${PN}-0.5.7.1-sr-driver.patch
118
119 # mounting autofs & subfs fixes
120 epatch "${FILESDIR}"/${PN}-0.5.7.1-autofs-subfs.patch
121
122 # iPod Nano detected as RAID fix
123 epatch "${FILESDIR}"/${PN}-0.5.7.1-ipod-nano.patch
124
125 # Floppies mounting fix
126 epatch "${FILESDIR}"/${PN}-0.5.7.1-floppies-fix.patch
127
128 # fix undeclared ctype.h so everyone can stop getting their panties in a
129 # bundle
130 epatch "${FILESDIR}"/${PN}-0.5.7.1-ctype-fix.patch
131
132 # fix for dbus close/unref so we stop having errors from lshal about D-Bus
133 epatch "${FILESDIR}"/${PN}-0.5.7.1-fix-dbus.patch
134
135 # Fix for fdi issues with indirection problem in copy_property
136 # All work by Martin "Parmus" Parm <parmus@diku.dk
137 # passed upstream as fd.o bug #9849
138 epatch "${FILESDIR}"/${PN}-0.5.7.1-indirection-fix.patch
139 }
140
141 src_compile() {
142
143 econf \
144 --with-doc-dir=/usr/share/doc/${PF} \
145 --with-os-type=gentoo \
146 --with-pid-file=/var/run/hald.pid \
147 --with-hwdata=/usr/share/misc \
148 --enable-hotplug-map \
149 $(use_enable debug verbose-mode) \
150 $(use_enable pcmcia pcmcia-support) \
151 $(use_enable acpi acpi-proc) \
152 $(use_enable doc docbook-docs) \
153 $(use_enable doc doxygen-docs) \
154 $(use_enable selinux) \
155 || die "configure failed"
156
157 emake || die "make failed"
158 }
159
160 src_install() {
161 make DESTDIR="${D}" install || die
162 dodoc AUTHORS ChangeLog NEWS README
163
164 # remove dep on gnome-python
165 mv "${D}"/usr/bin/hal-device-manager "${D}"/usr/share/hal/device-manager/
166
167 # hal umount for unclean unmounts
168 exeinto /lib/udev/
169 newexe "${FILESDIR}"/hal-unmount.dev hal_unmount
170
171 # initscript
172 newinitd "${FILESDIR}"/0.5-hald.rc hald
173
174 # We now create and keep /media here as both gnome-mount and pmount
175 # use these directories, to avoid collision.
176 dodir /media
177 keepdir /media
178 }
179
180 pkg_postinst() {
181 # Despite what people keep changing this location. Either one works.. it doesn't matter
182 # http://dev.gentoo.org/~plasmaroo/devmanual/ebuild-writing/functions/
183
184 # Create groups for hotplugging and HAL
185 enewgroup haldaemon
186 enewgroup plugdev
187
188 # HAL drops priviledges by default now ...
189 # ... so we must make sure it can read disk/cdrom info (ie. be in ${HALDAEMON_GROUPS} groups)
190 enewuser haldaemon -1 "-1" /dev/null ${HALDAEMON_GROUPS}
191
192 # Make sure that the haldaemon user is in the ${HALDAEMON_GROUPS}
193 # If users have a problem with this, let them file a bug
194 usermod -G ${HALDAEMON_GROUPS} haldaemon
195
196 elog "The HAL daemon needs to be running for certain applications to"
197 elog "work. Suggested is to add the init script to your start-up"
198 elog "scripts, this should be done like this :"
199 elog "\`rc-update add hald default\`"
200 echo
201 elog "Looking for automounting support? Add yourself to the plugdev group"
202 }

  ViewVC Help
Powered by ViewVC 1.1.20