mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
system/hdapsd: Updated for version 20090401.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
parent
a2ecab12c1
commit
b8d4f05bbc
8 changed files with 46 additions and 61 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
|
@ -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 {} \;
|
||||
|
|
|
@ -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"
|
||||
|
|
11
system/hdapsd/patches/hdapsd-20090401-fix-manpage.patch
Normal file
11
system/hdapsd/patches/hdapsd-20090401-fix-manpage.patch
Normal file
|
@ -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.
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue