Subject: [PATCH] testing/dcc: arrange files better

From: Duncan Bellamy <[email-masked]>
Date: Tue, 25 Feb 2020 08:40:22 +0000

add dcc.post-deinstall to remove crontab entry created during install
remove dcc-openrc from depends as other packages do not do this
add dccif-test to dcc-dccifd package
move dccproc to extras as procmail is depreciated
add extras to subpackages as it was missing
---
 testing/dcc/APKBUILD           | 15 ++++++++-------
 testing/dcc/dcc.post-deinstall |  5 +++++
 2 files changed, 13 insertions(+), 7 deletions(-)
 create mode 100644 testing/dcc/dcc.post-deinstall

diff --git a/testing/dcc/APKBUILD b/testing/dcc/APKBUILD
index e9a5bae765..847dd95b32 100644
--- a/testing/dcc/APKBUILD
+++ b/testing/dcc/APKBUILD
@@ -2,16 +2,16 @@
 # Maintainer: Duncan Bellamy <[email-masked]>
 pkgname="dcc"
 pkgver="2.3.167"
-pkgrel=1
+pkgrel=2
 pkgdesc="Distributed Checksum Clearinghouses or DCC spam filter"
 url="https://www.dcc-servers.net/dcc/"
 arch="all"
 license="custom"
 pkgusers="dcc"
 pkggroups="dcc"
-depends="dcc-openrc"
+#depends=""
 makedepends="libmilter-dev"
-subpackages="$pkgname-dccd $pkgname-dccifd $pkgname-dccm
+subpackages="$pkgname-dccd $pkgname-dccifd $pkgname-dccm $pkgname-extras
 	$pkgname-openrc $pkgname-doc"
 source="$pkgname-$pkgver.tar.gz::https://www.dcc-servers.net/src/dcc/old/dcc-$pkgver.tar.Z
 	10-$pkgname-alpine.patch
@@ -19,7 +19,8 @@ source="$pkgname-$pkgver.tar.gz::https://www.dcc-servers.net/src/dcc/old/dcc-$pk
 	$pkgname.confd
 	$pkgname.initd
 "
-install="$pkgname.pre-install $pkgname.post-install"
+install="$pkgname.pre-install $pkgname.post-install $pkgname.post-deinstall"
+
 options="!check"
 
 prepare() {
@@ -63,7 +64,7 @@ dccifd() {
 	pkgdesc="$pkgdesc (dccifd server)"
 	depends="dcc"
 	cd "$pkgdir"
-	amove var/dcc/libexec/dccifd var/dcc/libexec/start-dccifd
+	amove var/dcc/libexec/dccifd var/dcc/libexec/start-dccifd usr/bin/dccif-test
 }
 
 dccm() {
@@ -74,10 +75,10 @@ dccm() {
 }
 
 extras() {
-	pkgdesc="$pkgdesc (dcc update and uninstall)"
+	pkgdesc="$pkgdesc (dcc update,uninstall, and dccproc)"
 	depends="dcc"
 	cd "$pkgdir"
-	amove var/dcc/libexec/updatedcc var/dcc/libexec/uninstalldcc
+	amove var/dcc/libexec/updatedcc var/dcc/libexec/uninstalldcc usr/bin/dccproc
 }
 
 doc() {
diff --git a/testing/dcc/dcc.post-deinstall b/testing/dcc/dcc.post-deinstall
new file mode 100644
index 0000000000..90dc15e662
--- /dev/null
+++ b/testing/dcc/dcc.post-deinstall
@@ -0,0 +1,5 @@
+#!/bin/sh
+[ -f /etc/crontabs/dcc ] && \
+	crontab -d -u dcc
+
+exit 0
-- 
2.20.1