development/Xdialog: Miscellaneous cleanups

Remove unneeded comments and configure flags. Move variable block to a
location consistent with my other scripts and tweak some other ordering.
Use 'install-strip'. Fix old-style man page handling.

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
slakmagik 2011-01-28 23:04:57 -05:00 committed by Robby Workman
parent 2d67f48cd3
commit 0c9b8ca39d

View file

@ -9,12 +9,10 @@ VERSION=${VERSION:-2.3.1}
BUILD=${BUILD:-2}
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
@ -24,16 +22,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
NLS=${NLS:-disable}
# I do this so the script has a consistent interface, using 'enable' for both
# - and because passing '--without-gtk2' makes it compile for gtk2 as much as
# '--with; does(!) so you have to pass it nothing if you want gtk1.
if [ "$GTK2" = "enable" ]; then
GTK2=--with-gtk2
else
unset GTK2
fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@ -48,6 +36,16 @@ else
LIBDIRSUFFIX=""
fi
NLS=${NLS:-disable}
# I do this so the script has a consistent interface, using 'enable' for both
# - and because passing '--without-gtk2' makes it compile for gtk2 as much as
# '--with; does(!) so you have to pass it nothing if you want gtk1.
if [ "$GTK2" = enable ]; then
GTK2=--with-gtk2
else
unset GTK2
fi
set -e
rm -rf $PKG
@ -69,25 +67,18 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--datadir=/usr \
--mandir=/usr/man \
--datadir=/usr \
--$NLS-nls \
--build=$ARCH-slackware-linux \
$GTK2
make
make DESTDIR=$PKG install
make DESTDIR=$PKG install-strip
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/usr/man -type f -exec gzip -9 {} \;
( 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
)
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cp -a [ABCINR]* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc