diff options
author | James Meyer <james.meyer@operamail.com> | 2013-02-19 21:10:18 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2013-02-19 21:10:18 (GMT) |
commit | 2648e999d277eac5c3d331a3609bcc73fafbea71 (patch) | |
tree | 40951fb8e7fdbe28a0baa324ae615055203f1e2e /abs/core/acpid | |
parent | c759b5e0c4aa6fc37412b4dee2cf9ad993fd376d (diff) | |
parent | 7e6f7ca174e1af67178dc5293a312a4a733eb095 (diff) | |
download | linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.zip linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.gz linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.bz2 |
Merge branch 'testing'
# By James Meyer (1091) and others
# Via James Meyer (5) and others
* testing: (1148 commits)
LinHES-config: during install don't kill off lirc. This keeps the remote active all the way to the finish
Change version numbers to 8.0 to match the release number. LinHES-conifg LinHES-system mythdb-initial runit-scripts supplemental-web
LinHES-conifig: mv_install.py for the last partition don't go all the way to the end. Gotta leave room for gpt tables.
xf86-video-ati: xorg ati driver.
LinHES-config: timezip.py add syncing up of parental lvl passwords and starting level with MBE.
LinHES-system: correct the logic for breaking out of the wmctrl loop. As written it would break out of the inner loop..but not the 60 iteration loop.
e16_theme_settings: remove slide-in prop for new windows. For whatever reason this was preventing mplayer from being positioned correctly for appletrailers.
LinHES-config, mythinstall: change case of hd_pvr and serial to all lower refs #902
zilog-firmware: firmware for TX support of the hdpvr and pvr-150 In general I can't recommend anybody using these transmitters but including the firmware just in case someone really wants to
linhes-udev-rules: added hdprv_lirc rule. All of these lirc rules are limited to exactly one device. If more then one device is present then only the last device in init will get the symlink
runit-scripts: fix logging for igdeamon, add support to remote init script so that the blaster is always the first device in the chain. added support specificly for hd_pvr
LinHES-system: add lh_system_restore and lh_system_backup. These scripts are called from the mythmenu. refs #900
iguanair: rebuild with python 2.7
LinHES-system: msg_daemon.py fix init and nasty bug related to timeout. In a nutshell timeout wouldn't work unless a msg without a timeout was called first.
linhes-udev-rules: add rules for mce,streamzap,serial lirc devices.
mythinstall: recompile for matching libs
mythtv: latest .25-fixes and change mythbackup/restore call lh_system_$op to replace mythbackup/mythrestore. mythbackup no longer works correctly with the new windowmanager
linhes-scripts: myth2mp3, myth2x264, myth2xvid: use mythutil to get cutlist
LinHES-config, supplimental-web: Fix proxy numbering for Ceton infiniTV
linhes-system: add additional stuff to the system backup and also introduced an exclude file. The exclude/include files are locate in /home/mythtv/backup_config/
...
Diffstat (limited to 'abs/core/acpid')
-rw-r--r-- | abs/core/acpid/Makefile | 56 | ||||
-rw-r--r-- | abs/core/acpid/PKGBUILD | 75 | ||||
-rw-r--r-- | abs/core/acpid/acpid-1.0.4-gcc4.patch | 20 | ||||
-rw-r--r-- | abs/core/acpid/acpid.conf (renamed from abs/core/acpid/acpid.conf.d) | 1 | ||||
-rw-r--r-- | abs/core/acpid/acpid.rc (renamed from abs/core/acpid/acpid) | 11 | ||||
-rw-r--r-- | abs/core/acpid/acpid.service | 11 | ||||
-rw-r--r-- | abs/core/acpid/acpid.socket | 8 | ||||
-rw-r--r-- | abs/core/acpid/default | 20 | ||||
-rw-r--r-- | abs/core/acpid/handler.sh | 86 |
9 files changed, 158 insertions, 130 deletions
diff --git a/abs/core/acpid/Makefile b/abs/core/acpid/Makefile deleted file mode 100644 index a5fe385..0000000 --- a/abs/core/acpid/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# Makefile for ACPI daemon - -# update these numbers for new releases -VERSION = 1.0.6 - -INSTPREFIX = -BINDIR = $(INSTPREFIX)/usr/bin -SBINDIR = $(INSTPREFIX)/usr/sbin -MAN8DIR = $(INSTPREFIX)/usr/share/man/man8 - -SBIN_PROGS = acpid -BIN_PROGS = acpi_listen -PROGS = $(SBIN_PROGS) $(BIN_PROGS) - -acpid_SRCS = acpid.c event.c ud_socket.c -acpid_OBJS = $(acpid_SRCS:.c=.o) - -acpi_listen_SRCS = acpi_listen.c ud_socket.c -acpi_listen_OBJS = $(acpi_listen_SRCS:.c=.o) - -MAN8 = acpid.8 acpi_listen.8 -MAN8GZ = $(MAN8:.8=.8.gz) - -CFLAGS = -Wall -Werror -g $(DEFS) -D_GNU_SOURCE -DEFS = -DVERSION="\"$(VERSION)\"" - -all: $(PROGS) - -acpid: $(acpid_OBJS) - -acpi_listen: $(acpi_listen_OBJS) - -man: $(MAN8) - for a in $^; do gzip -f -9 -c $$a > $$a.gz; done - -install: $(PROGS) man - mkdir -p $(SBINDIR) - mkdir -p $(BINDIR) - install -m 750 acpid $(SBINDIR) - install -m 755 acpi_listen $(BINDIR) - mkdir -p $(MAN8DIR) - install -m 644 $(MAN8GZ) $(MAN8DIR) - -DISTTMP=/tmp -dist: - rm -rf $(DISTTMP)/acpid-$(VERSION) - mkdir -p $(DISTTMP)/acpid-$(VERSION) - cp -a * $(DISTTMP)/acpid-$(VERSION) - find $(DISTTMP)/acpid-$(VERSION) -type d -name CVS | xargs rm -rf - make -C $(DISTTMP)/acpid-$(VERSION) clean - tar -C $(DISTTMP) -zcvf acpid-$(VERSION).tar.gz acpid-$(VERSION) - rm -rf $(DISTTMP)/acpid-$(VERSION) - -clean: - $(RM) $(PROGS) $(MAN8GZ) *.o - diff --git a/abs/core/acpid/PKGBUILD b/abs/core/acpid/PKGBUILD index 911f04b..a4d931a 100644 --- a/abs/core/acpid/PKGBUILD +++ b/abs/core/acpid/PKGBUILD @@ -1,41 +1,58 @@ -# $Id: PKGBUILD 65397 2010-01-28 19:48:01Z thayer $ -# Maintainer: Thayer Williams <thayer@archlinux.org> +# $Id: PKGBUILD 71877 2012-06-02 17:57:44Z seblu $ +# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org> +# Contributor: xduugu # Contributor: Manolis Tzanidakis -# Contributor: Judd Vinet <jvinet@zeroflux.org> +# Contributor: Jonathan Schmidt <j.schmidt@archlinux.us pkgname=acpid -pkgver=1.0.10 +pkgver=2.0.16 pkgrel=3 -pkgdesc="A daemon for delivering ACPI power management events" +pkgdesc='A daemon for delivering ACPI power management events with netlink support' arch=('i686' 'x86_64') -url="http://acpid.sourceforge.net" +url='http://tedfelix.com/linux/acpid-netlink.html' license=('GPL') -depends=(glibc) -source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz - acpid - acpid.conf.d - anything - handler.sh.runit) +depends=('bash') +optdepends=('perl: use perl based examples') +replaces=('acpid2') backup=('etc/acpi/handler.sh' 'etc/acpi/events/anything' 'etc/conf.d/acpid') +source=("http://www.tedfelix.com/linux/$pkgname-$pkgver.tar.xz" + 'acpid.rc' + 'acpid.conf' + 'acpid.socket' + 'acpid.service' + 'anything' + 'handler.sh') +md5sums=('d59fc02c9c34f0d5c137495302e2c074' + '077475c75fbdd9de75f9a397130ccd91' + '929c6d2e91295c22ed9ec6212d7eabef' + 'ee6cb99e50e580c50331a73045412ae9' + '7f545754db5be7296d2dd97c049062ee' + '2d37b98d6e74bab815604b8b48c6cfd4' + '74ee3c33714ff5cb44f30c9a0dceeef0') build() { - cd $srcdir/$pkgname-$pkgver - /usr/bin/make || return 1 - /bin/install -d -m0755 $pkgdir/usr/bin || return 1 - /usr/bin/make INSTPREFIX=$pkgdir \ - MAN8DIR=$pkgdir/usr/share/man/man8 install || return 1 + cd $pkgname-$pkgver + ./configure --prefix=/usr + make +} + +package() { + pushd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + popd - # install our supplementary scripts - /bin/install -D -m0755 $srcdir/acpid $pkgdir/etc/rc.d/acpid || return 1 - /bin/install -D -m0644 $srcdir/acpid.conf.d $pkgdir/etc/conf.d/acpid || return 1 - /bin/install -D -m0644 $srcdir/anything $pkgdir/etc/acpi/events/anything || return 1 - /bin/install -D -m0755 $srcdir/handler.sh.runit $pkgdir/etc/acpi/handler.sh || return 1 + # default config + install -Dm644 anything "$pkgdir/etc/acpi/events/anything" + install -Dm755 handler.sh "$pkgdir/etc/acpi/handler.sh" - # set world readable bit on the acpid binary - /bin/chmod 755 $pkgdir/usr/sbin/acpid || return 1 + # initscripts + install -Dm755 acpid.rc "$pkgdir/etc/rc.d/acpid" + install -Dm644 acpid.conf "$pkgdir/etc/conf.d/acpid" + install -Dm644 acpid.socket "$pkgdir/usr/lib/systemd/system/acpid.socket" + install -Dm644 acpid.service "$pkgdir/usr/lib/systemd/system/acpid.service" + + # fix acpid rights + chmod 755 "$pkgdir/usr/sbin/acpid" } -md5sums=('61156ef32015c56dc0f2e3317f4ae09e' - 'd9ca7f71f520238a0448fab105a23fe9' - '91fdb3709c878eed757d192a420251a1' - '2d37b98d6e74bab815604b8b48c6cfd4' - 'e2c6fccd6ba099045b358fb1128a4905') + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/abs/core/acpid/acpid-1.0.4-gcc4.patch b/abs/core/acpid/acpid-1.0.4-gcc4.patch deleted file mode 100644 index b56901d..0000000 --- a/abs/core/acpid/acpid-1.0.4-gcc4.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- acpid-1.0.4/ud_socket.c 2005-04-26 10:26:29.000000000 +0000 -+++ acpid-1.0.4.az/ud_socket.c 2005-04-26 10:27:09.000000000 +0000 -@@ -60,7 +60,7 @@ - struct sockaddr_un cliaddr; - int len = sizeof(struct sockaddr_un); - -- newsock = accept(listenfd, (struct sockaddr *)&cliaddr, &len); -+ newsock = accept(listenfd, (struct sockaddr *)&cliaddr, (socklen_t *)&len); - if (newsock < 0) { - if (errno == EINTR) { - continue; /* signal */ -@@ -71,7 +71,7 @@ - - if (cred) { - len = sizeof(struct ucred); -- getsockopt(newsock, SOL_SOCKET, SO_PEERCRED,cred,&len); -+ getsockopt(newsock, SOL_SOCKET, SO_PEERCRED,cred,(socklen_t *)&len); - } - - return newsock; diff --git a/abs/core/acpid/acpid.conf.d b/abs/core/acpid/acpid.conf index 25c9cc1..b60103a 100644 --- a/abs/core/acpid/acpid.conf.d +++ b/abs/core/acpid/acpid.conf @@ -3,4 +3,3 @@ # ACPID_ARGS="" - diff --git a/abs/core/acpid/acpid b/abs/core/acpid/acpid.rc index 9a4ab8a..674f462 100644 --- a/abs/core/acpid/acpid +++ b/abs/core/acpid/acpid.rc @@ -3,9 +3,9 @@ . /etc/rc.conf . /etc/rc.d/functions -[ -f /etc/conf.d/acpid ] && . /etc/conf.d/acpid +[[ -f /etc/conf.d/acpid ]] && . /etc/conf.d/acpid -PID=`pidof -o %PPID /usr/sbin/acpid` +PID=$(pidof -o %PPID /usr/sbin/acpid) case "$1" in start) stat_busy "Starting acpid" @@ -19,7 +19,7 @@ case "$1" in ;; stop) stat_busy "Stopping acpid" - [ ! -z "$PID" ] && kill $PID &> /dev/null + [ ! -z "$PID" ] && kill $PID &> /dev/null if [ $? -gt 0 ]; then stat_fail else @@ -29,9 +29,12 @@ case "$1" in ;; restart) $0 stop + sleep 1 $0 start ;; *) - echo "usage: $0 {start|stop|restart}" + echo "usage: $0 {start|stop|restart}" esac exit 0 + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/abs/core/acpid/acpid.service b/abs/core/acpid/acpid.service new file mode 100644 index 0000000..4c0e073 --- /dev/null +++ b/abs/core/acpid/acpid.service @@ -0,0 +1,11 @@ +[Unit] +Description=ACPI event daemon +Requires=acpid.socket + +[Service] +EnvironmentFile=/etc/conf.d/acpid +ExecStart=/usr/sbin/acpid -f $ACPID_ARGS + +[Install] +WantedBy=multi-user.target +Also=acpid.socket diff --git a/abs/core/acpid/acpid.socket b/abs/core/acpid/acpid.socket new file mode 100644 index 0000000..1e5365b --- /dev/null +++ b/abs/core/acpid/acpid.socket @@ -0,0 +1,8 @@ +[Unit] +Description=ACPID Listen Socket + +[Socket] +ListenStream=/run/acpid.socket + +[Install] +WantedBy=sockets.target diff --git a/abs/core/acpid/default b/abs/core/acpid/default deleted file mode 100644 index 93944aa..0000000 --- a/abs/core/acpid/default +++ /dev/null @@ -1,20 +0,0 @@ -# This is the ACPID default configuration, it takes all -# events and passes them to /etc/acpi/default.sh for further -# processing. - -# event keeps a regular expression matching the event. To get -# power events only, just use something like "event=button power.*" -# to catch it. -# action keeps the command to be executed after an event occurs -#This halts the computer when the Power button is pressed. - -event=button power.* -#action=/sbin/shutdown -h now -action=/usr/local/sbin/shutdown.sh - -# Optionally you can specify the placeholder %e. It will pass -# through the whole kernel event message to the program you've -# specified. - -event=.* -action=/etc/acpi/acpi_handler.sh %e diff --git a/abs/core/acpid/handler.sh b/abs/core/acpid/handler.sh new file mode 100644 index 0000000..b5a548f --- /dev/null +++ b/abs/core/acpid/handler.sh @@ -0,0 +1,86 @@ +#!/bin/sh +# Default acpi script that takes an entry for all actions + +minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq` +maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq` +setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed" + +set $* + +case "$1" in + button/power) + case "$2" in + PBTN|PWRF) + logger "PowerButton pressed: $2" + poweroff + ;; + *) + logger "ACPI action undefined: $2" + ;; + esac + ;; + button/sleep) + case "$2" in + SLPB|SBTN) + echo -n mem >/sys/power/state + ;; + *) + logger "ACPI action undefined: $2" + ;; + esac + ;; + ac_adapter) + case "$2" in + AC|ACAD|ADP0) + case "$4" in + 00000000) + echo -n $minspeed >$setspeed + #/etc/laptop-mode/laptop-mode start + ;; + 00000001) + echo -n $maxspeed >$setspeed + #/etc/laptop-mode/laptop-mode stop + ;; + esac + ;; + *) + logger "ACPI action undefined: $2" + ;; + esac + ;; + battery) + case "$2" in + BAT0) + case "$4" in + 00000000) + logger 'Battery online' + ;; + 00000001) + logger 'Battery offline' + ;; + esac + ;; + CPU0) + ;; + *) logger "ACPI action undefined: $2" ;; + esac + ;; + button/lid) + case "$3" in + close) + logger 'LID closed' + ;; + open) + logger 'LID opened' + ;; + *) + logger "ACPI action undefined: $3" + ;; + esac + ;; + *) + logger "ACPI group/action undefined: $1 / $2" + ;; +esac + +# vim:set ts=4 sw=4 ft=sh et: |