aboutsummaryrefslogtreecommitdiff
path: root/misc/par
diff options
context:
space:
mode:
authorslakmagik <slakmagik@gmail.com>2011-01-28 23:29:08 -0500
committerRobby Workman <rworkman@slackbuilds.org>2011-03-01 09:37:20 -0600
commiteffa2deca691c0dcd94a758787faa0d8bc6a1dd4 (patch)
tree974987f03fd748a5325134ac4acaa634f053143b /misc/par
parentdd3b109091b5f407b318843ad2c98a875b240869 (diff)
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>
Diffstat (limited to 'misc/par')
-rw-r--r--misc/par/par.SlackBuild23
-rw-r--r--misc/par/slack-desc2
2 files changed, 10 insertions, 15 deletions
diff --git a/misc/par/par.SlackBuild b/misc/par/par.SlackBuild
index 36ceba50b9ae4..e8010bf4a4fa8 100644
--- a/misc/par/par.SlackBuild
+++ b/misc/par/par.SlackBuild
@@ -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
diff --git a/misc/par/slack-desc b/misc/par/slack-desc
index 5f02ed9dcdeb9..c0eabd6fc02ae 100644
--- a/misc/par/slack-desc
+++ b/misc/par/slack-desc
@@ -5,7 +5,7 @@
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler------------------------------------------------------|
+ |-----handy-ruler------------------------------------------------------|
par: par (paragraph reformatter)
par:
par: par is a paragraph reformatter, vaguely similar to fmt, but better.