summaryrefslogtreecommitdiff
path: root/system/powernowd/powernowd.SlackBuild
diff options
context:
space:
mode:
authorDavid Woodfall <info@davidwoodfall.co.uk>2010-05-13 00:41:28 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:41:28 +0200
commitd2c236cc653f9108c55d61234472ddc17a5e6892 (patch)
tree37376e1f1f1803916a0a97b5fa456aa529d9a1fe /system/powernowd/powernowd.SlackBuild
parent6d9a73d91bbb4e5c0f52d2953bc8503f18a3a3a6 (diff)
downloadslackbuilds-d2c236cc653f9108c55d61234472ddc17a5e6892.tar.gz
system/powernowd: Updated for version 1.00
Diffstat (limited to 'system/powernowd/powernowd.SlackBuild')
-rw-r--r--system/powernowd/powernowd.SlackBuild36
1 files changed, 18 insertions, 18 deletions
diff --git a/system/powernowd/powernowd.SlackBuild b/system/powernowd/powernowd.SlackBuild
index 8671a5a2ad..443d735a98 100644
--- a/system/powernowd/powernowd.SlackBuild
+++ b/system/powernowd/powernowd.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for powernowd
-# Written by Daniel LEVAI leva@ecentrum.hu
+# Written by David Woodfall info@davidwoodfall.co.uk
PRGNAM=powernowd
VERSION=${VERSION:-1.00}
@@ -17,16 +17,19 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
-set -e # Exit on most errors
+set -e
rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
+mkdir -p $TMP $OUTPUT $PKG/usr/sbin
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
@@ -38,28 +41,25 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# We'll do all of this manually
-gcc $SLKCFLAGS -Wall -o powernowd powernowd.c
+make
+install -m 755 powernowd $PKG/usr/sbin
-mkdir -p $PKG/usr/sbin
-strip --strip-unneeded powernowd
-install -m 755 powernowd $PKG/usr/sbin/
-
-mkdir -p $PKG/etc/rc.d/
-cat $CWD/rc.powernowd.new > $PKG/etc/rc.d/rc.powernowd.new
-
-mkdir -p $PKG/usr/man/man1
-gzip -9c $CWD/powernowd.1 > $PKG/usr/man/man1/powernowd.1.gz
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- README \
- $PKG/usr/doc/$PRGNAM-$VERSION
+ powernowd.init \
+ $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
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+