aboutsummaryrefslogtreecommitdiff
path: root/development/xmlstarlet/xmlstarlet.SlackBuild
diff options
context:
space:
mode:
authorVincent Batts <vbatts at gmail.com>2010-05-13 00:25:47 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:25:47 +0200
commit4c788ad0cc384e593a43642db42b3db7b6c88be4 (patch)
tree390052ad1c6ae89c64cf3d1c5168c783092dc5b8 /development/xmlstarlet/xmlstarlet.SlackBuild
parent5c0a57aa6250fb742921d61633f9a99592da6942 (diff)
development/xmlstarlet: Updated for version 1.0.1
Diffstat (limited to 'development/xmlstarlet/xmlstarlet.SlackBuild')
-rw-r--r--development/xmlstarlet/xmlstarlet.SlackBuild34
1 files changed, 21 insertions, 13 deletions
diff --git a/development/xmlstarlet/xmlstarlet.SlackBuild b/development/xmlstarlet/xmlstarlet.SlackBuild
index 8836b3f63b97..7b43b19b528b 100644
--- a/development/xmlstarlet/xmlstarlet.SlackBuild
+++ b/development/xmlstarlet/xmlstarlet.SlackBuild
@@ -4,9 +4,6 @@
# Written by Vincent Batts, vbatts@gmail.com
-# Exit on most errors
-set -e
-
PRGNAM=xmlstarlet
VERSION=1.0.1
ARCH=${ARCH:-i486}
@@ -20,12 +17,17 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -39,40 +41,46 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fixup build on x86_64
+if [ "$ARCH" = "x86_64" ]; then
+ patch -p1 < $CWD/xmlstarlet-1.0.1-fixup_x86_64.diff
+fi
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/usr/man
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
sed -i 's/pthread/pthread -lgcrypt/' src/Makefile
-# Compile the application and install it into the $PKG directory
make
make install DESTDIR=$PKG
-# Strip binaries and libraries
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
-# Compress man pages
( 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
)
-# Copy program documentation into the package
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog Copyright INSTALL NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING ChangeLog Copyright INSTALL NEWS README TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-# Copy the slack-desc into ./install
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}