summaryrefslogtreecommitdiff
path: root/testing/proftpd
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-03-17 00:01:22 +0000
committerroot <root@rshg054.dnsready.net>2012-03-17 00:01:22 +0000
commit9a940818cc3edb82afac4d73a6474e6e3374f987 (patch)
tree366a072a72c59b42c096cc7dbbed5dbcb6a8925e /testing/proftpd
parent636ce8849a9c82c1787c2919ffcfe6685cb799d3 (diff)
Sat Mar 17 00:01:22 UTC 2012
Diffstat (limited to 'testing/proftpd')
-rw-r--r--testing/proftpd/PKGBUILD51
-rwxr-xr-xtesting/proftpd/proftpd41
-rw-r--r--testing/proftpd/proftpd.conf.d4
-rw-r--r--testing/proftpd/proftpd.logrotate5
4 files changed, 101 insertions, 0 deletions
diff --git a/testing/proftpd/PKGBUILD b/testing/proftpd/PKGBUILD
new file mode 100644
index 000000000..6dfb27d2c
--- /dev/null
+++ b/testing/proftpd/PKGBUILD
@@ -0,0 +1,51 @@
+# $Id: PKGBUILD 153556 2012-03-16 00:18:26Z eric $
+# Maintainer:
+# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=proftpd
+pkgver=1.3.4a
+pkgrel=4
+epoch=1
+pkgdesc="A high-performance, scalable FTP server"
+arch=('i686' 'x86_64')
+url="http://www.proftpd.org"
+license=('GPL')
+depends=('libldap' 'libmysqlclient' 'postgresql-libs')
+backup=('etc/proftpd.conf' 'etc/conf.d/proftpd')
+source=(ftp://ftp.proftpd.org/distrib/source/${pkgname}-${pkgver}.tar.bz2{,.asc}
+ 'proftpd' 'proftpd.logrotate' 'proftpd.conf.d')
+sha1sums=('18ea33d8b9f858b6e735cc81af900f0eebee8d25'
+ '195b06e28e503f5e5ef355c3332884cc5e7954a9'
+ 'b7819d725817e55b69c73e2572c21a05db48cc86'
+ '83c38ec40efb7cc09d9824b98e65cd948a195cc6'
+ 'f34f60cb4fb1f4af7be7aca427cbad3cad22bbb9')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr \
+ --libexecdir=/usr/lib \
+ --disable-pam \
+ --with-modules=mod_quotatab:mod_quotatab_sql: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
+ sed -i 's|nogroup|nobody|g' "${pkgdir}/etc/proftpd.conf"
+
+ 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"
+}
diff --git a/testing/proftpd/proftpd b/testing/proftpd/proftpd
new file mode 100755
index 000000000..357a7663d
--- /dev/null
+++ b/testing/proftpd/proftpd
@@ -0,0 +1,41 @@
+#!/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/testing/proftpd/proftpd.conf.d b/testing/proftpd/proftpd.conf.d
new file mode 100644
index 000000000..1a5a8a201
--- /dev/null
+++ b/testing/proftpd/proftpd.conf.d
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to proftpd
+#
+PROFTPD_ARGS=""
diff --git a/testing/proftpd/proftpd.logrotate b/testing/proftpd/proftpd.logrotate
new file mode 100644
index 000000000..7b6d7a87b
--- /dev/null
+++ b/testing/proftpd/proftpd.logrotate
@@ -0,0 +1,5 @@
+/var/log/xferlog {
+ postrotate
+ /bin/kill -HUP `cat /var/run/proftpd.pid 2>/dev/null` 2>/dev/null || true
+ endscript
+}