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

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

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

Revision 1.8 Revision 1.9
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 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.10.ebuild,v 1.8 2008/01/10 18:05:15 jer Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/Attic/hal-0.5.10.ebuild,v 1.9 2008/02/08 20:11:00 wolf31o2 Exp $
4 4
5inherit eutils linux-info autotools flag-o-matic 5inherit eutils linux-info autotools flag-o-matic
6 6
7PATCH_VER="0" 7PATCH_VER="0"
8 8
64 64
65## HAL Daemon drops privledges so we need group access to read disks 65## HAL Daemon drops privledges so we need group access to read disks
66HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb" 66HALDAEMON_GROUPS_LINUX="haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb"
67HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator" 67HALDAEMON_GROUPS_FREEBSD="haldaemon,plugdev,operator"
68 68
69function notify_uevent() { 69function check_hotplug_net() {
70 ewarn 70 local CONFIG_CHECK="~HOTPLUG ~NET"
71 ewarn "You must enable Kernel Userspace Events in your kernel." 71 local WARNING_HOTPLUG="CONFIG_HOTPLUG:\tis not set (required for HAL)"
72 ewarn "For this you need to enable 'Hotplug' under 'General Setup' and" 72 local WARNING_NET="CONFIG_NET:\tis not set (required for HAL)"
73 ewarn "basic networking. They are marked CONFIG_HOTPLUG and CONFIG_NET" 73 check_extra_config
74 ewarn "in the config file." 74 echo
75 ewarn
76 ebeep 5
77} 75}
78 76
79function notify_inotify() { 77function check_inotify() {
80 ewarn 78 local CONFIG_CHECK="~INOTIFY_USER"
81 ewarn "You must enable the Inotify system in your kernel." 79 local WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER:\tis not set (required for HAL)"
82 ewarn "For this you need to enable 'Inotify support for userspace'" 80 check_extra_config
83 ewarn "in 'File systems'. It is marked CONFIG_INOTIFY_USER in the config file." 81 echo
84 ewarn
85 ebeep 5
86} 82}
87 83
88function notify_acpi_procfs() { 84function check_acpi_proc() {
89 ewarn 85 local CONFIG_CHECK="~ACPI_PROCFS ~ACPI_PROC_EVENT"
90 ewarn "You must enable support for the ACPI proc files in your kernel." 86 local WARNING_ACPI_PROCFS="CONFIG_ACPI_PROCFS:\tis not set (required for HAL)"
91 ewarn "For this you need to enable '/proc/acpi files' in" 87 local WARNING_ACPI_PROC_EVENT="CONFIG_ACPI_PROC_EVENT:\tis not set (required for HAL)"
92 ewarn "'ACPI Support (Advanced Configuration and Power Interface) Support'." 88 check_extra_config
93 ewarn "It is marked ewarn CONFIG_ACPI_PROCFS in the config file." 89 echo
94 ewarn
95 ebeep 5
96}
97
98function notify_acpi_proc_event() {
99 ewarn
100 ewarn "You have not enabled support for the /proc/acpi/event interface."
101 ewarn "For this you need to enable '/proc/acpi/event support' in"
102 ewarn "ACPI Support (Advanced Configuration and Power Interface) Support"
103 ewarn
104 ebeep 5
105} 90}
106 91
107pkg_setup() { 92pkg_setup() {
108 if use kernel_linux; then 93 if use kernel_linux ; then
94 if [ -e ${ROOT}/usr/src/linux/.config ] ; then
95 kernel_is ge 2 6 19 || \
109 kernel_is ge 2 6 19 || ewarn "HAL requires a kernel version 2.6.19 or newer" 96 ewarn "HAL requires a kernel version 2.6.19 or newer"
110
111 if ! ( linux_chkconfig_present HOTPLUG && linux_chkconfig_present NET )
112 then
113 notify_uevent
114 fi
115
116 linux_chkconfig_present INOTIFY_USER || notify_inotify
117
118 if kernel_is lt 2 6 23 && use acpi ; then 97 if kernel_is lt 2 6 23 && use acpi ; then
119 linux_chkconfig_present ACPI_PROCFS || notify_acpi_procfs 98 check_acpi_proc
120 linux_chkconfig_present ACPI_PROC_EVENT || notify_acpi_proc_event
121 fi 99 fi
100 fi
101
102 check_hotplug_net
103 check_inotify
122 fi 104 fi
123 105
124 # http://devmanual.gentoo.org/ebuild-writing/functions/ 106 # http://devmanual.gentoo.org/ebuild-writing/functions/
125 # http://bugs.gentoo.org/show_bug.cgi?id=191605 107 # http://bugs.gentoo.org/show_bug.cgi?id=191605
126 108

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.20