summaryrefslogtreecommitdiff
path: root/system/powernowd/powernowd.SlackBuild
diff options
context:
space:
mode:
authorDavid Woodfall <dave@dawoodfall.net>2018-03-27 12:45:36 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-03-31 07:41:32 +0700
commit64f4acc4470ecd7e190df67312f9e0238db2d8a2 (patch)
tree845d8277289c618d562be7c8f2c7eb1285b066da /system/powernowd/powernowd.SlackBuild
parentc69d1c195ba228f8a13adebf400042520cee3c93 (diff)
downloadslackbuilds-64f4acc4470ecd7e190df67312f9e0238db2d8a2.tar.gz
system/powernowd: Add rc file + switch to i586.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
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 02e28b0d48..f17ad33837 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}
-