PKGBUILD 1.79 KB
Newer Older
1 2
# Contributions from AUR: https://aur.archlinux.org/packages/proftpd/

abveritas's avatar
abveritas committed
3
pkgname=proftpd
4 5
pkgver=1.3.5.b
_pkgver=1.3.5b
Jeff Huang's avatar
Jeff Huang committed
6
pkgrel=1
abveritas's avatar
abveritas committed
7
pkgdesc="A high-performance, scalable FTP server"
8
arch=('x86_64')
abveritas's avatar
abveritas committed
9 10
url="http://www.proftpd.org"
license=('GPL')
11
depends=('libldap' 'libmariadbclient' 'postgresql-libs')
abveritas's avatar
abveritas committed
12
backup=('etc/proftpd.conf' 'etc/conf.d/proftpd')
13
categories=('network')
14 15 16
install=proftpd.install
source=("ftp://ftp.proftpd.org/distrib/source/${pkgname}-${_pkgver}.tar.gz"
	'proftpd.service'
abveritas's avatar
abveritas committed
17
        'proftpd.logrotate'
18
	'proftpd.tmpfiles')
19
md5sums=('f7b8e3a383b34a894c2502db74ccccde'
20 21 22
         '2bf74515d84036cb0acd60406fcd25b0'
         'ddb09eb13131becdf0e081eef413116b'
         '907b149a120b046f05647c73502e23c9')
abveritas's avatar
abveritas committed
23
build() {
24
	cd ${srcdir}/${pkgname}-${_pkgver}
abveritas's avatar
abveritas committed
25

26 27 28 29
	./configure --prefix=/usr \
	    --mandir=/usr/share/man \
	    --libexecdir=/usr/lib \
	    --disable-pam \
abveritas's avatar
abveritas committed
30
	    --with-modules=mod_quotatab:mod_quotatab_file:mod_tls:mod_ldap:mod_sql:mod_sql_mysql:mod_sql_postgres \
31 32 33 34
	    --sysconfdir=/etc \
	    --localstatedir=/run/proftpd \
	    --enable-ctrls \
	    --enable-ipv6 \
abveritas's avatar
abveritas committed
35
	    --with-includes=/usr/include/mysql:/usr/include/postgresql \
36 37 38
	    --with-libraries=/usr/lib/mysql:/usr/lib/postgresql \
	    --enable-nls \
	    --with-systemd
abveritas's avatar
abveritas committed
39 40 41 42
	make
}

package() {
43 44 45 46 47 48 49 50 51 52 53 54
  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 -Dm755 contrib/xferstats.holger-preiss "${pkgdir}/usr/bin/ftpstats"

  install -d "${pkgdir}/usr/lib/systemd/system/"
  install -m644 "${srcdir}"/proftpd.service "${pkgdir}/usr/lib/systemd/system/"
  install -Dm644 "${srcdir}"/proftpd.tmpfiles \
    "${pkgdir}"/usr/lib/tmpfiles.d/proftpd.conf
abveritas's avatar
abveritas committed
55

56 57
  # /run is tmpfs
  rmdir "${pkgdir}"/run/{proftpd,}
Fabian's avatar
Fabian committed
58
}