libraries/slib: Miscellaneous build and runtime fixes

Thanks to Richard_Cranium on LQ for help with this.

http://www.linuxquestions.org/questions/slackware-14/gnucash-guile-slib-dont-get-along-848185/

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Robby Workman 2010-12-08 12:49:55 -06:00
parent c001394930
commit d9786ad891
3 changed files with 11 additions and 23 deletions

1
libraries/slib/doinst.sh Normal file
View file

@ -0,0 +1 @@
chroot . /usr/bin/guile -q -s /usr/doc/@PRGNAM@-@VERSION@/guile-slibcat.script

View file

@ -0,0 +1,3 @@
(use-modules (ice-9 slib))
(require 'new-catalog)
(quit)

View file

@ -24,15 +24,13 @@
PRGNAM=slib
VERSION=3b2
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
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
@ -79,10 +77,8 @@ make libdir=/usr/lib${LIBDIRSUFFIX}/ install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
( 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 $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
# The Makefile is braindead
sed -i "s%$PKG%%g" $PKG/usr/bin/slib
@ -102,23 +98,11 @@ cp -a \
ANNOUNCE FAQ COPYING ChangeLog README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Guile script to be run on installation, to build slibcat
cat >> $PKG/usr/doc/$PRGNAM-$VERSION/guile-slibcat.script << EOF
(use-modules (ice-9 slib))
(require 'new-catalog)
(quit)
EOF
cat $CWD/guile-slibcat.script > $PKG/usr/doc/$PRGNAM-$VERSION/guile-slibcat.script
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat >> $PKG/install/doinst.sh <<EOF
#!/bin/sh
guile -q -s /usr/doc/$PRGNAM-$VERSION/guile-slibcat.script
EOF
sed -e s/@PRGNAM@/$PRGNAM/ -e s/@VERSION@/$VERSION/ $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}