mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
HAL and ARM pm-utils added
This commit is contained in:
parent
382096d584
commit
715ea7c17e
15 changed files with 716 additions and 0 deletions
79
extra/hal/PKGBUILD
Executable file
79
extra/hal/PKGBUILD
Executable file
|
@ -0,0 +1,79 @@
|
|||
# $Id: PKGBUILD 61559 2009-12-19 19:21:33Z jgc $
|
||||
# Maintainer: Jan de Groot <jgc@archlinux.org>
|
||||
# Contributor: Link Dupont <link@subpop.net>
|
||||
|
||||
# NOTE!!!
|
||||
# You'll need to edit your /usr/include/scsi/scsi.h:
|
||||
# Change "u8" to "__u8" on lines 148 to 150-something
|
||||
|
||||
pkgname=hal
|
||||
pkgver=0.5.14
|
||||
pkgrel=1
|
||||
pkgdesc="Hardware Abstraction Layer"
|
||||
arch=(arm)
|
||||
license=('GPL' 'custom')
|
||||
url="http://www.freedesktop.org/wiki/Software/hal"
|
||||
depends=('dbus-glib>=0.82' 'libusb>=0.1.12' 'udev>=146' 'filesystem>=0.7.1-5' 'hal-info>=0.20090716' 'eject' 'dmidecode' 'pciutils>=3.0.2' 'usbutils>=0.73-5' 'pm-utils>=1.2.5' 'consolekit>=0.4.1' 'util-linux-ng>=2.16')
|
||||
makedepends=('pkgconfig' 'gperf')
|
||||
options=('!libtool' '!makeflags')
|
||||
install=hal.install
|
||||
source=(http://hal.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
|
||||
hal
|
||||
cryptsetup_location.patch
|
||||
hal-0.5.9-hide-diagnostic.patch
|
||||
hal-remove-dell-killswitch.patch
|
||||
hal-KVM-evdev.patch
|
||||
hal-HDAPS-blacklist.patch
|
||||
hal-xen-unignore-axes.patch
|
||||
hal-use-at-console.patch
|
||||
fix-libusb-detection.patch)
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
patch -Np1 -i "${srcdir}/cryptsetup_location.patch" || return 1
|
||||
patch -Np1 -i "${srcdir}/hal-0.5.9-hide-diagnostic.patch" || return 1
|
||||
patch -Np1 -i "${srcdir}/hal-remove-dell-killswitch.patch" || return 1
|
||||
patch -Np1 -i "${srcdir}/hal-KVM-evdev.patch" || return 1
|
||||
patch -Np1 -i "${srcdir}/hal-HDAPS-blacklist.patch" || return 1
|
||||
patch -Np1 -i "${srcdir}/hal-xen-unignore-axes.patch" || return 1
|
||||
patch -Np1 -i "${srcdir}/hal-use-at-console.patch" || return 1
|
||||
patch -Np1 -i "${srcdir}/fix-libusb-detection.patch" || return 1
|
||||
|
||||
libtoolize --force || return 1
|
||||
aclocal || return 1
|
||||
autoconf || return 1
|
||||
automake || return 1
|
||||
|
||||
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
|
||||
--libexecdir=/usr/lib/hal --with-udev-prefix=/etc \
|
||||
--enable-static=no --disable-acpi-ibm \
|
||||
--disable-man-pages --disable-gtk-doc \
|
||||
--disable-docbook-docs --disable-console-kit \
|
||||
--disable-policy-kit --disable-acl-management \
|
||||
--enable-umount-helper --disable-smbios --disable-acpi \
|
||||
--with-hal-user=hal --with-hal-group=hal \
|
||||
--with-omap --enable-pmu --without-cpufreq \
|
||||
--without-usb-csr --without-keymaps \
|
||||
--disable-sonypic --without-dell-backlight \
|
||||
--with-pid-file=/var/run/hald.pid || return 1
|
||||
|
||||
make || return 1
|
||||
|
||||
make DESTDIR="${pkgdir}" install || return 1
|
||||
install -m755 -d "${pkgdir}/etc/rc.d"
|
||||
install -m755 -d "${pkgdir}/media" || return 1
|
||||
install -m755 "${srcdir}/hal" "${pkgdir}/etc/rc.d/" || return 1
|
||||
|
||||
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
|
||||
}
|
||||
md5sums=('e9163df591a6f38f59fdbfe33e73bf20'
|
||||
'277e96ac130d7bfce0b30f0b80db8782'
|
||||
'c688a3c6574699365926f4fef7441545'
|
||||
'4d4b6801a1cedca22b8bdd9db73b16fb'
|
||||
'6d87c3e63184ae3a69caafc846f538a3'
|
||||
'6507e5091ee2d11a87ae738a8e2caecb'
|
||||
'1171c2d83b76059f2da7a3538e08fa4e'
|
||||
'52bd305299aa22ae07f1a862c22d30fa'
|
||||
'3f11234fb5e5044fbfc5199ec65b182c'
|
||||
'da088f12cfc2d190bbf95b747e19ab9e')
|
36
extra/hal/cryptsetup_location.patch
Executable file
36
extra/hal/cryptsetup_location.patch
Executable file
|
@ -0,0 +1,36 @@
|
|||
diff -Naur hal-0.5.8.1/tools/linux/hal-luks-remove-linux hal-0.5.8.1-new/tools/linux/hal-luks-remove-linux
|
||||
--- hal-0.5.8.1/tools/linux/hal-luks-remove-linux 2006-09-19 22:23:25.000000000 +0200
|
||||
+++ hal-0.5.8.1-new/tools/linux/hal-luks-remove-linux 2007-02-11 13:04:46.000000000 +0100
|
||||
@@ -6,7 +6,7 @@
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2.
|
||||
|
||||
-CRYPTSETUP=/sbin/cryptsetup
|
||||
+CRYPTSETUP=/usr/sbin/cryptsetup
|
||||
|
||||
echo LUKS cryptotext device $HAL_PROP_INFO_UDI is going away
|
||||
|
||||
diff -Naur hal-0.5.8.1/tools/linux/hal-luks-setup-linux hal-0.5.8.1-new/tools/linux/hal-luks-setup-linux
|
||||
--- hal-0.5.8.1/tools/linux/hal-luks-setup-linux 2006-09-19 22:23:25.000000000 +0200
|
||||
+++ hal-0.5.8.1-new/tools/linux/hal-luks-setup-linux 2007-02-11 13:04:45.000000000 +0100
|
||||
@@ -9,7 +9,7 @@
|
||||
read password
|
||||
PASSWORD=${PASSWORD//[^[:alnum:]_=[:space:]:.+-]/@}
|
||||
|
||||
-CRYPTSETUP=/sbin/cryptsetup
|
||||
+CRYPTSETUP=/usr/sbin/cryptsetup
|
||||
|
||||
if [ ! -f $CRYPTSETUP ]; then
|
||||
echo org.freedesktop.Hal.Device.Volume.Crypto.SetupError >&2
|
||||
diff -Naur hal-0.5.8.1/tools/linux/hal-luks-teardown-linux hal-0.5.8.1-new/tools/linux/hal-luks-teardown-linux
|
||||
--- hal-0.5.8.1/tools/linux/hal-luks-teardown-linux 2006-09-19 22:23:25.000000000 +0200
|
||||
+++ hal-0.5.8.1-new/tools/linux/hal-luks-teardown-linux 2007-02-11 13:04:44.000000000 +0100
|
||||
@@ -6,7 +6,7 @@
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2.
|
||||
|
||||
-CRYPTSETUP=/sbin/cryptsetup
|
||||
+CRYPTSETUP=/usr/sbin/cryptsetup
|
||||
|
||||
if [ ! -f $CRYPTSETUP ]; then
|
||||
echo org.freedesktop.Hal.Device.Volume.Crypto.TeardownError >&2
|
66
extra/hal/fix-libusb-detection.patch
Executable file
66
extra/hal/fix-libusb-detection.patch
Executable file
|
@ -0,0 +1,66 @@
|
|||
From fce91df8ba7f305c624baf1f06961c040b088ecc Mon Sep 17 00:00:00 2001
|
||||
From: Joe Marcus Clarke <marcus@FreeBSD.org>
|
||||
Date: Tue, 08 Dec 2009 00:05:27 +0000
|
||||
Subject: Fix libusb detection on Linux
|
||||
|
||||
Adjust the FreeBSD libusb20 code so that it does not interfere with the
|
||||
Linux libusb detection.
|
||||
|
||||
Reported by: Robby Workman <rw@rlworkman.net>
|
||||
---
|
||||
diff --git a/configure.in b/configure.in
|
||||
index a8fda51..8363595 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -479,9 +479,6 @@ if test "x$with_libpci" != xno ; then
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_LIBPCI], [test "x$USE_LIBPCI" = "xyes"])
|
||||
|
||||
-USE_LIBUSB20=no
|
||||
-USE_LIBUSB=no
|
||||
-LIBUSB20_LIBS=""
|
||||
AC_ARG_WITH([backend],
|
||||
AS_HELP_STRING([--with-backend=<name>],
|
||||
[backend to use (linux/solaris/freebsd/dummy)]),
|
||||
@@ -510,21 +507,25 @@ AM_CONDITIONAL(HALD_COMPILE_FREEBSD, [test x$HALD_BACKEND = xfreebsd], [Compilin
|
||||
AM_CONDITIONAL(HALD_COMPILE_SOLARIS, [test x$HALD_BACKEND = xsolaris], [Compiling for Solaris])
|
||||
AC_SUBST(HALD_BACKEND)
|
||||
if test "x$HALD_BACKEND" = "xfreebsd"; then
|
||||
- AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_LIBUSB20=yes], [USE_LIBUSB20=no])
|
||||
-fi
|
||||
-if test "x$USE_LIBUSB20" = "xno"; then
|
||||
- AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_LIBUSB=yes], [USE_LIBUSB=no])
|
||||
-fi
|
||||
-AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB20" = "xyes"])
|
||||
-AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB" = "xyes"])
|
||||
-if test "x$USE_LIBUSB20" = "xyes"; then
|
||||
- AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20])
|
||||
- LIBUSB20_LIBS="-lusb20"
|
||||
-elif test "x$USE_LIBUSB" = "xyes"; then
|
||||
- AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libsub20])
|
||||
- LIBUSB20_LIBS="-lusb"
|
||||
+ USE_BSDLIBUSB20=no
|
||||
+ USE_BSDLIBUSB=no
|
||||
+ LIBUSB20_LIBS=""
|
||||
+ AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_BSDLIBUSB20=yes], [USE_BSDLIBUSB20=no])
|
||||
+ if test "x$USE_BSDLIBUSB20" = "xno"; then
|
||||
+ AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_BSDLIBUSB=yes], [USE_BSDLIBUSB=no])
|
||||
+ fi
|
||||
+ AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_BSDLIBUSB20" = "xyes" -o "x$USE_BSDLIBUSB" = "xyes"])
|
||||
+ if test "x$USE_BSDLIBUSB20" = "xyes"; then
|
||||
+ AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20])
|
||||
+ LIBUSB20_LIBS="-lusb20"
|
||||
+ elif test "x$USE_BSDLIBUSB" = "xyes"; then
|
||||
+ AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libsub20])
|
||||
+ LIBUSB20_LIBS="-lusb"
|
||||
+ fi
|
||||
+ AC_SUBST(LIBUSB20_LIBS)
|
||||
+else
|
||||
+ AM_CONDITIONAL([HAVE_LIBUSB20], [false])
|
||||
fi
|
||||
-AC_SUBST(LIBUSB20_LIBS)
|
||||
|
||||
dnl DBUS API is subject to changes
|
||||
AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE, [], [DBUS API is subject to change])
|
||||
--
|
||||
cgit v0.8.3-6-g21f6
|
54
extra/hal/hal
Executable file
54
extra/hal/hal
Executable file
|
@ -0,0 +1,54 @@
|
|||
#!/bin/bash
|
||||
|
||||
# general config
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
#Check for running dbus, start when not running
|
||||
ck_daemon dbus && /etc/rc.d/dbus start
|
||||
if [ -x /etc/rc.d/acpid ]; then
|
||||
ck_daemon acpid && /etc/rc.d/acpid start
|
||||
fi
|
||||
stat_busy "Starting Hardware Abstraction Layer"
|
||||
if [ ! -x /var/cache/hald ] ; then
|
||||
install -m755 -g 82 -o 82 -d /var/cache/hald
|
||||
fi
|
||||
if [ ! -x /var/run/hald ]; then
|
||||
install -m755 -g 82 -o 82 -d /var/run/hald
|
||||
fi
|
||||
if [ ! -x /var/run/hald/hald-local ]; then
|
||||
install -m755 -g 0 -o 0 -d /var/run/hald/hald-local
|
||||
fi
|
||||
if [ ! -x /var/run/hald/hald-runner ]; then
|
||||
install -m755 -g 0 -o 0 -d /var/run/hald/hald-runner
|
||||
fi
|
||||
/usr/sbin/hald
|
||||
if [ $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
add_daemon hal
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Stopping Hardware Abstraction Layer"
|
||||
[ -f /var/run/hald.pid ] && kill `cat /var/run/hald.pid` &> /dev/null
|
||||
if [ $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
rm_daemon hal
|
||||
stat_done
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
;;
|
||||
esac
|
||||
exit 0
|
14
extra/hal/hal-0.5.9-hide-diagnostic.patch
Executable file
14
extra/hal/hal-0.5.9-hide-diagnostic.patch
Executable file
|
@ -0,0 +1,14 @@
|
|||
--- hal-0.5.9/fdi/policy/10osvendor/20-storage-methods.fdi.orig 2007-05-01 21:39:31.000000000 +0000
|
||||
+++ hal-0.5.9/fdi/policy/10osvendor/20-storage-methods.fdi 2007-05-01 21:51:14.000000000 +0000
|
||||
@@ -100,6 +100,11 @@
|
||||
</match>
|
||||
</match>
|
||||
|
||||
+ <!-- Hide partitions marked as Compaq Diagnostics -->
|
||||
+ <match key="volume.partition.type" string="0x12">
|
||||
+ <merge key="volume.ignore" type="bool">true</merge>
|
||||
+ </match>
|
||||
+
|
||||
<!-- EFI firmware partitions -->
|
||||
<match key="volume.fstype" string="vfat">
|
||||
<match key="volume.label" string="EFI">
|
30
extra/hal/hal-HDAPS-blacklist.patch
Executable file
30
extra/hal/hal-HDAPS-blacklist.patch
Executable file
|
@ -0,0 +1,30 @@
|
|||
From e1f85fe0cdfa7e4d4ce7a811d0b0c90bf38fba0c Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Thu, 25 Jun 2009 09:47:27 +1000
|
||||
Subject: [PATCH] Blacklist HDAPS accelerometer device from being picked up in X.
|
||||
|
||||
This device posts accelerometer data through ABS_X/ABS_Y, making X unusable
|
||||
if it's controlling the pointer.
|
||||
---
|
||||
fdi/policy/10osvendor/10-x11-input.fdi | 6 ++++++
|
||||
1 files changed, 6 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/fdi/policy/10osvendor/10-x11-input.fdi b/fdi/policy/10osvendor/10-x11-input.fdi
|
||||
index a342421..89ba672 100644
|
||||
--- a/fdi/policy/10osvendor/10-x11-input.fdi
|
||||
+++ b/fdi/policy/10osvendor/10-x11-input.fdi
|
||||
@@ -38,5 +38,11 @@
|
||||
<merge key="input.x11_driver" type="string">evdev</merge>
|
||||
</match>
|
||||
</match>
|
||||
+
|
||||
+ <!-- http://bugs.freedesktop.org/show_bug.cgi?id=22442
|
||||
+ Posts accel data through ABS_X/ABS_Y, makes X unusable -->
|
||||
+ <match key="info.product" contains="ThinkPad HDAPS accelerometer data">
|
||||
+ <remove key="input.x11_driver" />
|
||||
+ </match>
|
||||
</device>
|
||||
</deviceinfo>
|
||||
--
|
||||
1.6.3.rc1.2.g0164.dirty
|
||||
|
36
extra/hal/hal-KVM-evdev.patch
Executable file
36
extra/hal/hal-KVM-evdev.patch
Executable file
|
@ -0,0 +1,36 @@
|
|||
From 7618498eec840cb26474dc47821e083957772706 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Fri, 20 Mar 2009 14:37:24 +1000
|
||||
Subject: [PATCH] Add x11_driver for American Megatrends KVM.
|
||||
|
||||
This device exposes only ABS_X, ABS_Y and buttons. It gets input.joystick
|
||||
assigned but not input.mouse, hence the default evdev mapping doesn't pick up
|
||||
on it.
|
||||
|
||||
Red Hat Bug 484776 <https://bugzilla.redhat.com/show_bug.cgi?id=484776>
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
---
|
||||
fdi/policy/10osvendor/10-x11-input.fdi | 6 ++++++
|
||||
1 files changed, 6 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/fdi/policy/10osvendor/10-x11-input.fdi b/fdi/policy/10osvendor/10-x11-input.fdi
|
||||
index 769f75b..eb9767e 100644
|
||||
--- a/fdi/policy/10osvendor/10-x11-input.fdi
|
||||
+++ b/fdi/policy/10osvendor/10-x11-input.fdi
|
||||
@@ -2,6 +2,12 @@
|
||||
<deviceinfo version="0.2">
|
||||
<device>
|
||||
|
||||
+ <!-- This KVMS has abs x/y and buttons. It only has inputInfo.joystick
|
||||
+ set by hal and doesn't get picked up by default -->
|
||||
+ <match key="input.product" contains="American Megatrends Inc. Virtual Keyboard and Mouse">
|
||||
+ <merge key="input.x11_driver" type="string">evdev</merge>
|
||||
+ </match>
|
||||
+
|
||||
<!-- KVM emulates a USB graphics tablet which works in absolute coordinate mode -->
|
||||
<match key="input.product" contains="QEMU USB Tablet">
|
||||
<merge key="input.x11_driver" type="string">evdev</merge>
|
||||
--
|
||||
1.6.0.6
|
||||
|
201
extra/hal/hal-remove-dell-killswitch.patch
Executable file
201
extra/hal/hal-remove-dell-killswitch.patch
Executable file
|
@ -0,0 +1,201 @@
|
|||
diff -upr hal-0.5.12/tools/linux/hal-system-killswitch-get-power-linux hal-0.5.12.new/tools/linux/hal-system-killswitch-get-power-linux
|
||||
--- hal-0.5.12/tools/linux/hal-system-killswitch-get-power-linux 2008-08-22 07:34:47.000000000 +0100
|
||||
+++ hal-0.5.12.new/tools/linux/hal-system-killswitch-get-power-linux 2009-03-03 10:45:20.000000000 +0000
|
||||
@@ -8,11 +8,6 @@
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
-DELL_WCTL=/usr/bin/dellWirelessCtl
|
||||
-if [ -x "/usr/sbin/dellWirelessCtl" ]; then
|
||||
- DELL_WCTL=/usr/sbin/dellWirelessCtl
|
||||
-fi
|
||||
-
|
||||
if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then
|
||||
if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then
|
||||
value="`hal-system-sonypic getbluetooth`"
|
||||
@@ -22,25 +17,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
|
||||
exit 1
|
||||
fi
|
||||
exit ${value}
|
||||
- elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
|
||||
- if [ -x "$DELL_WCTL" ]; then
|
||||
- # TODO: write our own binary that links with libsmbios?
|
||||
- $DELL_WCTL --st_bt
|
||||
- value=$?
|
||||
- if [ "$value" = "0" ]; then
|
||||
- exit 1
|
||||
- elif [ "$value" = "1" ]; then
|
||||
- exit 0
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "dellWirelessCtl returned $value" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = thinkpad -a -r "$HAL_PROP_LINUX_SYSFS_PATH" ]; then
|
||||
read value < $HAL_PROP_LINUX_SYSFS_PATH 2> /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
@@ -55,56 +31,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
|
||||
echo "Access type not supported" >&2
|
||||
exit 1
|
||||
fi
|
||||
-elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
|
||||
- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
|
||||
- if [ -x "$DELL_WCTL" ]; then
|
||||
- # TODO: write our own binary that links with libsmbios?
|
||||
- $DELL_WCTL --st_wlan
|
||||
- value=$?
|
||||
- if [ "$value" = "0" ]; then
|
||||
- exit 1
|
||||
- elif [ "$value" = "1" ]; then
|
||||
- exit 0
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "dellWirelessCtl returned $value" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "Access type not supported" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
-elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wwan" ]; then
|
||||
- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
|
||||
- if [ -x "$DELL_WCTL" ]; then
|
||||
- # TODO: write our own binary that links with libsmbios?
|
||||
- $DELL_WCTL --st_wwan
|
||||
- value=$?
|
||||
- if [ "$value" = "0" ]; then
|
||||
- exit 1
|
||||
- elif [ "$value" = "1" ]; then
|
||||
- exit 0
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "dellWirelessCtl returned $value" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "Access type not supported" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
else
|
||||
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
echo "Killswitch type not supported" >&2
|
||||
diff -upr hal-0.5.12/tools/linux/hal-system-killswitch-set-power-linux hal-0.5.12.new/tools/linux/hal-system-killswitch-set-power-linux
|
||||
--- hal-0.5.12/tools/linux/hal-system-killswitch-set-power-linux 2008-10-24 09:45:54.000000000 +0100
|
||||
+++ hal-0.5.12.new/tools/linux/hal-system-killswitch-set-power-linux 2009-03-03 10:44:49.000000000 +0000
|
||||
@@ -8,11 +8,6 @@
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
-DELL_WCTL=/usr/bin/dellWirelessCtl
|
||||
-if [ -x "/usr/sbin/dellWirelessCtl" ]; then
|
||||
- DELL_WCTL=/usr/sbin/dellWirelessCtl
|
||||
-fi
|
||||
-
|
||||
if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then
|
||||
if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then
|
||||
hal-system-sonypic setbluetooth $value
|
||||
@@ -23,26 +18,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
- elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
|
||||
- if [ -x "$DELL_WCTL" ]; then
|
||||
- # TODO: write our own binary that links with libsmbios?
|
||||
- if [ "$value" = "true" ]; then
|
||||
- $DELL_WCTL --bt 1
|
||||
- ret=$?
|
||||
- else
|
||||
- $DELL_WCTL --bt 0
|
||||
- ret=$?
|
||||
- fi
|
||||
- if [ "$ret" != "0" ]; then
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "dellWirelessCtl returned $ret" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = thinkpad -a -w "$HAL_PROP_LINUX_SYSFS_PATH" ]; then
|
||||
if [ "$value" = "true" ]; then
|
||||
bit=1;
|
||||
@@ -61,60 +36,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
|
||||
echo "Access type not supported" >&2
|
||||
exit 1
|
||||
fi
|
||||
-elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
|
||||
- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
|
||||
- if [ -x "$DELL_WCTL" ]; then
|
||||
- # As a side effect we disable the physical kill switch
|
||||
- # TODO: write our own binary that links with libsmbios?
|
||||
- if [ "$value" = "true" ]; then
|
||||
- $DELL_WCTL --sw_wlan 0 --wlan 1
|
||||
- ret=$?
|
||||
- else
|
||||
- $DELL_WCTL --sw_wlan 0 --wlan 0
|
||||
- ret=$?
|
||||
- fi
|
||||
- if [ "$ret" != "0" ]; then
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "dellWirelessCtl returned $ret" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "Access type not supported" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
-elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wwan" ]; then
|
||||
- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
|
||||
- if [ -x "$DELL_WCTL" ]; then
|
||||
- # As a side effect we disable the physical kill switch
|
||||
- # TODO: write our own binary that links with libsmbios?
|
||||
- if [ "$value" = "true" ]; then
|
||||
- $DELL_WCTL --sw_wwan 0 --wwan 1
|
||||
- ret=$?
|
||||
- else
|
||||
- $DELL_WCTL --sw_wwan 0 --wwan 0
|
||||
- ret=$?
|
||||
- fi
|
||||
- if [ "$ret" != "0" ]; then
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "dellWirelessCtl returned $ret" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
- else
|
||||
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
- echo "Access type not supported" >&2
|
||||
- exit 1
|
||||
- fi
|
||||
else
|
||||
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
|
||||
echo "Killswitch type not supported" >&2
|
45
extra/hal/hal-use-at-console.patch
Executable file
45
extra/hal/hal-use-at-console.patch
Executable file
|
@ -0,0 +1,45 @@
|
|||
diff -up hal-0.5.13/hal.conf.in.drop-polkit hal-0.5.13/hal.conf.in
|
||||
--- hal-0.5.13/hal.conf.in.drop-polkit 2009-02-04 17:07:23.000000000 -0500
|
||||
+++ hal-0.5.13/hal.conf.in 2009-07-29 23:15:16.866766074 -0400
|
||||
@@ -25,7 +25,41 @@
|
||||
send_interface="org.freedesktop.Hal.Device"/>
|
||||
<allow send_destination="org.freedesktop.Hal"
|
||||
send_interface="org.freedesktop.Hal.Manager"/>
|
||||
+ </policy>
|
||||
+
|
||||
+ <!-- Only allow users at the local console to manipulate devices -->
|
||||
+ <policy at_console="true">
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.DockStation"/>
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.Leds"/>
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.LightSensor"/>
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.Storage"/>
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.Storage.Removable"/>
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.Volume"/>
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
|
||||
+ <allow send_destination="org.freedesktop.Hal"
|
||||
+ send_interface="org.freedesktop.Hal.Device.WakeOnLan"/>
|
||||
+
|
||||
+ </policy>
|
||||
|
||||
+ <!-- well,...and root too -->
|
||||
+ <policy user="root">
|
||||
<allow send_destination="org.freedesktop.Hal"
|
||||
send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
|
||||
<allow send_destination="org.freedesktop.Hal"
|
39
extra/hal/hal-xen-unignore-axes.patch
Executable file
39
extra/hal/hal-xen-unignore-axes.patch
Executable file
|
@ -0,0 +1,39 @@
|
|||
From e48f59d2b9bcb43ea8a7b8c884dcb73c8f65b170 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Mon, 19 Oct 2009 14:27:20 +1000
|
||||
Subject: [PATCH] Un-ignore absolute axes for the Xen Virtual Pointer.
|
||||
|
||||
The evdev-internal axis type picking fails for the Xen Virtual Pointer as it
|
||||
exposes both relative and absolute axes. Evdev picks the relative axes by
|
||||
default, leading to a immovable pointer if the Xen backend only sends
|
||||
absolute coordinates.
|
||||
|
||||
Explicitly tell evdev to not ignore the absolute axes.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=523914
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
---
|
||||
fdi/policy/10osvendor/10-x11-input.fdi | 7 +++++++
|
||||
1 files changed, 7 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/fdi/policy/10osvendor/10-x11-input.fdi b/fdi/policy/10osvendor/10-x11-input.fdi
|
||||
index 89ba672..752c4ab 100644
|
||||
--- a/fdi/policy/10osvendor/10-x11-input.fdi
|
||||
+++ b/fdi/policy/10osvendor/10-x11-input.fdi
|
||||
@@ -44,5 +44,12 @@
|
||||
<match key="info.product" contains="ThinkPad HDAPS accelerometer data">
|
||||
<remove key="input.x11_driver" />
|
||||
</match>
|
||||
+
|
||||
+ <!-- https://bugzilla.redhat.com/show_bug.cgi?id=523914
|
||||
+ Mouse does not move in PV Xen guest -->
|
||||
+ <match key="info.product" contains="Xen Virtual Pointer">
|
||||
+ <merge key="input.x11_options.IgnoreAbsoluteAxes" type="string">false</merge>
|
||||
+ <merge key="input.x11_options.IgnoreRelativeAxes" type="string">false</merge>
|
||||
+ </match>
|
||||
</device>
|
||||
</deviceinfo>
|
||||
--
|
||||
1.6.2.5
|
||||
|
20
extra/hal/hal.install
Executable file
20
extra/hal/hal.install
Executable file
|
@ -0,0 +1,20 @@
|
|||
post_install() {
|
||||
getent group hal >/dev/null || usr/sbin/groupadd -g 82 hal
|
||||
getent group optical >/dev/null || usr/sbin/groupadd -g 93 optical
|
||||
getent group floppy >/dev/null || usr/sbin/groupadd -g 94 floppy
|
||||
getent group storage >/dev/null || usr/sbin/groupadd -g 95 storage
|
||||
getent passwd hal >/dev/null || usr/sbin/useradd -c 'HAL daemon' -u 82 -g hal -G optical,floppy,storage -d '/' -s /bin/false hal
|
||||
usr/bin/passwd -l hal &>/dev/null
|
||||
}
|
||||
|
||||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
||||
|
||||
# arg 1: the old package version
|
||||
pre_remove() {
|
||||
usr/sbin/userdel hal &>/dev/null
|
||||
usr/sbin/groupdel hal &>/dev/null
|
||||
}
|
26
extra/pm-utils/11netcfg
Executable file
26
extra/pm-utils/11netcfg
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /usr/lib/pm-utils/functions
|
||||
|
||||
suspend_netcfg() {
|
||||
netcfg2 all-suspend
|
||||
}
|
||||
|
||||
resume_netcfg() {
|
||||
netcfg2 all-resume
|
||||
}
|
||||
|
||||
if [ -x /usr/bin/netcfg2 ]; then
|
||||
case "$1" in
|
||||
hibernate|suspend)
|
||||
suspend_netcfg
|
||||
;;
|
||||
thaw|resume)
|
||||
resume_netcfg
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
exit $?
|
39
extra/pm-utils/PKGBUILD
Executable file
39
extra/pm-utils/PKGBUILD
Executable file
|
@ -0,0 +1,39 @@
|
|||
# Maintainer: Thayer Williams <thayer@archlinux.org>
|
||||
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
|
||||
|
||||
pkgname=pm-utils
|
||||
pkgver=1.2.6.1
|
||||
pkgrel=4
|
||||
pkgdesc="Utilities and scripts for suspend and hibernate power management"
|
||||
arch=(arm)
|
||||
url="http://pm-utils.freedesktop.org"
|
||||
license=('GPL')
|
||||
depends=('bash' 'procps')
|
||||
makedepends=('xmlto')
|
||||
source=(http://pm-utils.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
|
||||
11netcfg
|
||||
daemons.patch
|
||||
nouveau.patch)
|
||||
md5sums=('ddbb73b5fd1e5a2c77ad3ce537a0260c'
|
||||
'9839687c8787d99fd4ff36aa3238c27b'
|
||||
'7be3f7460569d5a382474abd7f7b53fb'
|
||||
'6300409fcc96d70fd2a2e2efeff19f79')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
# temp fix for nouveau power management--will be fixed in next release
|
||||
patch -Np1 -i ${srcdir}/nouveau.patch || return 1
|
||||
|
||||
# make sure Arch Linux daemons are properly handled
|
||||
patch -Np1 -i ${srcdir}/daemons.patch || return 1
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var
|
||||
make || return 1
|
||||
make DESTDIR=${pkgdir} install || return 1
|
||||
|
||||
# install additional hooks
|
||||
install -m755 ${srcdir}/11netcfg "${pkgdir}/usr/lib/pm-utils/sleep.d/11netcfg"
|
||||
}
|
20
extra/pm-utils/daemons.patch
Executable file
20
extra/pm-utils/daemons.patch
Executable file
|
@ -0,0 +1,20 @@
|
|||
--- a/pm/functions.in 2009-11-07 21:51:04.000000000 -0800
|
||||
+++ b/pm/functions.in 2009-12-01 17:30:59.000000000 -0800
|
||||
@@ -141,7 +141,7 @@
|
||||
if ! command_exists service; then
|
||||
service()
|
||||
{
|
||||
- for svc in "/etc/init.d/$1" "/etc/rc.d/rc.$1"; do #lsb, then slack
|
||||
+ for svc in "/etc/init.d/$1" "/etc/rc.d/$1"; do #lsb, then slack
|
||||
[ -x "$svc" ] && { shift; "$svc" "$@"; return $?; }
|
||||
done
|
||||
# this only happens if we did not find the service
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
stopservice()
|
||||
{
|
||||
- if service "$1" status 2>/dev/null | grep -q -e running -e started
|
||||
+ if [[ -e "/var/run/daemons/$1" ]] || service "$1" status 2>/dev/null | grep -q -e running -e started
|
||||
then
|
||||
touch "${STORAGEDIR}/service:$1"
|
||||
service "$1" stop
|
11
extra/pm-utils/nouveau.patch
Executable file
11
extra/pm-utils/nouveau.patch
Executable file
|
@ -0,0 +1,11 @@
|
|||
--- a/pm/sleep.d/98smart-kernel-video.old 2010-01-07 08:31:25.275911479 -0800
|
||||
+++ a/pm/sleep.d/98smart-kernel-video 2010-01-07 08:32:01.596732967 -0800
|
||||
@@ -32,7 +32,7 @@
|
||||
{
|
||||
# if we are running with a KMS-enabled video driver, we should not
|
||||
# attempt to run any quirks
|
||||
- grep -q -E '(noveau|drm)fb' /proc/fb || return 1
|
||||
+ grep -q -E '(nouveau|drm)fb' /proc/fb || return 1
|
||||
remove_all_video_quirks
|
||||
add_parameters --quirk-no-chvt
|
||||
}
|
Loading…
Reference in a new issue