ap/xmlroff: Updated for Slackware-13.0.

slackware-14.2
Damien Goutte-Gattat 2010-02-21 16:28:02 +01:00
parent bf11083ded
commit f61d5b40c5
1 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2009 Damien Goutte-Gattat
# Copyright (C) 2009,2010 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -31,15 +31,16 @@ ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://xmlroff.org/download/$ARCHIVE}
# Build infos
NAMETGZ=${NAMETGZ:-xmlroff}
BUILD=${BUILD:-1GGD}
NAMEPKG=${NAMEPKG:-xmlroff}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-i486}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
@ -55,12 +56,14 @@ if [ ! -d $TMP ]; then
fi
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
@ -84,15 +87,12 @@ CXXFLAGS=$CPUOPT \
./configure \
--prefix=/usr \
--mandir=/usr/man \
--libdir=/usr/lib$LIBDIRSUFFIX \
--disable-static \
--disable-dependency-tracking \
--enable-man
make -j $JOBS
make install DESTDIR=$PKG
# Strip binaries
find $PKG | xargs file | grep "ELF 32-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
make install-strip DESTDIR=$PKG
# Compress man page
gzip -9 $PKG/usr/man/man1/xmlroff.1
@ -110,7 +110,7 @@ cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"