Subject: [alpine-devel] new aport clamsmtp

From: "Carlo Landmeter" <[email-masked]>
Date: Tue, 03 Feb 2009 11:44:15 +0000

see attached git patch

From f1ce4e56e76edddbe583d01ad0289aba952f73ca Mon Sep 17 00:00:00 2001
From: Carlo Landmeter <[email-masked]>
Date: Tue, 3 Feb 2009 11:42:48 +0000
Subject: [PATCH] extra/clamstmp: new aport

---
 extra/clamsmtp/APKBUILD       |   32 ++++++++++++++++++++++++++++++++
 extra/clamsmtp/clamsmtp.confd |    5 +++++
 extra/clamsmtp/clamsmtp.initd |   25 +++++++++++++++++++++++++
 3 files changed, 62 insertions(+), 0 deletions(-)
 create mode 100644 extra/clamsmtp/APKBUILD
 create mode 100644 extra/clamsmtp/clamsmtp.confd
 create mode 100644 extra/clamsmtp/clamsmtp.initd

diff --git a/extra/clamsmtp/APKBUILD b/extra/clamsmtp/APKBUILD
new file mode 100644
index 0000000..9f4e1bb
--- /dev/null
+++ b/extra/clamsmtp/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Carlo Landmeter <clandmeter at gmail>
+# Maintainer: Carlo Landmeter <clandmeter at gmail>
+pkgname=clamsmtp
+pkgver=1.10
+pkgrel=0
+pkgdesc="An SMTP Virus Filter"
+url="http://memberwebs.com/stef/software/clamsmtp/"
+license="as-is"
+depends="uclibc"
+makedepends=""
+subpackages="$pkgname-doc"
+source="http://memberwebs.com/stef/software/clamsmtp/${pkgname}-${pkgver}.tar.gz
+clamsmtp.confd
+clamsmtp.initd"
+
+build() {
+	cd "$srcdir/$pkgname-$pkgver"
+
+	./configure --prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--infodir=/usr/share/info
+	make || return 1
+	make DESTDIR="$pkgdir" install || return 1
+
+	install -Dm644 doc/clamsmtpd.conf "$pkgdir"/etc/clamsmtpd.conf
+	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+	install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+}
+
+md5sums="b068ba6e444859782bbdd88f290c1abf  clamsmtp-1.10.tar.gz"
diff --git a/extra/clamsmtp/clamsmtp.confd b/extra/clamsmtp/clamsmtp.confd
new file mode 100644
index 0000000..a2c9cf5
--- /dev/null
+++ b/extra/clamsmtp/clamsmtp.confd
@@ -0,0 +1,5 @@
+#
+# Specify daemon $OPTS here.
+#
+
+OPTS="-p /var/run/clamsmtpd.pid"
diff --git a/extra/clamsmtp/clamsmtp.initd b/extra/clamsmtp/clamsmtp.initd
new file mode 100644
index 0000000..4ccfe6c
--- /dev/null
+++ b/extra/clamsmtp/clamsmtp.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+NAME=clamsmtpd
+DAEMON=/usr/sbin/$NAME
+
+depend() {
+	need net clamd
+}
+
+start() {
+	ebegin "Starting ${NAME}"
+		start-stop-daemon --start --quiet \
+			--exec ${DAEMON} -- ${OPTS}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping ${NAME}"
+		start-stop-daemon --stop --quiet \
+			--exec ${DAEMON} \
+			--pidfile /var/run/${NAME}.pid
+	eend $?
+}
-- 
1.6.1

---

From: Natanael Copa <[email-masked]>
Date: Tue, 03 Feb 2009 15:18:06 +0100

> Subject: [PATCH] extra/clamstmp: new aport

maybe add pkg desc and url in the commit message for new aports in
future?

it is handy when looking at the commit logs

> +++ b/extra/clamsmtp/clamsmtp.confd

I dont think the pidfile shoudl be a configuration option since its set
hard in the init.d script...

> +++ b/extra/clamsmtp/clamsmtp.initd

...so we should set the pidfile hard here too and not in the conf.d:

                   --exec ${DAEMON} -- ${OPTS} -p /var/run/$NAME.pid

> +                       --pidfile /var/run/${NAME}.pid

I committed it anyway.

Thanks!

-nc

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