mirror of
https://github.com/SlackBuildsOrg/slackbuilds
synced 2024-09-28 15:21:00 +02:00
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:
parent
dd3b109091
commit
effa2deca6
2 changed files with 10 additions and 15 deletions
|
@ -6,15 +6,14 @@
|
||||||
|
|
||||||
PRGNAM=par
|
PRGNAM=par
|
||||||
VERSION=${VERSION:-1.52}
|
VERSION=${VERSION:-1.52}
|
||||||
|
SRCNAM=Par152
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
# Automatically determine the architecture we're building on:
|
|
||||||
if [ -z "$ARCH" ]; then
|
if [ -z "$ARCH" ]; then
|
||||||
case "$( uname -m )" in
|
case "$( uname -m )" in
|
||||||
i?86) ARCH=i486 ;;
|
i?86) ARCH=i486 ;;
|
||||||
arm*) ARCH=arm ;;
|
arm*) ARCH=arm ;;
|
||||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
|
||||||
*) ARCH=$( uname -m ) ;;
|
*) ARCH=$( uname -m ) ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
@ -44,8 +43,8 @@ rm -rf $PKG
|
||||||
mkdir -p $TMP $PKG $OUTPUT
|
mkdir -p $TMP $PKG $OUTPUT
|
||||||
cd $TMP
|
cd $TMP
|
||||||
rm -rf $PRGNAM-$VERSION
|
rm -rf $PRGNAM-$VERSION
|
||||||
tar xvf $CWD/Par${VERSION/./}.tar.gz
|
tar xvf $CWD/$SRCNAM.tar.gz
|
||||||
cd Par${VERSION/./}
|
cd $SRCNAM
|
||||||
chown -R root:root .
|
chown -R root:root .
|
||||||
find . \
|
find . \
|
||||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
\( -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
|
mkdir -p $PKG/usr/bin
|
||||||
install par $PKG/usr/bin
|
install par $PKG/usr/bin
|
||||||
|
|
||||||
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF |
|
||||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||||
|
|
||||||
mkdir -p $PKG/usr/man/man1
|
mkdir -p $PKG/usr/man/man1
|
||||||
# avoid tripping up extension sniffers
|
# make the manual reflect a filename change which will be made below
|
||||||
sed 's/par\.doc/par.txt/g' par.1 > $PKG/usr/man/man1/par.1
|
sed 's/par\.doc/par.txt/g' par.1 | gzip -c > $PKG/usr/man/man1/par.1.gz
|
||||||
|
|
||||||
( 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
|
|
||||||
)
|
|
||||||
|
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
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
|
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 releasenotes > $PKG/usr/doc/$PRGNAM-$VERSION/releasenotes
|
||||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# make exactly 11 lines for the formatting to be correct. It's also
|
# make exactly 11 lines for the formatting to be correct. It's also
|
||||||
# customary to leave one space after the ':'.
|
# customary to leave one space after the ':'.
|
||||||
|
|
||||||
|-----handy-ruler------------------------------------------------------|
|
|-----handy-ruler------------------------------------------------------|
|
||||||
par: par (paragraph reformatter)
|
par: par (paragraph reformatter)
|
||||||
par:
|
par:
|
||||||
par: par is a paragraph reformatter, vaguely similar to fmt, but better.
|
par: par is a paragraph reformatter, vaguely similar to fmt, but better.
|
||||||
|
|
Loading…
Reference in a new issue