#!/bin/sh # Set initial variables: PKGNAM=proftpd VERSION=1.3.0a DIRVER=1.3.0a BUILD=2 . /etc/pkghelpers pkghelpers_env rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf proftpd-$VERSION tar xjvf $CWD/proftpd-$VERSION.tar.bz2 cd proftpd-$DIRVER # Official patch for CVE-2006-6170 from TJ Saunders: # http://bugs.proftpd.org/show_bug.cgi?id=2860 zcat $CWD/proftpd-CVE-2006-6170.diff.gz | patch -p0 --verbose || exit 1 chown -R root.root . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --enable-autoshadow \ --enable-ctrls \ --enable-ipv6 \ --localstatedir=/var/run \ --with-modules=mod_readme:mod_ratio:mod_tls:mod_wrap:mod_ctrls_admin \ $ARCH-$DISTRO-linux # This caused funny messages about "Quotas off" with every FTP command, # and mod_wrap gets a compile error: # --with-modules= ... mod_quota ... make || exit 1 make install DESTDIR=$PKG rm -f $PKG/etc/* cat $CWD/etc/proftpd.conf > $PKG/etc/proftpd.conf.new cat $CWD/etc/ftpusers > $PKG/etc/ftpusers.new mkdir -p $PKG/home/ftp gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/usr/doc/proftpd-$VERSION cp -a COPYING CREDITS ChangeLog INSTALL NEWS README* \ contrib/README.mod_wrap contrib/README.ratio \ $PKG/usr/doc/proftpd-$VERSION cp -a contrib/README $PKG/usr/doc/proftpd-$VERSION/README.contrib cp -a doc sample-configurations $PKG/usr/doc/proftpd-$VERSION mkdir -p $PKG/install zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG pkghelpers_fixup pkghelpers_makepkg