summaryrefslogtreecommitdiff
path: root/extra/proftpd
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/proftpd
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/proftpd')
-rw-r--r--extra/proftpd/PKGBUILD49
-rwxr-xr-xextra/proftpd/proftpd41
-rw-r--r--extra/proftpd/proftpd.conf.d4
-rw-r--r--extra/proftpd/proftpd.logrotate5
4 files changed, 99 insertions, 0 deletions
diff --git a/extra/proftpd/PKGBUILD b/extra/proftpd/PKGBUILD
new file mode 100644
index 000000000..075e30b6c
--- /dev/null
+++ b/extra/proftpd/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 117431 2011-04-02 01:06:40Z eric $
+# Contributor: Eric Belanger <eric@archlinux.org>
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=proftpd
+pkgver=1.3.3e
+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=('acc49b6589bc8c9fdf1dce9000bebdbd'
+ '99f6f9a989e70e3fa50809fc2bbbbb0a'
+ 'ddb09eb13131becdf0e081eef413116b'
+ '71d5932b0461c318ed68c2c0c2660736')
+sha1sums=('b347aa72d12e41fe8f43e8d91a7a4eeaac6f472f'
+ 'b7819d725817e55b69c73e2572c21a05db48cc86'
+ '83c38ec40efb7cc09d9824b98e65cd948a195cc6'
+ 'f34f60cb4fb1f4af7be7aca427cbad3cad22bbb9')
+
+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"
+}
diff --git a/extra/proftpd/proftpd b/extra/proftpd/proftpd
new file mode 100755
index 000000000..357a7663d
--- /dev/null
+++ b/extra/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/extra/proftpd/proftpd.conf.d b/extra/proftpd/proftpd.conf.d
new file mode 100644
index 000000000..1a5a8a201
--- /dev/null
+++ b/extra/proftpd/proftpd.conf.d
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to proftpd
+#
+PROFTPD_ARGS=""
diff --git a/extra/proftpd/proftpd.logrotate b/extra/proftpd/proftpd.logrotate
new file mode 100644
index 000000000..7b6d7a87b
--- /dev/null
+++ b/extra/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
+}