# $Id$ PNAME="proftpd" PVER="1.3.3" PBUILD="r1" PCATEGORIE="net-ftp" STATE="unstable" DESCRIPTION="Highly configurable GPL-licensed FTP server software." HOMEPAGE="http://proftpd.org/" DEPEND=">= sys-libs/ncurses-5.7 >= sys-libs/pam-1.1 >= dev-libs/openssl-0.9.8k >= sys-apps/tcp-wrappers-7.6" SDEPEND=">= sys-dev/gettext-0.17" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" MODULES_CVS_REV=1.3 sminclude mbuild mtools SRC_URI=( ftp://ftp.proftpd.org/distrib/source/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-1.3.1-config.patch mirror://${PNAME}/${PNAME}-1.3.0a-cracklib.patch mirror://${PNAME}/${PNAME}-1.3.1-find-umode_t.patch mirror://${PNAME}/ftpusers mirror://${PNAME}/modules.conf-${MODULES_CVS_REV} mirror://${PNAME}/proftpd.rc mirror://${PNAME}/proftpd.pam mirror://${PNAME}/proftpd.logrotate ) UP2DATE="updatecmd -listonly ftp://ftp.proftpd.org/distrib/source/ | grep -v 'rc[0-9]' | lasttarball" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # adjust configs to match magellan mpatch ${PNAME}-1.3.1-config.patch || die # fix cracklib location in ftpasswd mpatch ${PNAME}-1.3.0a-cracklib.patch || die # fix compile issues with umode_t mpatch ${PNAME}-1.3.1-find-umode_t.patch || die } src_compile() { cd ${SRCDIR} # ToDO: sql, mysql, postgres, ldap # the modules.conf must be fixed to # LoadModule mod_sql.c # LoadModule mod_ldap.c # LoadModule mod_sql_mysql.c # LoadModule mod_sql_postgres.c # LoadModule mod_quotatab_ldap.c # LoadModule mod_quotatab_sql.c # new: mod_ban, mod_lang, mod_quotatab_radius, mod_wrap2, mod_wrap2_file, mod_wrap2_sql local dso_modules="mod_ratio:mod_radius:mod_rewrite:mod_tls:mod_wrap:mod_quotatab" dso_modules="${dso_modules}:mod_quotatab_file:mod_site_misc:mod_ctrls_admin" # the new ones dso_modules="${dso_modules}:mod_ban:mod_wrap2:mod_wrap2_file" # must be the last one, see: http://www16.de.proftpd.org/docs/contrib/mod_ifsession.html#Installation dso_modules="${dso_modules}:mod_ifsession" local modules="mod_auth_pam:mod_readme" mconfigure \ --sysconfdir=/etc/proftpd \ --localstatedir=/var/run \ --libexecdir=/usr/$(mlibdir)/proftpd \ --enable-auth-unix \ --enable-nls \ --enable-ncurses \ --enable-shadow \ --enable-autoshadow \ --enable-sendfile \ --enable-ctrls \ --enable-dso \ --enable-ipv6 \ --with-modules=${modules} \ --with-shared=${dso_modules} \ || die mmake -j1 || die } src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || die # install ftpuser blacklist minstalletc ftpusers || die # install modules.conf minstallfile -s modules.conf-${MODULES_CVS_REV} /etc/proftpd/modules.conf || die sed -i "s:@@modulepath@@:/usr/$(mlibdir)/proftpd:g" \ ${BINDIR}/etc/proftpd/modules.conf || die # install pam config minstallpam proftpd.pam proftpd || die # install initscript minstallrc proftpd.rc proftpd || die # install logrotate config minstalllog proftpd.logrotate proftpd || die mkeepdir /var/run/proftpd || die mkeepdir /var/log/proftpd || die minstalldocs ChangeLog COPYING CREDITS NEWS README* RELEASE_NOTES || die minstalldocs doc/license.txt sample-configurations/*.conf || die } preinstall() { # adding proftpd user ${MLIBDIR}/mgroupadd -o "-g 82" proftpd ${MLIBDIR}/museradd -o "-u 82 -g proftpd -d /dev/null -s /bin/false" proftpd } postinstall() { mstartservice proftpd } postremove() { mstopservice proftpd }