diff options
Diffstat (limited to 'misc/par/par.SlackBuild')
-rw-r--r-- | misc/par/par.SlackBuild | 62 |
1 files changed, 37 insertions, 25 deletions
diff --git a/misc/par/par.SlackBuild b/misc/par/par.SlackBuild index 334254bb06e65..f7b1c7f7365fe 100644 --- a/misc/par/par.SlackBuild +++ b/misc/par/par.SlackBuild @@ -3,16 +3,25 @@ # Slackware build script for par # Written by slakmagik <slakmagik@gmail.com> # Released under the WTFPL +# Now maintained by B. Watson <yalhcru@gmail.com> + +# 20200622 bkw: +# - Update for v1.53 (after *19 years*) +# - Correctly rm the source dir from previous runs +# - Fix mode 0700 top-level source dir (it's annoying) +# - i486 => i586 +# - various tweaks +# - add default_env patch (see below) PRGNAM=par -VERSION=${VERSION:-1.52} -SRCNAM=Par152 +SRCNAM=Par +VERSION=${VERSION:-1.53.0} BUILD=${BUILD:-1} 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 @@ -23,8 +32,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" @@ -42,33 +51,36 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$SRCNAM.tar.gz -cd $SRCNAM +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$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 600 -o -perm 444 -o -perm 440 \ - -o -perm 400 \) -exec chmod 644 {} \; +# please don't revert this to template: +chmod 755 . +chmod 644 * + +# 20200622 bkw: the man page says to: +# $ export PARINIT="rTbgqR B=.,?'_A_a_@ Q=_s>|" +# before running. This one-line patch just makes that the default, if +# the PARINIT variable isn't set. This sets a reasonable default so +# users don't have to diddle their startup files. +[ "${PRISTINE:-no}" = "no" ] && patch -p1 < $CWD/default_env.diff -make -f protoMakefile CC="cc -c" LINK1="cc" LINK2="-o" RM="rm" JUNK="" +make -f protoMakefile CFLAGS="$SLKCFLAGS" mkdir -p $PKG/usr/bin -install par $PKG/usr/bin +install -m0755 -s $PRGNAM $PKG/usr/bin -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | - cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +# rename ".doc" so nothing thinks it's a word document. +mv $PRGNAM.doc $PRGNAM.txt +sed -i "s/$PRGNAM\.doc/$PRGNAM.txt/g" $PRGNAM.txt $PRGNAM.1 mkdir -p $PKG/usr/man/man1 -# make the manual reflect a filename change which will be made below -sed 's/par\.doc/par.txt/g' par.1 | gzip -c > $PKG/usr/man/man1/par.1.gz +gzip -9c $PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -# change the filename (and its references to itself) to avoid tripping up -# extension sniffers -sed 's/par\.doc/par.txt/g' par.doc > $PKG/usr/doc/$PRGNAM-$VERSION/par.txt -cat releasenotes > $PKG/usr/doc/$PRGNAM-$VERSION/releasenotes -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a $PRGNAM.txt releasenotes $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |