# Contributor: Douglas Haber <me@douglashaber.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pure-ftpd
pkgver=1.0.47
pkgrel=0
pkgdesc="Pure FTPD FTP daemon"
url="http://pureftpd.org"
arch="all"
license="BSD"
depends_dev=libressl-dev
makedepends="$depends_dev"
subpackages="$pkgname-doc"
source="http://download.pureftpd.org/pub/pure-ftpd/releases/$pkgname-$pkgver.tar.gz
	pure-ftpd.initd
	pure-ftpd.confd
	"
builddir="$srcdir/$pkgname-$pkgver"
build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--without-unicode \
		--with-minimal \
		--with-throttling  \
		--with-puredb \
		--with-tls
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -Dm755 ../$pkgname.initd \
		"$pkgdir/etc/init.d/$pkgname"

	install -Dm644 ../$pkgname.confd \
		"$pkgdir/etc/conf.d/$pkgname"
}

sha512sums="ed2b08334e72c171706287fba28686a8c41dde91a38d135d4e80afb307e9891ab7d74c571d2035c07d214dba0ee73926a8d23a6fbabd4c9dc208c8a6bf5160a5  pure-ftpd-1.0.47.tar.gz
fde2e979410779cc0044e1190b88fe2f0956166b68e2d7fb94520bc0803a3ec85814f66e09a7fdae4ebead872c9a48d973cf7ef3d2818f2298b22ac629cfcf25  pure-ftpd.initd
a5cc8e59178a5d0f7b5909d09009ef6ace1f8e6874bd733e21bc30f4899447e70b020a0369077132751ceb28afa971588efedcce3dea83e9b043b1545caf3393  pure-ftpd.confd"
