summaryrefslogtreecommitdiff
path: root/system/hibernate-script
diff options
context:
space:
mode:
authorSergey Portnov <sergius256@narod.ru>2010-05-11 22:55:19 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 22:55:19 +0200
commit9690d1dba9d24ec29728d5473da4d2b69af4a17e (patch)
treebac0aaf6dcc56dcd3e57552a6a481c35abcd3a27 /system/hibernate-script
parent9bd9e2003182c9a30bf3783edce435399ee53111 (diff)
downloadslackbuilds-9690d1dba9d24ec29728d5473da4d2b69af4a17e.tar.gz
system/hibernate-script: Added to 12.1 repository
Diffstat (limited to 'system/hibernate-script')
-rw-r--r--system/hibernate-script/README10
-rw-r--r--system/hibernate-script/doinst.sh14
-rw-r--r--system/hibernate-script/hibernate-script.SlackBuild60
-rw-r--r--system/hibernate-script/hibernate-script.info8
-rw-r--r--system/hibernate-script/slack-desc18
5 files changed, 110 insertions, 0 deletions
diff --git a/system/hibernate-script/README b/system/hibernate-script/README
new file mode 100644
index 0000000000..d2dd4adbca
--- /dev/null
+++ b/system/hibernate-script/README
@@ -0,0 +1,10 @@
+hibernate-script (frontend to TuxOnIce hibernation engine)
+
+hibernate-script is a userspace frontend to the TuxOnIce code. It
+interacts with a TuxOnIce-patched kernel providing the possibility to
+put the computer into suspend-to ram (ACPI S3) or suspend-to-disk (ACPI S4)
+state with a single console command. Scriptlet API provides scalable
+functionality to eliminate problems with some software. The user interface
+part also can be tuned easily.
+
+This package is recommended to run TuxOnIce-patched kernel.
diff --git a/system/hibernate-script/doinst.sh b/system/hibernate-script/doinst.sh
new file mode 100644
index 0000000000..3dbea0c53b
--- /dev/null
+++ b/system/hibernate-script/doinst.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
diff --git a/system/hibernate-script/hibernate-script.SlackBuild b/system/hibernate-script/hibernate-script.SlackBuild
new file mode 100644
index 0000000000..9e3e9b370a
--- /dev/null
+++ b/system/hibernate-script/hibernate-script.SlackBuild
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# Slackware build script for hibernate-script - frontend to
+# TuxOnIce kernel patchset.
+# Written by Sergey Portnov <sergius256 at narod dot ru>
+
+PRGNAM=hibernate-script
+VERSION=1.99
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+DOCS="CHANGELOG COPYING README README.xfs SCRIPTLET-API hibernate.vim admin/*"
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP || exit 1
+rm -rf $PRGNAM-$VERSION
+tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+cd $PRGNAM-$VERSION || exit 1
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+export BASE_DIR=$PKG
+export PREFIX=/usr
+./install.sh
+
+( cd $PKG/usr/man ; find . -type f -exec gzip -9 {} \; )
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG/etc/hibernate
+for i in * ; do
+ if [ -f $i ]; then
+ echo "Renaming $i to $i.new"
+ mv "$i" "$i.new"
+ fi
+done
+
+cd $PKG
+ls -C1 etc/hibernate/* | awk {print\(\"config\ \"\$1\)} - >> install/doinst.sh
+
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/system/hibernate-script/hibernate-script.info b/system/hibernate-script/hibernate-script.info
new file mode 100644
index 0000000000..d6164d8fc1
--- /dev/null
+++ b/system/hibernate-script/hibernate-script.info
@@ -0,0 +1,8 @@
+PRGNAM="hibernate-script"
+VERSION="1.99"
+HOMEPAGE="http://www.tuxonice.net/"
+DOWNLOAD="http://www.tuxonice.net/downloads/all/hibernate-script-1.99.tar.gz"
+MD5SUM="11832e77edc4a13330aaced8cea52dfb"
+MAINTAINER="Sergey Portnov"
+EMAIL="sergius256@narod.ru"
+APPROVED="rworkman"
diff --git a/system/hibernate-script/slack-desc b/system/hibernate-script/slack-desc
new file mode 100644
index 0000000000..0b0b7823f3
--- /dev/null
+++ b/system/hibernate-script/slack-desc
@@ -0,0 +1,18 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+hibernate-script: hibernate-script (frontend to TuxOnIce hibernation engine)
+hibernate-script:
+hibernate-script: hibernate-script package contains a set of shell scripts to provide
+hibernate-script: TuxOnIce hibernation engine functionality. It does all the work to
+hibernate-script: prepare the computer for hibernation. Scriptlet API allows to perform
+hibernate-script: some actions like unloading modules or shutting applications. This
+hibernate-script: package is required to run TuxOnIce-patched kernel.
+hibernate-script:
+hibernate-script: Homepage: http://www.tuxonice.net
+hibernate-script: