summaryrefslogtreecommitdiffstats
path: root/network/dothost/dothost.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/dothost/dothost.SlackBuild')
-rw-r--r--network/dothost/dothost.SlackBuild48
1 files changed, 18 insertions, 30 deletions
diff --git a/network/dothost/dothost.SlackBuild b/network/dothost/dothost.SlackBuild
index 3c55190010..23e7c278cf 100644
--- a/network/dothost/dothost.SlackBuild
+++ b/network/dothost/dothost.SlackBuild
@@ -2,6 +2,7 @@
# Slackware build script for dothost
+# Copyright 2023 B. Watson (urchlay@slackware.uk)
# Copyright 2018-2020 Donald Cooley South Haven, Indiana USA
# All rights reserved.
#
@@ -22,25 +23,22 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230223 bkw: BUILD=2
+# - new maintainer.
+# - ARCH=noarch (no compiled code, no lib64 dir).
+# - cosmetics in slack-desc and README.
+# - simplify build.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=dothost
VERSION=${VERSION:-0.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
+ARCH=noarch
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -59,29 +57,19 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-# Install to /usr instead of /usr/local
-sed -i 's_/usr/local_/usr_' Makefile
-
-# Install man pages into /usr/man instead of /usr/share/man
-sed -i 's_/share/man_/man_' Makefile
-
-make
-make install DESTDIR=$PKG
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-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
+make install PREFIX=/usr mandir=/usr/man DESTDIR=$PKG
gzip -9 $PKG/usr/man/man1/$PRGNAM.1
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a doc/* $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+# no need for the man page in /usr/doc
+rm -f doc/*.1
+cp -a doc/* $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc