#!/bin/sh CWD=`pwd` PKG=/tmp/package-libcaca VERSION=0.9 ARCH=${ARCH:-sparc} BUILD=2 rm -rf $PKG mkdir -p $PKG cd /tmp rm -rf libcaca-$VERSION tar xjvf $CWD/libcaca-$VERSION.tar.bz2 cd libcaca-$VERSION chown -R root.root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; # Greg's note: ./configure is not apparently # building the Makefile correctly, and the # doc dir doesn't get installed correctly # during make install. I suppose it doesn't # matter in this case how the package gets # built as long as it is correct at the end. CFLAGS="-O2 -m32 -mcpu=v8 -mtune=v9" \ ./configure \ --prefix=/usr \ --disable-imlib2 \ --enable-slang \ --enable-ncurses \ --enable-x11 make # begin botch fix # put files where borken Makefile wants them. mkdir doc/man/man3 cp doc/man/man3caca/*.3caca doc/man/man3 # end botch fix make install DESTDIR=$PKG chown -R root.bin $PKG/usr/bin ( 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 find . -type f -name "*.a" | xargs file | grep archive | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) gzip -9 $PKG/usr/man/man?/*.? ( cd $PKG/usr/man/man1 rm *.? ln -sf cacademo.1.gz cacaball.1.gz ln -sf cacademo.1.gz cacafire.1.gz ln -sf cacademo.1.gz cacamoir.1.gz ln -sf cacademo.1.gz cacaplas.1.gz ) # Docs are in many formats... let's keep one. rm -r $PKG/usr/man/man3 $PKG/usr/share/doc/libcaca-dev/ps mv $PKG/usr/share/doc $PKG/usr/doc mv $PKG/usr/doc/libcaca-dev $PKG/usr/doc/libcaca-$VERSION cp -a COPYING $PKG/usr/doc/libcaca-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n ../libcaca-$VERSION-$ARCH-$BUILD.tgz