CWD=`pwd`
PKG=/tmp/package-pkgconfig
rm -rf $PKG
mkdir -p $PKG/usr

VERSION=0.15.0
ARCH=i486
BUILD=1

cd /tmp
rm -r pkgconfig-$VERSION
tar xjvf $CWD/pkgconfig-$VERSION.tar.bz2
cd pkgconfig-$VERSION
chown -R root.root .
find . -perm 664 -exec chmod 644 {} \;
CFLAGS="-O2 -march=i486 -mcpu=i686" \
./configure --prefix=/usr
make
make install DESTDIR=$PKG
strip --strip-unneeded $PKG/usr/bin/*
chown -R root.bin $PKG/usr/bin
gzip -9 $PKG/usr/man/man1/pkg-config.1
mkdir -p $PKG/usr/doc/pkgconfig-$VERSION
cp -a \
  AUTHORS COPYING ChangeLog NEWS README \
  $PKG/usr/doc/pkgconfig-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd /tmp/package-pkgconfig
makepkg -l y -c n ../pkgconfig-$VERSION-$ARCH-$BUILD.tgz