mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
926b93d445
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
93 lines
2.1 KiB
Bash
93 lines
2.1 KiB
Bash
#!/bin/sh
|
|
|
|
### sbcl.SlackBuild ###
|
|
|
|
# Slackware build script for sbcl (Steel Bank Common Lisp)
|
|
# written by paul wisehart paul@oldcode.org
|
|
|
|
PRGNAM=sbcl
|
|
VERSION=${VERSION:-1.0.50}
|
|
BUILD=${BUILD:-1}
|
|
TAG=${TAG:-_SBo}
|
|
|
|
#ARCH should
|
|
if [ -z "$ARCH" ]; then
|
|
case "$( uname -m )" in
|
|
i?86) ARCH=i486 ;;
|
|
*) ARCH=$( uname -m ) ;;
|
|
esac
|
|
fi
|
|
|
|
CWD=$(pwd)
|
|
TMP=${TMP:-/tmp/SBo}
|
|
PKG=$TMP/package-$PRGNAM
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
if [ "$ARCH" = "i486" ]; then
|
|
LIBDIRSUFFIX=""
|
|
FNAM=$PRGNAM-$VERSION-x86-linux-binary
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
|
LIBDIRSUFFIX="64"
|
|
FNAM=$PRGNAM-$VERSION-x86-64-linux-binary
|
|
else
|
|
echo "Architecture [$ARCH] not supported."
|
|
exit 1
|
|
fi
|
|
|
|
set -e
|
|
|
|
rm -rf $PKG
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
cd $TMP
|
|
|
|
rm -rf $(basename $FNAM "-binary") #the resulting directory doesnt have the "-binary"
|
|
tar xvf $CWD/$FNAM.tar.bz2
|
|
cd $(basename $FNAM "-binary")
|
|
|
|
chown -R root:root .
|
|
find -L . \
|
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
|
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
|
|
|
mkdir ${PKG}/usr
|
|
INSTALL_ROOT=${PKG}/usr sh install.sh
|
|
|
|
#fixup /usr/lib -> /usr/lib64 if on x86_64:
|
|
if [ "$ARCH" = "x86_64" ]; then
|
|
cd $PKG/usr
|
|
mv lib lib${LIBDIRSUFFIX}
|
|
cd -
|
|
fi
|
|
|
|
cd $PKG/usr/share
|
|
mv man ..
|
|
mv doc ..
|
|
cd -
|
|
|
|
cd $PKG/usr/doc
|
|
mv $PRGNAM $PRGNAM-$VERSION
|
|
rm -rf $PKG/usr/share
|
|
cd -
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
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
|
|
|
|
#get rid of unneeded zero-length files.
|
|
cd $PKG
|
|
find . -name "test-passed" -type f -exec rm -f {} \;
|
|
cd -
|
|
|
|
# scripts in profile.d that set SBCL_HOME
|
|
mkdir -p $PKG/etc/profile.d
|
|
cp $CWD/sbcl.csh $CWD/sbcl.sh $PKG/etc/profile.d
|
|
chmod 0755 $PKG/etc/profile.d/*
|
|
|
|
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.${PKGTYPE:-tgz}
|