diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2012-05-19 09:53:59 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2012-05-19 09:53:59 +0000 |
commit | e4ba716e47a160b4f0781c6435ff46c825bfd084 (patch) | |
tree | 887fa431ea315f0d72b6064f8d1e603df1781792 /sys-power/acpid | |
parent | Version bump and proxy-maint (bug 416173, thanks Alex Buell), EAPI-4, respect... (diff) | |
download | gentoo-2-e4ba716e47a160b4f0781c6435ff46c825bfd084.tar.gz gentoo-2-e4ba716e47a160b4f0781c6435ff46c825bfd084.tar.bz2 gentoo-2-e4ba716e47a160b4f0781c6435ff46c825bfd084.zip |
New socket activation based systemd files as per user request. Ensure /run is present in pkg_postinst() for acpid.socket file.
(Portage version: 2.2.0_alpha107/cvs/Linux x86_64)
Diffstat (limited to 'sys-power/acpid')
-rw-r--r-- | sys-power/acpid/ChangeLog | 10 | ||||
-rw-r--r-- | sys-power/acpid/acpid-2.0.16-r1.ebuild | 53 | ||||
-rw-r--r-- | sys-power/acpid/files/acpid-2.0.16-conf.d | 6 | ||||
-rw-r--r-- | sys-power/acpid/files/acpid-2.0.16-init.d | 21 | ||||
-rw-r--r-- | sys-power/acpid/files/systemd/acpid.service | 7 | ||||
-rw-r--r-- | sys-power/acpid/files/systemd/acpid.socket | 8 |
6 files changed, 104 insertions, 1 deletions
diff --git a/sys-power/acpid/ChangeLog b/sys-power/acpid/ChangeLog index 996550d6f427..afedf54fff35 100644 --- a/sys-power/acpid/ChangeLog +++ b/sys-power/acpid/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-power/acpid # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/ChangeLog,v 1.84 2012/05/06 17:01:01 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/ChangeLog,v 1.85 2012/05/19 09:53:59 ssuominen Exp $ + +*acpid-2.0.16-r1 (19 May 2012) + + 19 May 2012; Samuli Suominen <ssuominen@gentoo.org> +acpid-2.0.16-r1.ebuild, + +files/acpid-2.0.16-conf.d, +files/acpid-2.0.16-init.d, + +files/systemd/acpid.service, +files/systemd/acpid.socket: + New socket activation based systemd files as per user request. Ensure /run is + present in pkg_postinst() for acpid.socket file. 06 May 2012; Raúl Porcel <armin76@gentoo.org> acpid-2.0.14.ebuild: ia64 stable wrt #406947 diff --git a/sys-power/acpid/acpid-2.0.16-r1.ebuild b/sys-power/acpid/acpid-2.0.16-r1.ebuild new file mode 100644 index 000000000000..1c3822e7b060 --- /dev/null +++ b/sys-power/acpid/acpid-2.0.16-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/acpid-2.0.16-r1.ebuild,v 1.1 2012/05/19 09:53:59 ssuominen Exp $ + +EAPI=4 +inherit systemd + +DESCRIPTION="Daemon for Advanced Configuration and Power Interface" +HOMEPAGE="http://tedfelix.com/linux/acpid-netlink.html" +SRC_URI="http://tedfelix.com/linux/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ia64 -ppc ~x86" +IUSE="" + +src_configure() { + econf --docdir=/usr/share/doc/${PF} +} + +src_install() { + emake DESTDIR="${D}" install + + newdoc kacpimon/README README.kacpimon + dodoc -r samples + rm -f "${D}"/usr/share/doc/${PF}/COPYING + + exeinto /etc/acpi + newexe "${FILESDIR}"/${PN}-1.0.6-default.sh default.sh + insinto /etc/acpi/events + newins "${FILESDIR}"/${PN}-1.0.4-default default + + newinitd "${FILESDIR}"/${PN}-2.0.16-init.d ${PN} + newconfd "${FILESDIR}"/${PN}-2.0.16-conf.d ${PN} + + systemd_dounit "${FILESDIR}"/systemd/${PN}.{service,socket} +} + +pkg_postinst() { + elog + elog "You may wish to read the Gentoo Linux Power Management Guide," + elog "which can be found online at:" + elog "http://www.gentoo.org/doc/en/power-management-guide.xml" + elog + + # files/systemd/acpid.socket -> ListenStream=/run/acpid.socket + mkdir -p "${ROOT}"/run + + if ! grep -qs "^tmpfs.*/run " "${ROOT}"/proc/mounts ; then + echo + ewarn "You should reboot the system now to get /run mounted with tmpfs!" + fi +} diff --git a/sys-power/acpid/files/acpid-2.0.16-conf.d b/sys-power/acpid/files/acpid-2.0.16-conf.d new file mode 100644 index 000000000000..9aadb4cd814a --- /dev/null +++ b/sys-power/acpid/files/acpid-2.0.16-conf.d @@ -0,0 +1,6 @@ +# /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_ARGS="" diff --git a/sys-power/acpid/files/acpid-2.0.16-init.d b/sys-power/acpid/files/acpid-2.0.16-init.d new file mode 100644 index 000000000000..412a265fc56b --- /dev/null +++ b/sys-power/acpid/files/acpid-2.0.16-init.d @@ -0,0 +1,21 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/files/acpid-2.0.16-init.d,v 1.1 2012/05/19 09:53:59 ssuominen Exp $ + +extra_started_commands="reload" +command="/usr/sbin/acpid" +command_args="${ACPID_ARGS}" +start_stop_daemon_args="--quiet" +description="Daemon for Advanced Configuration and Power Interface" + +depend() { + need localmount + use logger +} + +reload() { + ebegin "Reloading acpid configuration" + start-stop-daemon --exec $command --signal HUP + eend $? +} diff --git a/sys-power/acpid/files/systemd/acpid.service b/sys-power/acpid/files/systemd/acpid.service new file mode 100644 index 000000000000..8f8c7e4bede4 --- /dev/null +++ b/sys-power/acpid/files/systemd/acpid.service @@ -0,0 +1,7 @@ +[Unit] +Description=ACPI Event Daemon +Requires=acpid.socket + +[Service] +EnvironmentFile=/etc/conf.d/acpid +ExecStart=/usr/sbin/acpid -f $ACPID_ARGS diff --git a/sys-power/acpid/files/systemd/acpid.socket b/sys-power/acpid/files/systemd/acpid.socket new file mode 100644 index 000000000000..5fa2e027de8a --- /dev/null +++ b/sys-power/acpid/files/systemd/acpid.socket @@ -0,0 +1,8 @@ +[Unit] +Description=ACPI Event Daemon Listen Socket + +[Socket] +ListenStream=/run/acpid.socket + +[Install] +WantedBy=sockets.target |