aboutsummaryrefslogtreecommitdiff
path: root/system/powernowd/powernowd.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/powernowd/powernowd.SlackBuild')
-rw-r--r--system/powernowd/powernowd.SlackBuild22
1 files changed, 14 insertions, 8 deletions
diff --git a/system/powernowd/powernowd.SlackBuild b/system/powernowd/powernowd.SlackBuild
index 02e28b0d4888f..f17ad338378eb 100644
--- a/system/powernowd/powernowd.SlackBuild
+++ b/system/powernowd/powernowd.SlackBuild
@@ -6,12 +6,12 @@
PRGNAM=powernowd
VERSION=${VERSION:-1.00}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -22,8 +22,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -39,7 +39,7 @@ fi
set -e
rm -rf $PKG
-mkdir -p $TMP $OUTPUT $PKG/usr/sbin
+mkdir -p $TMP $OUTPUT $PKG/usr/sbin $PKG/etc/rc.d
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
@@ -51,21 +51,27 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+sed -i "s%-O2%$SLKCFLAGS%" Makefile
+sed -i "s%/usr/sbin%$PKG/usr/sbin%" Makefile
+
make
-install -m 755 powernowd $PKG/usr/sbin
+make install
+
+# Remove trailing whitespace at the same time
+cat powernowd.init | sed "s%\s*$%%" > $PKG/etc/rc.d/rc.powernowd.new
find $PKG | xargs file | grep -e "executable" -e "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 \
- powernowd.init \
+ README LICENSE \
$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.${PKGTYPE:-tgz}
-