Subject: [alpine-devel] testing/pureftpd: new aport

From: Douglas Haber <[email-masked]>
Date: Tue, 29 Mar 2011 23:00:17 +0000

testing/pureftpd: new aport

My first attempt at building a package

--
Sent using Email 3.1.3
http://www.cleancode.org/projects/email

Sent on: Tue, 29 Mar 2011 23:00:17 +0000
On System: Linux 2.6.37.3-grsec i686

From 884a9e84e5ae9e749d9bee56aed92a90b89f95bd Mon Sep 17 00:00:00 2001
From: Douglas Haber <[email-masked]>
Date: Tue, 29 Mar 2011 22:42:58 +0000
Subject: [PATCH] testing/pureftpd: new aport

---
 testing/pureftpd/APKBUILD        |   44 ++++++++++++++++++++++++++++++++++++++
 testing/pureftpd/pure-ftpd.initd |   28 ++++++++++++++++++++++++
 2 files changed, 72 insertions(+), 0 deletions(-)
 create mode 100644 testing/pureftpd/APKBUILD
 create mode 100644 testing/pureftpd/pure-ftpd.initd

diff --git a/testing/pureftpd/APKBUILD b/testing/pureftpd/APKBUILD
new file mode 100644
index 0000000..6dcce82
--- /dev/null
+++ b/testing/pureftpd/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Douglas Haber <[email-masked]>
+# Maintainer:
+pkgname=pure-ftpd
+pkgver=1.0.30
+pkgrel=0
+pkgdesc="Pure FTPD FTP daemon"
+url="http://pureftpd.org"
+arch="all"
+license="GPL"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://download.pureftpd.org/pub/pure-ftpd/releases/$pkgname-$pkgver.tar.gz
+	pure-ftpd.initd"
+
+_builddir="src/$pkgname-$pkgver"
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	./configure --without-humor --without-unicode --with-minimal --with-throttling  || return 1
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+        install -m755 -D ../$pkgname.initd \
+                "$pkgdir"/etc/init.d/$pkgname || return 1
+
+}
+
+md5sums="29e2a68e756d09f4aff8f4f76435b020  pure-ftpd-1.0.30.tar.gz
+3608b0f85e7731aec64c251f9b73907a  pure-ftpd.initd"
diff --git a/testing/pureftpd/pure-ftpd.initd b/testing/pureftpd/pure-ftpd.initd
new file mode 100644
index 0000000..0096fc0
--- /dev/null
+++ b/testing/pureftpd/pure-ftpd.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+name=pure-ftpd
+daemon=/usr/local/sbin/$name
+
+depend() {
+	need net
+	after firewall
+}
+
+start() {
+	ebegin "Starting ${name}"
+		start-stop-daemon --start --quiet \
+			--pidfile /var/run/${name}.pid \
+			--exec ${daemon} --background
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping ${name}"
+		start-stop-daemon --stop --quiet \
+			--pidfile /var/run/$name.pid \
+			--exec ${daemon}
+	eend $?
+}
+
-- 
1.7.4.2

---

From: Natanael Copa <[email-masked]>
Date: Wed, 30 Mar 2011 08:26:22 +0200

On Tue, 29 Mar 2011 23:00:17 +0000
Douglas Haber <[email-masked]> wrote:

> testing/pureftpd/pure-ftpd.initd |   28 ++++++++++++++++++++++++ 2
> files changed, 72 insertions(+), 0 deletions(-) create mode 100644
> testing/pureftpd/APKBUILD create mode 100644
> testing/pureftpd/pure-ftpd.initd

Applied.

I took maintainership of it and set --prefix=/usr. We (as in alpine
linux) are not supposed to install anything in /usr/local, which is
where users put their home built stuff.

We might also want copy the gentoo init.d script which seems to have
support for varioius options.

Thanks!

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---