diff options
author | Markos Chandras <hwoarang@gentoo.org> | 2012-01-01 14:44:49 +0000 |
---|---|---|
committer | Markos Chandras <hwoarang@gentoo.org> | 2012-01-01 14:44:49 +0000 |
commit | b75f4394757d9356cd323f07aa9a5c28568d0ee4 (patch) | |
tree | 17d2564f300e7603ce378b78ff60195c56b2d3b9 /app-laptop | |
parent | Add mask for xf86-input-evdev versions that require mtdev. (diff) | |
download | gentoo-2-b75f4394757d9356cd323f07aa9a5c28568d0ee4.tar.gz gentoo-2-b75f4394757d9356cd323f07aa9a5c28568d0ee4.tar.bz2 gentoo-2-b75f4394757d9356cd323f07aa9a5c28568d0ee4.zip |
Check if directory exists in /var/run. Non maintainer commit. Bug #342049. Thanks to i.Dark_Templar <dark_templar@hotbox.ru>
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'app-laptop')
-rw-r--r-- | app-laptop/laptop-mode-tools/ChangeLog | 11 | ||||
-rw-r--r-- | app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4 | 7 | ||||
-rw-r--r-- | app-laptop/laptop-mode-tools/laptop-mode-tools-1.55-r5.ebuild | 68 |
3 files changed, 82 insertions, 4 deletions
diff --git a/app-laptop/laptop-mode-tools/ChangeLog b/app-laptop/laptop-mode-tools/ChangeLog index 96b478285d8c..fef1c192ca60 100644 --- a/app-laptop/laptop-mode-tools/ChangeLog +++ b/app-laptop/laptop-mode-tools/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-laptop/laptop-mode-tools -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.55 2011/12/31 21:25:29 idl0r Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.56 2012/01/01 14:44:49 hwoarang Exp $ + +*laptop-mode-tools-1.55-r5 (01 Jan 2012) + + 01 Jan 2012; Markos Chandras <hwoarang@gentoo.org> + +laptop-mode-tools-1.55-r5.ebuild, files/laptop_mode.init-1.4: + Check if directory exists in /var/run. Non maintainer commit. Bug #342049. + Thanks to i.Dark_Templar <dark_templar@hotbox.ru> *laptop-mode-tools-1.55-r4 (31 Dec 2011) *laptop-mode-tools-1.55-r3 (31 Dec 2011) diff --git a/app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4 b/app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4 index 0e10e858e893..5a7da1463ae9 100644 --- a/app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4 +++ b/app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4 @@ -1,7 +1,7 @@ #!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4,v 1.3 2011/12/31 21:25:29 idl0r Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4,v 1.4 2012/01/01 14:44:49 hwoarang Exp $ extra_started_commands="reload" @@ -22,6 +22,9 @@ start() { checkconfig || return 1 ebegin "Starting laptop_mode" + # bug #342049 fix + # check if dir exists and creates if it doesn't + checkpath -q -d -m 755 /var/run/laptop-mode-tools touch /var/run/laptop-mode-tools/enabled /usr/sbin/laptop_mode auto >/dev/null eend $? diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.55-r5.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.55-r5.ebuild new file mode 100644 index 000000000000..db2b0abb5f60 --- /dev/null +++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.55-r5.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/laptop-mode-tools-1.55-r5.ebuild,v 1.1 2012/01/01 14:44:49 hwoarang Exp $ + +EAPI=2 +inherit eutils + +MY_P=${PN}_${PV} + +DESCRIPTION="Linux kernel laptop_mode user-space utilities" +HOMEPAGE="http://www.samwel.tk/laptop_mode/" +SRC_URI="http://www.samwel.tk/laptop_mode/tools/downloads/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="acpi apm bluetooth scsi" + +RDEPEND="sys-apps/ethtool + acpi? ( sys-power/acpid ) + apm? ( sys-apps/apmd ) + bluetooth? ( net-wireless/bluez ) + scsi? ( sys-apps/sdparm ) + sys-apps/hdparm" +DEPEND="" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + # Patching to avoid !sys-power/pm-utils depend wrt #327443 + epatch "${FILESDIR}"/${P}-pm-utils-1.4.0.patch + # Add support for Linux3 + epatch "${FILESDIR}"/${P}-linux3-support.patch +} + +src_compile() { :; } + +src_install() { + DESTDIR="${D}" \ + INIT_D="none" \ + MAN_D="/usr/share/man" \ + ACPI="$(use acpi && echo force || echo disabled)" \ + PMU="$(false && echo force || echo disabled)" \ + APM="$(use apm && echo force || echo disabled)" \ + ./install.sh || die + + dodoc Documentation/*.txt README || die + newinitd "${FILESDIR}"/laptop_mode.init-1.4 laptop_mode + + # Commented out to avoid !sys-power/pm-utils depend wrt #327443 + # exeinto /etc/pm/power.d + # newexe "${FILESDIR}"/laptop_mode_tools.pmutils laptop_mode_tools +} + +pkg_postinst() { + if ! use acpi && ! use apm; then + ewarn + ewarn "Without USE=\"acpi\" or USE=\"apm\" ${PN} can not" + ewarn "automatically disable laptop_mode on low battery." + ewarn + ewarn "This means you can lose up to 10 minutes of work if running" + ewarn "out of battery while laptop_mode is enabled." + ewarn + ewarn "Please see /usr/share/doc/${PF}/laptop-mode.txt.gz for further" + ewarn "information." + ewarn + fi +} |