@@ -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')
|
||||
@@ -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)
|
||||
@@ -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 <hmacht@suse.de>
|
||||
#
|
||||
# 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
OPTIONS=
|
||||
@@ -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
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>acpid</Name>
|
||||
<Homepage>http://sourceforge.net/projects/acpid2/</Homepage>
|
||||
<Packager>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admins@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<License>GPLv2+</License>
|
||||
<IsA>service</IsA>
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>ACPI daemon that dispatches ACPI events to user-space programs</Summary>
|
||||
<Description>acpid is a flexible and extensible daemon for ACPI (Advanced Configuration and Power Interface) event dispatching.</Description>
|
||||
<Archive sha1sum="aabf129499f99b3c14e7a9f5b5ec717b0913e9c8" type="tarxz">mirrors://sourceforge/acpid2/acpid-2.0.27.tar.xz</Archive>
|
||||
<Patches>
|
||||
<Patch level="1">fedora/acpid-2.0.15-mk.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>acpid</Name>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="executable">/usr/sbin</Path>
|
||||
<Path fileType="executable">/etc/acpi/actions</Path>
|
||||
<Path fileType="data">/etc/acpi/events</Path>
|
||||
<Path fileType="config">/etc/conf.d</Path>
|
||||
<Path fileType="data">/lib/systemd</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
<Path fileType="man">/usr/share/man</Path>
|
||||
</Files>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile owner="root" permission="0755" target="/etc/acpi/actions/power.sh">acpid.power.sh</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/acpi/events/power.conf">fedora/acpid.power.conf</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/acpi/events/video.conf">fedora/acpid.video.conf</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/conf.d/acpid">fedora/acpid.sysconfig</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/lib/systemd/system/acpid.service">fedora/acpid.service</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
<Provides>
|
||||
<COMAR script="service.py">System.Service</COMAR>
|
||||
</Provides>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="1">
|
||||
<Date>2016-07-02</Date>
|
||||
<Version>2.0.27</Version>
|
||||
<Comment>First release</Comment>
|
||||
<Name>Kamil Atlı</Name>
|
||||
<Email>suvari@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" ?>
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>acpid</Name>
|
||||
<Summary xml:lang="tr">ACPI hizmeti</Summary>
|
||||
<Description xml:lang="tr">acpid ACPI olaylarını kullanıcı uygulamalarına paslayan gelişmiş ve esnek bir sistem hizmetidir.</Description>
|
||||
</Source>
|
||||
</PISI>
|
||||
@@ -102655,6 +102655,61 @@ Bu Skype SILK codec ve Xiph.Org 's Celt codec teknolojisi dahil RFC 6716 ol
|
||||
</Update>
|
||||
</History>
|
||||
</SpecFile>
|
||||
<SpecFile>
|
||||
<Source>
|
||||
<Name>acpid</Name>
|
||||
<Homepage>http://sourceforge.net/projects/acpid2/</Homepage>
|
||||
<Packager>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admins@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<License>GPLv2+</License>
|
||||
<IsA>service</IsA>
|
||||
<IsA>app:console</IsA>
|
||||
<PartOf>hardware.powermanagement</PartOf>
|
||||
<Summary xml:lang="en">ACPI daemon that dispatches ACPI events to user-space programs</Summary>
|
||||
<Summary xml:lang="tr">ACPI hizmeti</Summary>
|
||||
<Description xml:lang="en">acpid is a flexible and extensible daemon for ACPI (Advanced Configuration and Power Interface) event dispatching.</Description>
|
||||
<Description xml:lang="tr">acpid ACPI olaylarını kullanıcı uygulamalarına paslayan gelişmiş ve esnek bir sistem hizmetidir.</Description>
|
||||
<Archive type="tarxz" sha1sum="aabf129499f99b3c14e7a9f5b5ec717b0913e9c8">mirrors://sourceforge/acpid2/acpid-2.0.27.tar.xz</Archive>
|
||||
<Patches>
|
||||
<Patch level="1">fedora/acpid-2.0.15-mk.patch</Patch>
|
||||
</Patches>
|
||||
<SourceURI>hardware/powermanagement/acpid/pspec.xml</SourceURI>
|
||||
</Source>
|
||||
<Package>
|
||||
<Name>acpid</Name>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="executable">/usr/sbin</Path>
|
||||
<Path fileType="executable">/etc/acpi/actions</Path>
|
||||
<Path fileType="data">/etc/acpi/events</Path>
|
||||
<Path fileType="config">/etc/conf.d</Path>
|
||||
<Path fileType="data">/lib/systemd</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
<Path fileType="man">/usr/share/man</Path>
|
||||
</Files>
|
||||
<Provides>
|
||||
<COMAR script="service.py">System.Service</COMAR>
|
||||
</Provides>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile target="/etc/acpi/actions/power.sh" permission="0755" owner="root">acpid.power.sh</AdditionalFile>
|
||||
<AdditionalFile target="/etc/acpi/events/power.conf" permission="0644" owner="root">fedora/acpid.power.conf</AdditionalFile>
|
||||
<AdditionalFile target="/etc/acpi/events/video.conf" permission="0644" owner="root">fedora/acpid.video.conf</AdditionalFile>
|
||||
<AdditionalFile target="/etc/conf.d/acpid" permission="0644" owner="root">fedora/acpid.sysconfig</AdditionalFile>
|
||||
<AdditionalFile target="/lib/systemd/system/acpid.service" permission="0644" owner="root">fedora/acpid.service</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
</Package>
|
||||
<History>
|
||||
<Update release="1">
|
||||
<Date>2016-07-02</Date>
|
||||
<Version>2.0.27</Version>
|
||||
<Comment>First release</Comment>
|
||||
<Name>Kamil Atlı</Name>
|
||||
<Email>suvari@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</SpecFile>
|
||||
<SpecFile>
|
||||
<Source>
|
||||
<Name>powertop</Name>
|
||||
|
||||
@@ -1 +1 @@
|
||||
59bbbbc20d9e6525fb1ec55c61702a41fefe1951
|
||||
00b983075851e522225520a1364213be44f11184
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
a5d2f5ff5c9760a33b55ab342efdea3ad33b1f1f
|
||||
0156cd2d8328089a66044d21cc66a7b1b7e2ce2f
|
||||
Reference in New Issue
Block a user