# pure-ftpd, http://pureftpd.sourceforge.net

name=pure-ftpd
version=1.0.12
source=($name-$version.tar.bz2)

build() {
    cd $name-$version
    ./configure --prefix=/usr --without-welcomemsg --with-largefile \
    --with-ftpwho --with-quotas --with-throttling --with-pam \
    --without-standalone --with-inetd --without-banner --with-puredb \
    --with-ratios --with-uploadscript
    make
    make DESTDIR=$PKG install
    mkdir -p $PKG/etc/pam.d
    cp pam/pure-ftpd $PKG/etc/pam.d
    cp pam/ftplockout $PKG/etc
    chown root.root $PKG/etc/pam.d -R
    chown root.root $PKG/etc/ftplockout
    strip $PKG/usr/bin/*
    strip $PKG/usr/sbin/*
    ( cd $PKG/usr/sbin ; ln -sf pure-ftpwho ftpwho )
    gzip -9 $PKG/usr/man/man?/*
    ( cd $PKG/usr/man/man8 ; ln -sf pure-ftpwho.8.gz ftpwho.8.gz )
}
