summaryrefslogtreecommitdiffstats
path: root/system/powernowd/powernowd.SlackBuild
diff options
context:
space:
mode:
author Dave Woodfall <dave@slackbuilds.org>2022-02-07 11:55:08 +0000
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-07 23:02:05 +0700
commit4eba879a92c7c14074cecca929cb703be6cc35c3 (patch)
tree3169df7e8ef6707200aaa031907c46de336ef519 /system/powernowd/powernowd.SlackBuild
parent7777a236b2c28f3a6ce1eda41581b4c19e13a73c (diff)
downloadslackbuilds-4eba879a92c7c14074cecca929cb703be6cc35c3.tar.gz
slackbuilds-4eba879a92c7c14074cecca929cb703be6cc35c3.tar.xz
system/powernowd: Use -std=gnu90.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to '')
-rw-r--r--system/powernowd/powernowd.SlackBuild29
1 files changed, 24 insertions, 5 deletions
diff --git a/system/powernowd/powernowd.SlackBuild b/system/powernowd/powernowd.SlackBuild
index 7471c54c46..5de69f2196 100644
--- a/system/powernowd/powernowd.SlackBuild
+++ b/system/powernowd/powernowd.SlackBuild
@@ -2,7 +2,25 @@
# Slackware build script for powernowd
-# Written by David Woodfall <dave@slackbuilds.org>
+# Copyright 2022 Dave Woodfall <dave@slackbuilds.org>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cd $(dirname $0) ; CWD=$(pwd)
@@ -61,17 +79,18 @@ 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
+# gnu90 finds the inline function inside the enum. Using static also seems
+# to work.
+sed -i "s%-O2%-std=gnu90 $SLKCFLAGS%" Makefile
sed -i "s%/usr/sbin%$PKG/usr/sbin%" Makefile
make
make install
# Remove trailing whitespace at the same time
-cat powernowd.init | sed "s%\s*$%%" > $PKG/etc/rc.d/rc.powernowd.new
+sed "s,[[:space:]]\+$,," powernowd.init > $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
+strip --strip-unneeded $PKG/usr/sbin/powernowd
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \