Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/opendkim: add startup script and sample config

From: Stefan Wagner <stw_at_bit-strickerei.de>
Date: Sun, 7 Aug 2016 20:48:18 +0200

---
 testing/opendkim/APKBUILD             | 42 ++++++++++++++++++++++++-----------
 testing/opendkim/opendkim.conf        |  1 +
 testing/opendkim/opendkim.initd       | 15 +++++++++++++
 testing/opendkim/opendkim.pre-install |  7 ++++++
 4 files changed, 52 insertions(+), 13 deletions(-)
 create mode 100644 testing/opendkim/opendkim.conf
 create mode 100644 testing/opendkim/opendkim.initd
 create mode 100644 testing/opendkim/opendkim.pre-install
diff --git a/testing/opendkim/APKBUILD b/testing/opendkim/APKBUILD
index 5f68016..94ef69e 100644
--- a/testing/opendkim/APKBUILD
+++ b/testing/opendkim/APKBUILD
_at_@ -1,23 +1,26 @@
-# Maintainer: Valery Kartel <valery.kartel_at_gmail.com>
 # Contributor: Valery Kartel <valery.kartel_at_gmail.com>
+# Contributor: Stefan Wagner <stw_at_bit-strickerei.de>
+# Maintainer: Valery Kartel <valery.kartel_at_gmail.com>
 pkgname=opendkim
 pkgver=2.10.3
-pkgrel=1
+pkgrel=2
 pkgdesc="DKIM signing and verifying filter for MTAs"
 url="http://www.opendkim.org"
 arch="all"
 license="custom"
-depends=""
-depends_dev=""
 makedepends="$depends_dev openssl-dev libmilter-dev"
-install=""
+pkgusers=opendkim
+pkggroups=opendkim
 subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-dbg"
-source="http://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.gz"
+install="$pkgname.pre-install"
+source="http://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.gz
+  opendkim.conf
+  opendkim.initd"
 
-_builddir="$srcdir"/$pkgname-$pkgver
+builddir="$srcdir"/$pkgname-$pkgver
 
 build() {
-	cd "$_builddir"
+	cd "$builddir"
 	./configure \
 		--build=$CBUILD \
 		--host=$CHOST \
_at_@ -27,12 +30,25 @@ build() {
 }
 
 package() {
-	cd "$_builddir"
+	cd "$builddir"
 	make DESTDIR="$pkgdir" install
+
+	install -Dm644 "$pkgdir"/usr/share/doc/opendkim/opendkim.conf.sample \
+		"$pkgdir"/etc/opendkim/opendkim.conf.sample
 	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-	install -Dm644 LICENSE.Sendmail "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.Sendmail
+	install -Dm644 LICENSE.Sendmail \
+		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE.Sendmail
+
+	install -m755 -D "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/"$pkgname"
+	install -m644 -D "$srcdir"/"$pkgname".conf "$pkgdir"/etc/conf.d/"$pkgname"
 }
 
-md5sums="916e691cdd16cfabd1cd6efe745323f9  opendkim-2.10.3.tar.gz"
-sha256sums="43a0ba57bf942095fe159d0748d8933c6b1dd1117caf0273fa9a0003215e681b  opendkim-2.10.3.tar.gz"
-sha512sums="97923e533d072c07ae4d16a46cbed95ee799aa50f19468d8bc6d1dc534025a8616c3b4b68b5842bc899b509349a2c9a67312d574a726b048c0ea46dd4fcc45d8  opendkim-2.10.3.tar.gz"
+md5sums="916e691cdd16cfabd1cd6efe745323f9  opendkim-2.10.3.tar.gz
+a4fadd2a9de27bfbc83173db4db9a7f5  opendkim.conf
+8b79b9a10076989033d45604419ea71b  opendkim.initd"
+sha256sums="43a0ba57bf942095fe159d0748d8933c6b1dd1117caf0273fa9a0003215e681b  opendkim-2.10.3.tar.gz
+b030ab34d324d75b353a1d3ee1483da497ad2be76dec0ddba6c25547d833dca0  opendkim.conf
+b67e8971ce3de5282c5aa4f9a0f7f365880b2d8efa58c09c77ebb38df794507e  opendkim.initd"
+sha512sums="97923e533d072c07ae4d16a46cbed95ee799aa50f19468d8bc6d1dc534025a8616c3b4b68b5842bc899b509349a2c9a67312d574a726b048c0ea46dd4fcc45d8  opendkim-2.10.3.tar.gz
+8a9ae1d6879ee20493f1fdd69ca750ca6cca8cdecea37a4b87dd67cd843491ea9e1dc2f3a2636acd1d22e961f9f61763beb898e4c58b534e3a1c9c8b1d6a3b69  opendkim.conf
+6fea585a95b5da6908275654046ad4d1f3341687c5602dfbc9a8f784f1ce04f194b291a9addfa24b565c0916bd5cb70348fc224140f5616ac3dc1a67378b3e62  opendkim.initd"
diff --git a/testing/opendkim/opendkim.conf b/testing/opendkim/opendkim.conf
new file mode 100644
index 0000000..9e1631c
--- /dev/null
+++ b/testing/opendkim/opendkim.conf
_at_@ -0,0 +1 @@
+EXTRA_OPTS="-x /etc/opendkim/opendkim.conf"
diff --git a/testing/opendkim/opendkim.initd b/testing/opendkim/opendkim.initd
new file mode 100644
index 0000000..da51074
--- /dev/null
+++ b/testing/opendkim/opendkim.initd
_at_@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+
+pidfile=/run/opendkim/opendkim.pid
+
+command=/usr/sbin/opendkim
+command_args="${EXTRA_OPTS}"
+
+depend() {
+	need net
+	before mta
+}
+
+start_pre() {
+  checkpath -d -o opendkim:opendkim -m755 /run/opendkim
+}
diff --git a/testing/opendkim/opendkim.pre-install b/testing/opendkim/opendkim.pre-install
new file mode 100644
index 0000000..25d3fd7
--- /dev/null
+++ b/testing/opendkim/opendkim.pre-install
_at_@ -0,0 +1,7 @@
+#!/bin/sh
+
+addgroup -S opendkim 2>/dev/null
+adduser -S -D -H -s /bin/false -G opendkim -g opendkim opendkim 2>/dev/null
+
+exit 0
+
-- 
2.9.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Aug 07 2016 - 20:48:18 GMT