#!/bin/bash
## Variables
APP=ntfsprogs #this is the program you will be building
CWD=$(pwd) #this is the starting directory
VER=2.0.0 #this is the version of the program
BUILD=1vl59 #this is the build number with vl version your building it for
ARCH=i586 #this is the cpu architecture
TMP=/tmp #this is the dir we will build in
## work starts here
cd $TMP #change dir to $TMP
tar xvf $CWD/$APP-$VER.tar.bz2 #extract the source
cd $APP-$VER && ./configure --prefix=/usr --sysconfdir=/etc #change to source dir and run configure
cp $CWD/description-pak . #copy the description-pac file from the starting dir
make && checkinstall -L -A $ARCH --pkgrelease=$BUILD --strip=yes \ #compile the package and run checkinstall
--stripso=yes --addso=yes --gzman=yes --fstrans=no -y #the rest of the checkinstall arguments
## finished lets move the pkg back to the original dir
mv $APP-$VER-$ARCH-$BUILD.tlz $CWD