#!/bin/sh # All comments and suggestions to Alak Trakru # CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-pwlib VERSION=1.5.0 ARCH=i386 BUILD=1 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG cd $TMP tar xzvf $CWD/pwlib-$VERSION.tar.gz cd pwlib-$VERSION # CFLAGS="-O2 -march=i386 -mcpu=i686" ./configure --prefix=/usr \ i386-slackware-linux make sed -i "s#PREFIX=/usr/#PREFIX=$PKG/usr#" Makefile mkdir -p $PKG/usr/{bin,lib,include,share/pwlib} make install #chmod 755 $PKG/usr/include/ptclib $PKG/usr/include/ptclib/CVS \ # $PKG/usr/include/ptlib $PKG/usr/include/ptlib/CVS \ # $PKG/usr/include/ptlib/unix $PKG/usr/include/ptlib/unix/CVS \ # $PKG/usr/include/ptlib/unix/ptlib \ # $PKG/usr/include/ptlib/unix/ptlib/CVS \ # $PKG/usr/share/pwlib/make $PKG/usr/share/pwlib/make/CVS #find $PKG -type d -name "CVS" |xargs rm -rf #find $PKG -type f -name "*.h" |xargs chmod 644 #chmod 644 $PKG/usr/share/pwlib/make/* (cd $PKG/usr/lib; rm -f libpt.so ) (cd $PKG/usr/lib; ln -s libpt_linux_x86_r.so.1.5.0 libpt.so ) mkdir -p $PKG/usr/doc/pwlib-$VERSION cp -a History.txt ReadMe.txt \ $PKG/usr/doc/pwlib-$VERSION chmod 644 $PKG/usr/doc/pwlib-$VERSION/* chown root.root $PKG/usr/doc/pwlib-$VERSION/* find $PKG -type f | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded gzip -9 $PKG/usr/man/*/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/pwlib-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/pwlib-$VERSION rm -rf $PKG fi