diff --git a/hardware/powermanagement/acpid/actions.py b/hardware/powermanagement/acpid/actions.py new file mode 100644 index 0000000000..974f05ade8 --- /dev/null +++ b/hardware/powermanagement/acpid/actions.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import get + +def setup(): + autotools.configure() + +def build(): + autotools.make() + +def install(): + autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + pisitools.dodoc('README', 'COPYING') diff --git a/hardware/powermanagement/acpid/comar/service.py b/hardware/powermanagement/acpid/comar/service.py new file mode 100644 index 0000000000..376f0e9f19 --- /dev/null +++ b/hardware/powermanagement/acpid/comar/service.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +from comar.service import * + +serviceType = "local" +serviceDesc = _({"en": "ACPI Daemon", + "tr": "ACPI Hizmeti"}) +serviceDefault = "on" + +PIDFILE = "/run/acpid.pid" + +MSG_NO_PIDFILE = _({ + "en" : "Could not reload acpid daemon as the PID file %s does not exist." % PIDFILE, + "tr" : "%s PID dosyası mevcut olmadığından acpid hizmeti yeniden yüklenemiyor." % PIDFILE, + }) + +@synchronized +def start(): + startService(command="/usr/sbin/acpid", + args=config.get("OPTIONS", ""), + donotify=True) + +@synchronized +def stop(): + stopService(pidfile=PIDFILE, + donotify=True) + +def reload(): + import signal + import os + try: + os.kill(int(open(PIDFILE, "r").read().strip()), signal.SIGHUP) + except: + fail(MSG_NO_PIDFILE) + +def status(): + return isServiceRunning(pidfile=PIDFILE) diff --git a/hardware/powermanagement/acpid/files/acpid.power.sh b/hardware/powermanagement/acpid/files/acpid.power.sh new file mode 100644 index 0000000000..6084b31628 --- /dev/null +++ b/hardware/powermanagement/acpid/files/acpid.power.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# +# check if a X session is running and active. +# If not, shut down the system +# +# Copyright (C) 2008 Holger Macht +# +# This file is released under the GPLv2. +# + +EXEC="/sbin/shutdown -h now" + +# iterate over all sessions. If a active X session is found, do nothing +while read A; do + SESSION=`echo $A | sed 's/\(Session[0-9]*\)://g'` + [ -z "$SESSION" ] || continue + + SESSION=`echo $A | sed 's/\(Session[0-9]*\):/\1/g'` + IS_X=`dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit \ + /org/freedesktop/ConsoleKit/$SESSION \ + org.freedesktop.ConsoleKit.Session.GetX11Display` + + # check if this is a X session, if not, go on + DISP=`echo $IS_X | sed -e 's/^.* string "\(.*\)"/\1/'` + [ -n "$DISP" ] || continue + + IS_ACTIVE=`dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit \ + /org/freedesktop/ConsoleKit/$SESSION \ + org.freedesktop.ConsoleKit.Session.IsActive` + IS_ACTIVE=`echo $IS_ACTIVE | sed -e 's/^.* boolean \(.*\)$/\1/'` + + if [ "$IS_ACTIVE" = "true" -a -n "$DISP" ]; then + # additional check, if none of these two apps are running, go on + if [ -n "`pidof kded4`" -o -n "`pidof gnome-power-manager`" -o -n "`pidof guidance-power-manager`" -o -n "`pidof kpowersave`" -o -n "`pidof dalston-power-applet`" ]; then + echo doing nothing... + exit 0 + fi + fi +done < <(ck-list-sessions) + +logger -s -t acpid "Power Button pressed, executing $EXEC" +$EXEC diff --git a/hardware/powermanagement/acpid/files/fedora/acpid-2.0.15-mk.patch b/hardware/powermanagement/acpid/files/fedora/acpid-2.0.15-mk.patch new file mode 100644 index 0000000000..3446a98580 --- /dev/null +++ b/hardware/powermanagement/acpid/files/fedora/acpid-2.0.15-mk.patch @@ -0,0 +1,24 @@ +diff -up acpid-2.0.15/Makefile.am.mk acpid-2.0.15/Makefile.am +--- acpid-2.0.15/Makefile.am.mk 2012-02-17 04:37:12.109907134 +0100 ++++ acpid-2.0.15/Makefile.am 2012-03-16 11:27:15.127573044 +0100 +@@ -20,7 +20,7 @@ acpi_listen_SOURCES = acpi_listen.c log. + + dist_man8_MANS = acpid.8 acpi_listen.8 + +-dist_doc_DATA = COPYING Changelog README TESTPLAN TODO ++dist_doc_DATA = + + # Just docs to add to the dist. + # One problem with this is that it includes all files in the samples dir +diff -up acpid-2.0.15/Makefile.in.mk acpid-2.0.15/Makefile.in +--- acpid-2.0.15/Makefile.in.mk 2012-03-16 11:28:53.568421905 +0100 ++++ acpid-2.0.15/Makefile.in 2012-03-16 11:29:21.679378750 +0100 +@@ -276,7 +276,7 @@ acpid_SOURCES = acpid.c acpi_ids.c conne + + acpi_listen_SOURCES = acpi_listen.c log.c ud_socket.c + dist_man8_MANS = acpid.8 acpi_listen.8 +-dist_doc_DATA = COPYING Changelog README TESTPLAN TODO ++dist_doc_DATA = + + # Just docs to add to the dist. + # One problem with this is that it includes all files in the samples dir \ No newline at end of file diff --git a/hardware/powermanagement/acpid/files/fedora/acpid.power.conf b/hardware/powermanagement/acpid/files/fedora/acpid.power.conf new file mode 100644 index 0000000000..9e1e1a6889 --- /dev/null +++ b/hardware/powermanagement/acpid/files/fedora/acpid.power.conf @@ -0,0 +1,5 @@ +# ACPID config to power down machine if powerbutton is pressed, but only if +# no gnome-power-manager, kded4, kpowersave, guidance-power-manager is running + +event=button/power.* +action=/etc/acpi/actions/power.sh diff --git a/hardware/powermanagement/acpid/files/fedora/acpid.service b/hardware/powermanagement/acpid/files/fedora/acpid.service new file mode 100644 index 0000000000..f26b3a92f8 --- /dev/null +++ b/hardware/powermanagement/acpid/files/fedora/acpid.service @@ -0,0 +1,18 @@ +[Unit] +Description=ACPI Event Daemon +After=syslog.target + +# This could probably benefit from socket activation, but honestly I think it +# is time for acpid to go away, and hence I am not planning to spend the time +# to add socket activation here. We use Type=forking to ensure that the +# communication sockets are in place before boot proceeds with any service +# needing this service. Would acpid support socket activation we could use +# Type=simple here. + +[Service] +Type=forking +EnvironmentFile=/etc/conf.d/acpid +ExecStart=/usr/sbin/acpid $OPTIONS + +[Install] +WantedBy=multi-user.target diff --git a/hardware/powermanagement/acpid/files/fedora/acpid.sysconfig b/hardware/powermanagement/acpid/files/fedora/acpid.sysconfig new file mode 100644 index 0000000000..f0d2bfb76a --- /dev/null +++ b/hardware/powermanagement/acpid/files/fedora/acpid.sysconfig @@ -0,0 +1 @@ +OPTIONS= diff --git a/hardware/powermanagement/acpid/files/fedora/acpid.video.conf b/hardware/powermanagement/acpid/files/fedora/acpid.video.conf new file mode 100644 index 0000000000..97507bf9c3 --- /dev/null +++ b/hardware/powermanagement/acpid/files/fedora/acpid.video.conf @@ -0,0 +1,6 @@ +# Configuration to turn on DPMS again on video activity, needed for some +# laptops. Disabled by default, uncomment if your laptop display stays blank +# after you close and open the lid. + +#event=video.* +#action=/usr/sbin/vbetool dpms on diff --git a/hardware/powermanagement/acpid/pspec.xml b/hardware/powermanagement/acpid/pspec.xml new file mode 100644 index 0000000000..27fbebe09b --- /dev/null +++ b/hardware/powermanagement/acpid/pspec.xml @@ -0,0 +1,55 @@ + + + + + acpid + http://sourceforge.net/projects/acpid2/ + + PisiLinux Community + admins@pisilinux.org + + GPLv2+ + service + app:console + ACPI daemon that dispatches ACPI events to user-space programs + acpid is a flexible and extensible daemon for ACPI (Advanced Configuration and Power Interface) event dispatching. + mirrors://sourceforge/acpid2/acpid-2.0.27.tar.xz + + fedora/acpid-2.0.15-mk.patch + + + + + acpid + + /usr/bin + /usr/sbin + /etc/acpi/actions + /etc/acpi/events + /etc/conf.d + /lib/systemd + /usr/share/doc + /usr/share/man + + + acpid.power.sh + fedora/acpid.power.conf + fedora/acpid.video.conf + fedora/acpid.sysconfig + fedora/acpid.service + + + System.Service + + + + + + 2016-07-02 + 2.0.27 + First release + Kamil Atlı + suvari@pisilinux.org + + + \ No newline at end of file diff --git a/hardware/powermanagement/acpid/translations.xml b/hardware/powermanagement/acpid/translations.xml new file mode 100644 index 0000000000..a7fb8d1719 --- /dev/null +++ b/hardware/powermanagement/acpid/translations.xml @@ -0,0 +1,8 @@ + + + + acpid + ACPI hizmeti + acpid ACPI olaylarını kullanıcı uygulamalarına paslayan gelişmiş ve esnek bir sistem hizmetidir. + + diff --git a/pisi-index.xml b/pisi-index.xml index cd41c7074e..94d8c2caea 100644 --- a/pisi-index.xml +++ b/pisi-index.xml @@ -102655,6 +102655,61 @@ Bu Skype SILK codec ve Xiph.Org 's Celt codec teknolojisi dahil RFC 6716 ol + + + acpid + http://sourceforge.net/projects/acpid2/ + + PisiLinux Community + admins@pisilinux.org + + GPLv2+ + service + app:console + hardware.powermanagement + ACPI daemon that dispatches ACPI events to user-space programs + ACPI hizmeti + acpid is a flexible and extensible daemon for ACPI (Advanced Configuration and Power Interface) event dispatching. + acpid ACPI olaylarını kullanıcı uygulamalarına paslayan gelişmiş ve esnek bir sistem hizmetidir. + mirrors://sourceforge/acpid2/acpid-2.0.27.tar.xz + + fedora/acpid-2.0.15-mk.patch + + hardware/powermanagement/acpid/pspec.xml + + + acpid + + /usr/bin + /usr/sbin + /etc/acpi/actions + /etc/acpi/events + /etc/conf.d + /lib/systemd + /usr/share/doc + /usr/share/man + + + System.Service + + + acpid.power.sh + fedora/acpid.power.conf + fedora/acpid.video.conf + fedora/acpid.sysconfig + fedora/acpid.service + + + + + 2016-07-02 + 2.0.27 + First release + Kamil Atlı + suvari@pisilinux.org + + + powertop diff --git a/pisi-index.xml.sha1sum b/pisi-index.xml.sha1sum index 27d5f88a12..9113dc9f15 100644 --- a/pisi-index.xml.sha1sum +++ b/pisi-index.xml.sha1sum @@ -1 +1 @@ -59bbbbc20d9e6525fb1ec55c61702a41fefe1951 \ No newline at end of file +00b983075851e522225520a1364213be44f11184 \ No newline at end of file diff --git a/pisi-index.xml.xz b/pisi-index.xml.xz index 2bf8bd9c4f..daa463e505 100644 Binary files a/pisi-index.xml.xz and b/pisi-index.xml.xz differ diff --git a/pisi-index.xml.xz.sha1sum b/pisi-index.xml.xz.sha1sum index eb3911f4f1..1823e4ab47 100644 --- a/pisi-index.xml.xz.sha1sum +++ b/pisi-index.xml.xz.sha1sum @@ -1 +1 @@ -a5d2f5ff5c9760a33b55ab342efdea3ad33b1f1f \ No newline at end of file +0156cd2d8328089a66044d21cc66a7b1b7e2ce2f \ No newline at end of file