Allow calling hibernate for suspend-to-disk, and hibernate-sleep for suspend-to-ram.
authorHenrik Brix Andersen <brix@gentoo.org>
Tue, 7 Dec 2004 20:07:48 +0000 (20:07 +0000)
committerHenrik Brix Andersen <brix@gentoo.org>
Tue, 7 Dec 2004 20:07:48 +0000 (20:07 +0000)
sys-apps/hibernate-script/ChangeLog
sys-apps/hibernate-script/Manifest
sys-apps/hibernate-script/files/digest-hibernate-script-1.02-r1 [new file with mode: 0644]
sys-apps/hibernate-script/hibernate-script-1.02-r1.ebuild [new file with mode: 0644]

index a751c02bae7c0c5318da0eca053c271d9f005150..990a64650f2ba3945b1bfe2f1e297c2d80eceb0a 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for sys-apps/hibernate-script
 # Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hibernate-script/ChangeLog,v 1.3 2004/11/24 19:32:05 brix Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hibernate-script/ChangeLog,v 1.4 2004/12/07 20:07:48 brix Exp $
+
+*hibernate-script-1.02-r1 (07 Dec 2004)
+
+  07 Dec 2004; Henrik Brix Andersen <brix@gentoo.org>
+  +hibernate-script-1.02-r1.ebuild:
+  Allow calling hibernate for suspend-to-disk, and hibernate-sleep for
+  suspend-to-ram.
 
 *hibernate-script-1.02 (24 Nov 2004)
 
index b111de155224982816a4f2e88bcbae4e4782e2fe..b2671846ea05a44aaf6f454b5c251d2188a78c92 100644 (file)
@@ -1,8 +1,10 @@
 MD5 3b7220dba4f87260b327484142e4249e hibernate-script-1.01.ebuild 1230
+MD5 20fd20a704e8b3a692cfc23d585a7428 hibernate-script-1.02-r1.ebuild 1796
 MD5 86554ec0d9835538f5dc142d50c63af1 hibernate-script-1.00.ebuild 1230
 MD5 21cd1f366cf9901df58fb9849d98ce49 hibernate-script-1.02.ebuild 1299
-MD5 897a2392358acf136fd2a3a8e1a3f60a ChangeLog 712
+MD5 f58cc67d9d35244192bc7541a827d519 ChangeLog 933
 MD5 93f5bba7043e57c7092196362f2b494f metadata.xml 255
+MD5 8d975c41e4fcad78bf4ceb1fabdb27f9 files/digest-hibernate-script-1.02-r1 72
 MD5 ebc451ea5a78f44953d9595e446ae1f0 files/digest-hibernate-script-1.00 72
 MD5 c6a307ed804ad8d67438d0de38d8d430 files/digest-hibernate-script-1.01 72
 MD5 8d975c41e4fcad78bf4ceb1fabdb27f9 files/digest-hibernate-script-1.02 72
diff --git a/sys-apps/hibernate-script/files/digest-hibernate-script-1.02-r1 b/sys-apps/hibernate-script/files/digest-hibernate-script-1.02-r1
new file mode 100644 (file)
index 0000000..2e7d966
--- /dev/null
@@ -0,0 +1 @@
+MD5 5f0fee0d6f8be9817b03e997dffe5bb9 hibernate-script-1.02.tar.gz 46963
diff --git a/sys-apps/hibernate-script/hibernate-script-1.02-r1.ebuild b/sys-apps/hibernate-script/hibernate-script-1.02-r1.ebuild
new file mode 100644 (file)
index 0000000..1698698
--- /dev/null
@@ -0,0 +1,57 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hibernate-script/hibernate-script-1.02-r1.ebuild,v 1.1 2004/12/07 20:07:48 brix Exp $
+
+# The following works with both pre-releases and releases
+MY_P=${PN}-${PV/_/-}
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="Hibernate script supporting both suspend-to-ram and suspend-to-disk"
+
+HOMEPAGE="http://softwaresuspend.berlios.de"
+SRC_URI="http://download.berlios.de/softwaresuspend/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+
+IUSE=""
+
+DEPEND="sys-apps/sed"
+RDEPEND=""
+
+src_unpack() {
+       unpack ${A}
+
+       # use /sys/power/state instead of swsusp2
+       sed -i "s:^\(UseSwsusp2\):# \1:"                  ${S}/hibernate.conf
+       sed -i "s:^\(Reboot\):# \1:"                      ${S}/hibernate.conf
+       sed -i "s:^\(EnableEscape\):# \1:"                ${S}/hibernate.conf
+       sed -i "s:^\(DefaultConsoleLevel\):# \1:"         ${S}/hibernate.conf
+       sed -i "s:^# \(PowerdownMethod shutdown\):\1:"    ${S}/hibernate.conf
+
+       # this 'hack' is needed in most cases
+       sed -i "s:^\(SwitchToTextMode\):# \1:"            ${S}/hibernate.conf
+
+       # sleep.conf for suspend to ram...
+       cp ${S}/hibernate.conf ${S}/sleep.conf
+       sed -i "s:^# \(UseSysfsPowerState\):\1:"          ${S}/sleep.conf
+
+       # ... hibernate.conf for suspend to disk
+       sed -i "s:^# \(UseSysfsPowerState\) mem:\1 disk:" ${S}/hibernate.conf
+}
+
+src_install() {
+       BASE_DIR=${D} PREFIX=/usr MAN_DIR=${D}/usr/share/man ${S}/install.sh
+
+       insinto /etc/hibernate
+       doins ${S}/sleep.conf
+
+       # hibernate-sleep will default to using sleep.conf
+       dosym /usr/sbin/hibernate /usr/sbin/hibernate-sleep
+
+       # other ebuilds can install scriplets to this dir
+       keepdir /etc/hibernate/scriptlets.d/
+
+       dodoc CHANGELOG README SCRIPTLET-API TODO
+}