misc/par: Miscellaneous cleanups

Remove a bashism (pattern substitution in parameter expansion) and use
SRCNAM, instead. Remove unneeded comments. Tweak strip boilerplate.
Incoporate gzip in the sed of the man page and remove useless old-style
man page boilerplate. Make comments clearer. Fix a misaligned ruler in
the slack-desc.

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
slakmagik 2011-01-28 23:29:08 -05:00 committed by Robby Workman
parent dd3b109091
commit effa2deca6
2 changed files with 10 additions and 15 deletions

View file

@ -6,15 +6,14 @@
PRGNAM=par
VERSION=${VERSION:-1.52}
SRCNAM=Par152
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@ -44,8 +43,8 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/Par${VERSION/./}.tar.gz
cd Par${VERSION/./}
tar xvf $CWD/$SRCNAM.tar.gz
cd $SRCNAM
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@ -57,20 +56,16 @@ make -f protoMakefile CC="cc -c" LINK1="cc" LINK2="-o" RM="rm" JUNK=""
mkdir -p $PKG/usr/bin
install par $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
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF |
cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/man/man1
# avoid tripping up extension sniffers
sed 's/par\.doc/par.txt/g' par.1 > $PKG/usr/man/man1/par.1
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $(find . -type l); do ln -s $(readlink $i).gz $i.gz; rm $i; done
)
# 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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
# as above
# 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