aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/hdapsd/README12
-rw-r--r--system/hdapsd/README.SLACKWARE1
-rw-r--r--system/hdapsd/doinst.sh21
-rw-r--r--system/hdapsd/hdapsd-mksrctarball.sh26
-rw-r--r--system/hdapsd/hdapsd.SlackBuild22
-rw-r--r--system/hdapsd/hdapsd.info12
-rw-r--r--system/hdapsd/patches/hdapsd-20090401-fix-manpage.patch11
-rw-r--r--system/hdapsd/slack-desc2
8 files changed, 46 insertions, 61 deletions
diff --git a/system/hdapsd/README b/system/hdapsd/README
index 620eb613756b1..4e60cff51933c 100644
--- a/system/hdapsd/README
+++ b/system/hdapsd/README
@@ -3,14 +3,10 @@ It monitors the acceleration values through the HDAPS interface and
automatically initiates disk head parking if a fall or sliding of the
laptop is detected.
-If you would like to use the latest source when building your
-hdapsd package, you will need to get it from their git server.
-In order to do that, use the included hdapsd-mksrctarball.sh
-script, which will download the source code and will create
-a compressed tarball using today's date (YYYYMMDD) as its version string.
-To use your newly download source, you will need to tell the SlackBuild
-to use it like so: VERSION=YYYYMMDD ./hdapsd.SlackBuild
-
Be sure to see README.SLACKWARE for usage information.
This requires tp_smapi.
+
+Recommended readings:
+http://www.thinkwiki.org/wiki/HDAPS
+http://wiki.archlinux.org/index.php/HDAPS
diff --git a/system/hdapsd/README.SLACKWARE b/system/hdapsd/README.SLACKWARE
index 1146b3b74fcce..9228775353fef 100644
--- a/system/hdapsd/README.SLACKWARE
+++ b/system/hdapsd/README.SLACKWARE
@@ -1,4 +1,5 @@
hdapsd README.SLACKWARE - 20090329 <rworkman@slackbuilds.org>
+Aplies also for hdaps-20090401 <hba.nihilismus@gmail.com>
We have added a custom /etc/hdapsd.conf file in which you can specify
various details about your system without editing the installed init
diff --git a/system/hdapsd/doinst.sh b/system/hdapsd/doinst.sh
index bfb1617ab2d38..fc47654325c2c 100644
--- a/system/hdapsd/doinst.sh
+++ b/system/hdapsd/doinst.sh
@@ -11,13 +11,18 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same perms on rc.hdapsd.new:
-if [ -e etc/rc.d/rc.hdapsd ]; then
- cp -a etc/rc.d/rc.hdapsd etc/rc.d/rc.hdapsd.new.incoming
- cat etc/rc.d/rc.hdapsd.new > etc/rc.d/rc.hdapsd.new.incoming
- mv etc/rc.d/rc.hdapsd.new.incoming etc/rc.d/rc.hdapsd.new
-fi
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
-config /etc/rc.d/rc.hdapsd.new
-config /etc/hdapsd.conf.new
+preserve_perms etc/rc.d/rc.hdapsd.new
+config etc/rc.d/rc.hdapsd.new
+config etc/hdapsd.conf.new
diff --git a/system/hdapsd/hdapsd-mksrctarball.sh b/system/hdapsd/hdapsd-mksrctarball.sh
deleted file mode 100644
index 7431d82648cfe..0000000000000
--- a/system/hdapsd/hdapsd-mksrctarball.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# This script helps you to download and compress the
-# sourcecode for ffmpeg from its svn server.
-# Copyright (c) 2008 alkos333 <me@alkos333.net>
-
-# Based on ffmpeg-mksrctarball.sh (SlackBuilds.org, Slackware 12.0)
-
-# Thanks to Antonio Hernández Blas for a suggestion on SBo mailing list
-
-set -e
-
-PRGNAM=hdapsd
-VERSION=$(date +"%Y%m%d")
-GITSERVER=git://repo.or.cz/hdapsd.git
-
-echo "--> Downloading sourcecode from $GITSERVER"
-git clone $GITSERVER $PRGNAM-$VERSION 2>&1
-
-echo "--> Making the sourcecode tarball: $PRGNAM-$VERSION.tar.bz2 "
-tar -c $PRGNAM-$VERSION/ | bzip2 -9 > $PRGNAM-$VERSION.tar.bz2
-
-echo "--> Erasing the sourcecode directory: $PRGNAM-$VERSION/"
-rm -rf $PRGNAM-$VERSION/
-
-echo "--> Sourcecode tarball for $PRGNAM: $PRGNAM-$VERSION.tar.bz2"
diff --git a/system/hdapsd/hdapsd.SlackBuild b/system/hdapsd/hdapsd.SlackBuild
index c4efbe52c9a01..34e5e6602e47e 100644
--- a/system/hdapsd/hdapsd.SlackBuild
+++ b/system/hdapsd/hdapsd.SlackBuild
@@ -25,18 +25,17 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Modified by Robby Workman <rworkman@slackbuilds.org>
+# Updated by Antonio Hernández Blas <hba.nihilismus@gmail.com> for hdapsd-20090401
PRGNAM=hdapsd
-VERSION=${VERSION:-20090328}
+VERSION=${VERSION:-20090401}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -66,12 +65,14 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-./autogen.sh
+# From hdapsd's git repository:
+# http://repo.or.cz/w/hdapsd.git/commitdiff/3a35d05a1a7260de9f3adefdbfb34ed8c9b5f577
+patch -p1 < $CWD/patches/hdapsd-20090401-fix-manpage.patch || exit 1
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -87,13 +88,10 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-( cd $PKG/usr/man
-find . -type f -exec gzip -9 {} \;
-for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
# Install a sample config file and init script
mkdir -p $PKG/etc/rc.d
@@ -102,8 +100,8 @@ cat $CWD/rc.hdapsd > $PKG/etc/rc.d/rc.hdapsd.new
chmod 0755 $PKG/etc/rc.d/rc.hdapsd.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-# ChangeLog NEWS README are empty
-cp -a AUTHORS COPYING $PKG/usr/doc/$PRGNAM-$VERSION
+# NEWS file is empty.
+cp -a AUTHORS COPYING ChangeLog README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
find $PKG/usr/doc -type f -exec chmod 644 {} \;
diff --git a/system/hdapsd/hdapsd.info b/system/hdapsd/hdapsd.info
index 39090d54b6f9e..f0e903f247ea0 100644
--- a/system/hdapsd/hdapsd.info
+++ b/system/hdapsd/hdapsd.info
@@ -1,10 +1,10 @@
PRGNAM="hdapsd"
-VERSION="20090328"
-HOMEPAGE="http://repo.or.cz/w/hdapsd.git"
-DOWNLOAD="http://slackbuilds.org/sources/13.0/hdapsd-20090328.tar.bz2"
-MD5SUM="1f70f3cc8f1d89dfa8b166f6dc4158a8"
+VERSION="20090401"
+HOMEPAGE="http://hdaps.sourceforge.net"
+DOWNLOAD="http://downloads.sourceforge.net/hdaps/hdapsd-20090401.tar.gz"
+MD5SUM="897cee8b0192febd127470f3e9506aeb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-MAINTAINER="alkos333"
-EMAIL="me@alkso333.net"
+MAINTAINER="Antonio Hernández Blas"
+EMAIL="hba.nihilismus@gmail.com"
APPROVED="rworkman"
diff --git a/system/hdapsd/patches/hdapsd-20090401-fix-manpage.patch b/system/hdapsd/patches/hdapsd-20090401-fix-manpage.patch
new file mode 100644
index 0000000000000..b8527a31c2de9
--- /dev/null
+++ b/system/hdapsd/patches/hdapsd-20090401-fix-manpage.patch
@@ -0,0 +1,11 @@
+--- a/doc/hdapsd.man
++++ b/doc/hdapsd.man
+@@ -10,7 +10,7 @@ hdapsd \- park the drive in case of an emergency
+ .TP
+ \fB\-f\fR \fB\-\-force\fR
+ Force unloading heads, even if kernel thinks different (on pre ATA7 drives).
+-This only works when adding devices by hand (-d).
++This only works when adding devices by hand (\-d).
+ .TP
+ \fB\-s\fR \fB\-\-sensitivity=\fR\fI<sensitivity>\fR
+ How sensitive hdapsd should be to movements.
diff --git a/system/hdapsd/slack-desc b/system/hdapsd/slack-desc
index 4897cd8229e66..87340c2f19d15 100644
--- a/system/hdapsd/slack-desc
+++ b/system/hdapsd/slack-desc
@@ -13,7 +13,7 @@ hdapsd: It monitors the acceleration values through the HDAPS interface and
hdapsd: automatically initiates disk head parking if a fall or sliding of the
hdapsd: laptop is detected.
hdapsd:
-hdapsd: Homepage: http://repo.or.cz/w/hdapsd.git
+hdapsd: Homepage: http://hdaps.sourceforge.net
hdapsd:
hdapsd:
hdapsd: