diff --git a/srcpkgs/acpid/files/acpid.confd b/srcpkgs/acpid/files/acpid.confd deleted file mode 100644 index 30329760fc..0000000000 --- a/srcpkgs/acpid/files/acpid.confd +++ /dev/null @@ -1,6 +0,0 @@ -# /etc/conf.d/acpid: config file for /etc/init.d/acpid - -# Options to pass to the acpid daemon. -# See the acpid(8) man page for more info. - -ACPID_OPTIONS="" diff --git a/srcpkgs/acpid/files/acpid.rc b/srcpkgs/acpid/files/acpid.rc deleted file mode 100644 index ebafb346b7..0000000000 --- a/srcpkgs/acpid/files/acpid.rc +++ /dev/null @@ -1,43 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/sys-power/acpid/files/acpid-1.0.6-init.d,v 1.3 2009/01/19 04:48:49 vapier Exp $ - -opts="reload" - -depend() { - need localmount - use logger - before hald -} - -checkconfig() { - if [ ! -e /proc/acpi ] ; then - eerror "ACPI support has not been compiled into the kernel" - return 1 - fi - if [ ! -e /proc/acpi/event ]; then - eerror "Your kernel needs CONFIG_ACPI_PROC_EVENT support" - return 1 - fi -} - -start() { - checkconfig || return 1 - - ebegin "Starting acpid" - start-stop-daemon --start --quiet --exec /usr/sbin/acpid -- ${ACPID_OPTIONS} - eend $? -} - -stop() { - ebegin "Stopping acpid" - start-stop-daemon --stop --exec /usr/sbin/acpid - eend $? -} - -reload() { - ebegin "Reloading acpid configuration" - start-stop-daemon --stop --oknodo --exec /usr/sbin/acpid --signal HUP - eend $? -} diff --git a/srcpkgs/acpid/files/acpid.service b/srcpkgs/acpid/files/acpid.service new file mode 100644 index 0000000000..97a5022f93 --- /dev/null +++ b/srcpkgs/acpid/files/acpid.service @@ -0,0 +1,10 @@ +[Unit] +Description=ACPI Event Daemon +Requires=acpid.socket + +[Service] +ExecStart=/usr/sbin/acpid -f + +[Install] +WantedBy=multi-user.target +Also=acpid.socket diff --git a/srcpkgs/acpid/files/acpid.socket b/srcpkgs/acpid/files/acpid.socket new file mode 100644 index 0000000000..1e5365bf1e --- /dev/null +++ b/srcpkgs/acpid/files/acpid.socket @@ -0,0 +1,8 @@ +[Unit] +Description=ACPID Listen Socket + +[Socket] +ListenStream=/run/acpid.socket + +[Install] +WantedBy=sockets.target diff --git a/srcpkgs/acpid/template b/srcpkgs/acpid/template index 0fd1f14963..6359605c17 100644 --- a/srcpkgs/acpid/template +++ b/srcpkgs/acpid/template @@ -1,6 +1,7 @@ # Template file for 'acpid' pkgname=acpid version=2.0.12 +revision=1 homepage="http://tedfelix.com/linux/acpid-netlink.html" distfiles="http://tedfelix.com/linux/acpid-$version.tar.gz" build_style=gnu_makefile @@ -15,14 +16,14 @@ long_desc=" input layer (mouse, keyboard, power button, etc...). This version of acpid supports netlink and the input layer." -openrc_services="acpid default true" +systemd_services="acpid.service" conf_files="/etc/conf.d/acpid" Add_dependency run glibc post_install() { - vinstall ${FILESDIR}/acpid.rc 755 etc/init.d acpid - vinstall ${FILESDIR}/acpid.confd 644 etc/conf.d acpid + vinstall ${FILESDIR}/acpid.service 644 lib/systemd/system + vinstall ${FILESDIR}/acpid.socket 644 lib/systemd/system vinstall ${FILESDIR}/handler.sh 755 etc/acpi vinstall ${FILESDIR}/anything 644 etc/acpi/events }