#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-clisp VERSION=2.41a DIRNAME=2.41 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG # place for the package to be built #================================================================= # First we need this. It used to ship with CLISP, but no longer does. cd $TMP rm -rf libsigsegv-2.4 tar xjvf $CWD/libsigsegv-2.4.tar.bz2 || exit 1 cd libsigsegv-2.4 chown -R root:root . # Nah. # --enable-shared=yes CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --enable-static=yes make -j4 || exit 1 # Now I must install this. Sorry, it's gotta happen. make install # Now add to the package: mkdir -p $PKG/usr make install prefix=$PKG/usr strip --strip-unneeded $PKG/usr/lib/*.so strip -g $PKG/usr/lib/*.a mkdir -p $PKG/usr/doc/clisp-$VERSION/libsigsegv-2.4 cp -a \ AUTHORS COPYING ChangeLog NEWS PORTING README \ $PKG/usr/doc/clisp-$VERSION/libsigsegv-2.4 #================================================================= # OK, now we compile CLISP: cd $TMP rm -rf clisp-$VERSION tar xjvf $CWD/clisp-$VERSION.tar.bz2 || exit 1 cd clisp-$DIRNAME || exit 1 chown -R root:root . ./configure \ --prefix=/usr \ --with-module=clx/new-clx \ --with-module=pcre \ --with-module=rawsock \ --with-module=wildcard \ --with-module=zlib \ with-gcc-wall cd with-gcc-wall ./makemake \ --with-dynamic-ffi \ --prefix=/usr \ --with-module=clx/new-clx \ --with-module=pcre \ --with-module=rawsock \ --with-module=wildcard \ --with-module=zlib \ --srcdir=../src \ > Makefile make config.lisp make init make allc make -j4 lisp.run make interpreted.mem make halfcompiled.mem make lispinit.mem make manual make modular # make check || exit 1 make install DESTDIR=$PKG # Strip stuff: ( 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 ) mv $PKG/usr/share/doc/clisp/* $PKG/usr/doc/clisp-$VERSION rm -r $PKG/usr/share/doc mv $PKG/usr/share/man $PKG/usr/man gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/clisp-$VERSION-$ARCH-$BUILD.tgz