#!/bin/sh CWD=`pwd` TMP=/tmp PKG1=$TMP/package-libwmf PKG2=$TMP/package-libwmf-docs VERSION=0.2.8.3 ARCH=alpha BUILD=2 TARGET=$ARCH-alphaslack-linux rm -rf $PKG1 $PKG2 mkdir -p $PKG1 $PKG2 ( cd $TMP rm -rf libwmf-$VERSION tar xzf $CWD/libwmf-$VERSION.tar.gz cd libwmf-$VERSION chown -R root.root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; ./configure \ --prefix=/usr \ --enable-static=no \ $TARGET make make install DESTDIR=$PKG1 chown -R root.bin $PKG1/usr/bin ( cd $PKG1 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 ) mkdir -p $PKG2/usr/doc mv $PKG1/usr/share/doc/libwmf $PKG2/usr/doc/libwmf-$VERSION rmdir $PKG1/usr/share/doc cp -a AUTHORS BUILDING COPYING CREDITS NEWS README TODO \ $PKG1/usr/doc/libwmf-$VERSION mkdir -p $PKG1/install cat $CWD/slack-desc > $PKG1/install/slack-desc mkdir -p $PKG2/install cat $CWD/slack-desc-docs > $PKG2/install/slack-desc cd $PKG1 makepkg -l y -c n $TMP/libwmf-$VERSION-$ARCH-$BUILD.tgz cd $PKG2 makepkg -l y -c n $TMP/libwmf-docs-$VERSION-noarch-$BUILD.tgz ) 2>&1 | tee $TMP/libwmf.build.log