summaryrefslogtreecommitdiff
path: root/system/mkslack/mkslack.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/mkslack/mkslack.SlackBuild')
-rw-r--r--system/mkslack/mkslack.SlackBuild34
1 files changed, 18 insertions, 16 deletions
diff --git a/system/mkslack/mkslack.SlackBuild b/system/mkslack/mkslack.SlackBuild
index 1a76a876f4..1f216ff64e 100644
--- a/system/mkslack/mkslack.SlackBuild
+++ b/system/mkslack/mkslack.SlackBuild
@@ -2,8 +2,8 @@
# Slackware build script for mkslack
-# Copyright 2010 David Woodfall <dave@slackbuilds.org>,
-# Modifications copyright slakmagik <slakmagik@gmail.com>
+# Copyright 2010-20 Dave Woodfall <dave@slackbuilds.org>,
+# slakmagik <slakmagik@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=mkslack
-VERSION=${VERSION:-5.2}
+VERSION=${VERSION:-5.3.0}
ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -38,12 +38,13 @@ README=$PKG/usr/doc/$PRGNAM-$VERSION/README
set -e
rm -rf $PKG
-mkdir -p $TMP $PKG/usr/bin $PKG/usr/share/mkslack/templates $PKG/etc/mkslack \
- $PKG/usr/man/man1 $OUTPUT
+mkdir -p $TMP $OUTPUT \
+ $PKG/usr/share/mkslack/templates
+
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION/$PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -51,30 +52,31 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+sed -i -e "s/@VERSION@/$VERSION/" mkslack.1
gzip mkslack.1
-install -m 644 mkslack.1.gz $PKG/usr/man/man1
-install -m 755 mkslack $PKG/usr/bin
-install -m 644 template* $PKG/usr/share/mkslack/templates
-install -m 644 *SlackBuild $PKG/usr/share/mkslack/templates
-install -m 644 mkslack.conf.new $PKG/etc/mkslack
+install -m 644 -D mkslack.1.gz $PKG/usr/man/man1/mkslack.1.gz
+install -m 755 -D mkslack $PKG/usr/bin/mkslack
+install -m 644 -D mkslack.conf.new $PKG/etc/mkslack/mkslack.conf.new
+install -m 644 templates/* $PKG/usr/share/mkslack/templates
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a original-templates $PKG/usr/doc/$PRGNAM-$VERSION
+
# generate the README from some introductory text and a dump of the manual
cat << EOF > $README
mkslack - a SlackBuild generator script
-Copyright 2010 David Woodfall, modification by slakmagik
+Copyright 2010-2020 Dave Woodfall, modification by slakmagik
mkslack is licensed under a "one-clause BSD/Slackware" license.
See the script for the full text.
-Homepage: http://tty1.uk/slackbuilds/noversion/mkslack/
+Homepage: http://tty1.uk/slackbuilds/noversion/mkslack
EOF
-man ./mkslack.1.gz | col -b | expand | cat -s | sed '
+man ./mkslack.1.gz | col -b | expand | fmt -72 | cat -s | sed "
1d
s/\([^[:space:]]\)[[:space:]][[:space:]]*/\1 /g
/^$/N;/MKSLACK(1)$/D
- ' >> $README
+ " >> $README
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cat $CWD/ChangeLog.txt > $PKG/usr/doc/$PRGNAM-$VERSION/ChangeLog.txt
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc