diff options
Diffstat (limited to 'network/dothost/dothost.SlackBuild')
-rw-r--r-- | network/dothost/dothost.SlackBuild | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/network/dothost/dothost.SlackBuild b/network/dothost/dothost.SlackBuild index 7f5fc755a4..23e7c278cf 100644 --- a/network/dothost/dothost.SlackBuild +++ b/network/dothost/dothost.SlackBuild @@ -1,8 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for dothost -# Copyright 2018 Donald Cooley South Haven, Indiana USA +# Copyright 2023 B. Watson (urchlay@slackware.uk) +# Copyright 2018-2020 Donald Cooley South Haven, Indiana USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,20 +23,27 @@ # 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.1} -BUILD=${BUILD:-1} +VERSION=${VERSION:-0.2} +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 +ARCH=noarch + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 fi -CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -49,29 +57,22 @@ 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 dothost binary in /opt -mkdir -p $PKG/opt/dothost -cp dothost $PKG/opt/dothost/dothost +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ -# Link dothost binary to /usr/bin -mkdir -p $PKG/usr/bin -ln -s /opt/dothost/dothost $PKG/usr/bin/dothost +make install PREFIX=/usr mandir=/usr/man DESTDIR=$PKG -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 +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 cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |