summaryrefslogtreecommitdiffstats
path: root/libraries/cln/cln.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/cln/cln.SlackBuild')
-rw-r--r--libraries/cln/cln.SlackBuild52
1 files changed, 30 insertions, 22 deletions
diff --git a/libraries/cln/cln.SlackBuild b/libraries/cln/cln.SlackBuild
index 88382236d0..2cf18d2fc0 100644
--- a/libraries/cln/cln.SlackBuild
+++ b/libraries/cln/cln.SlackBuild
@@ -1,9 +1,8 @@
#!/bin/sh
# Slackware build script for cln
-# Written by Andrew Psaltis (ampsaltis@gmail.com)
-# Copyright 2007 Andrew Psaltis, Vienna, VA, USA
+# Copyright 2007,2009 Andrew Psaltis <ampsaltis@gmail.com>
# All rights reserved.
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
@@ -22,25 +21,24 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-set -e
-
-DOCS="COPYING INSTALL* NEWS README TODO"
-
PRGNAM=cln
-VERSION=1.1.13
+VERSION=1.2.2
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+set -e
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
-elif [ "$ARCH" = "x86_64" ]; then # For BlueWhite64
+elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi
@@ -48,7 +46,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xfvj $CWD/$PRGNAM-$VERSION.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -63,33 +61,43 @@ CXXFLAGS="$SLKCFLAGS" \
--infodir=/usr/info \
--enable-shared \
--disable-static \
- --with-gnu-ld
+ --with-gnu-ld \
+ --build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-)
-
-( 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
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
rm -f $PKG/usr/info/dir
-gzip -9 $PKG/usr/info/*.info*
+gzip -9 $PKG/usr/info/*
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
-mv $PKG/usr/share/html $PKG/usr/doc/$PRGNAM-$VERSION
+# Remove empty man dir
+rm -rf $PKG/usr/man
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples
+cp -a \
+ COPYING INSTALL* NEWS README TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ examples/*.cc examples/*.1 \
+ $PKG/usr/doc/$PRGNAM-$VERSION/examples
+# Move docs that ignore --docdir to their proper place
+mv $PKG/usr/share/html $PKG/usr/share/dvi/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# Everything that was in $PKG/usr/share has been moved to
+# $PKG/usr/doc/cln-$VERSION (or is empty at time of compression)
+rm -rf $PKG/usr/share/
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
-# Make the package
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz