#!/bin/sh CWD=`pwd` TMP=${TMP:-/tmp} PKG=$TMP/package-vsftpd VERSION=2.0.5 ARCH=${ARCH:-x86_64} BUILD=1 if [ ! -d $TMP ]; then mkdir -p $TMP fi rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf vsftpd-$VERSION tar xzvf $CWD/vsftpd-$VERSION.tar.gz cd vsftpd-$VERSION find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; chown -R root:root . zcat $CWD/vsftpd.builddefs.diff.gz | patch -p1 --verbose || exit 1 zcat $CWD/vsftpd.conf.diff.gz | patch -p1 --verbose || exit 1 make -j3 || exit 1 mkdir -p $PKG/usr/sbin cp vsftpd $PKG/usr/sbin chmod 755 $PKG/usr/sbin/vsftpd strip --strip-unneeded $PKG/usr/sbin/vsftpd mkdir -p $PKG/usr/man/man{5,8} cat vsftpd.conf.5 | gzip -9c > $PKG/usr/man/man5/vsftpd.conf.5.gz cat vsftpd.8 | gzip -9c > $PKG/usr/man/man8/vsftpd.8.gz mkdir -p $PKG/etc cat vsftpd.conf > $PKG/etc/vsftpd.conf.new mkdir -p $PKG/etc/logrotate.d zcat $CWD/vsftpd.log.gz > $PKG/etc/logrotate.d/vsftpd.new mkdir -p $PKG/usr/share/empty mkdir -p $PKG/home/ftp mkdir -p $PKG/usr/doc/vsftpd-$VERSION cp -a \ AUDIT BENCHMARKS BUGS COPYING COPYRIGHT Changelog EXAMPLE FAQ \ INSTALL LICENSE README* REFS REWARD SECURITY SIZE SPEED TODO TUNING \ $PKG/usr/doc/vsftpd-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cd $PKG makepkg -l y -c n $TMP/vsftpd-$VERSION-$ARCH-$BUILD.tgz