diff --git a/proftpd/PKGBUILD b/proftpd/PKGBUILD new file mode 100644 index 000000000..8261b6bb4 --- /dev/null +++ b/proftpd/PKGBUILD @@ -0,0 +1,51 @@ +# +# Apps Packages for Chakra, part of chakra-project.org +# +# maintainer (i686): Phil Miller +# maintainer (x86_64): Manuel Tortosa + +# include global config + +pkgname=proftpd +pkgver=1.3.3d +pkgrel=1 +pkgdesc="A high-performance, scalable FTP server" +arch=('i686' 'x86_64') +url="http://www.proftpd.org" +license=('GPL') +depends=('glibc' 'pam' 'ncurses' 'libcap' 'libldap' + 'libmysqlclient' 'postgresql-libs') +backup=('etc/proftpd.conf' 'etc/conf.d/proftpd') +source=(ftp://ftp.proftpd.org/distrib/source/${pkgname}-${pkgver}.tar.bz2 + 'proftpd' + 'proftpd.logrotate' + 'proftpd.conf.d') +md5sums=('69650e91e05b3a10fa3ac54ee261679b' + '03434e92fbf9250275bfb510a68f66bc' + '2022dae1483868569299396777d3694a' + '2a1a9bab12655bd8694ac49d48c6f0e4') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + ./configure --prefix=/usr --mandir=/usr/share/man --disable-pam \ + --with-modules=mod_quotatab:mod_quotatab_file:mod_tls:mod_ldap:mod_sql:mod_sql_mysql:mod_sql_postgres \ + --sysconfdir=/etc --localstatedir=/var/run --enable-ctrls --enable-ipv6 \ + --with-includes=/usr/include/mysql:/usr/include/postgresql \ + --with-libraries=/usr/lib/mysql:/usr/lib/postgresql --enable-nls + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + + make DESTDIR=${pkgdir} install + install -Dm644 ../proftpd.logrotate ${pkgdir}/etc/logrotate.d/proftpd + install -Dm644 ../proftpd.conf.d ${pkgdir}/etc/conf.d/proftpd + install -Dm755 ../proftpd ${pkgdir}/etc/rc.d/proftpd + install -Dm755 contrib/xferstats.holger-preiss \ + ${pkgdir}/usr/bin/ftpstats + cd ${pkgdir}/etc + sed -i 's|nogroup|nobody|g' proftpd.conf + rmdir ${pkgdir}/usr/libexec +} \ No newline at end of file diff --git a/proftpd/proftpd b/proftpd/proftpd new file mode 100644 index 000000000..e18113f06 --- /dev/null +++ b/proftpd/proftpd @@ -0,0 +1,40 @@ +#!/bin/bash + +# source application-specific settings +PROFTPD_ARGS= +[ -f /etc/conf.d/proftpd ] && . /etc/conf.d/proftpd + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting ProFTPd Server" + /usr/sbin/proftpd ${PROFTPD_ARGS} + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon proftpd + stat_done + fi + ;; + stop) + stat_busy "Stopping ProFTPd Server" + [ -f /var/run/proftpd.pid ] && kill $(cat /var/run/proftpd.pid) &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm -f /var/run/proftpd.pid + rm_daemon proftpd + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/proftpd/proftpd.conf.d b/proftpd/proftpd.conf.d new file mode 100644 index 000000000..3ebeaeaba --- /dev/null +++ b/proftpd/proftpd.conf.d @@ -0,0 +1,4 @@ +# +# Parameters to be passed to proftpd +# +PROFTPD_ARGS="" \ No newline at end of file