Subject: [PATCH] add dcc-servers.net dcc to testing, with sub packages for dccif and dccm

From: Duncan Bellamy <[email-masked]>
Date: Fri, 24 Jan 2020 21:46:54 +0000

---
 testing/dcc/APKBUILD | 61 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 testing/dcc/APKBUILD

diff --git a/testing/dcc/APKBUILD b/testing/dcc/APKBUILD
new file mode 100644
index 0000000000..6efcfd6e3b
--- /dev/null
+++ b/testing/dcc/APKBUILD
@@ -0,0 +1,61 @@
+# Contributor: Duncan Bellamy <[email-masked]>
+# Maintainer: Duncan Bellamy <[email-masked]>
+pkgname="dcc"
+pkgver="2.3.167"
+pkgrel=1
+pkgdesc="Distributed Checksum Clearinghouses or DCC spam filter"
+url="https://www.dcc-servers.net/dcc/"
+arch="all"
+license="Distributed Checksum Clearinghouse"
+pkgusers="_dcc"
+pkggroups="_dcc"
+depends="wget"
+makedepends="libmilter-dev"
+subpackages="$pkgname-dccifd $pkgname-dccm $pkgname-doc"
+source="https://www.dcc-servers.net/src/dcc/old/dcc-2.3.167.tar.Z"
+options="!check"
+
+prepare() {
+		default_prepare
+	sed -i 's+DCC_UNIX+DCC_UNIX\n#include <sys\/types.h>+g' "$srcdir"/$pkgname-$pkgver/include/dcc_types.h
+}
+
+unpack() {
+	cd "$srcdir"
+	tar -xzf dcc*.tar.Z
+}
+
+build() {
+	./configure \
+		--with-installroot="$pkgdir" \
+		--bindir="/usr/bin" \
+		--mandir="/usr/man" \
+		--with-uid=_dcc
+	make
+}
+
+package() {
+	make install
+	install -Dm644 "$builddir"/LICENSE \
+		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+	chmod 755 "$pkgdir"/var/dcc/libexec/dccsight
+	cd "$pkgdir"/usr/bin
+	chmod 755 cdcc dccproc
+}
+
+dccifd() {
+	depends="dcc"
+	mkdir -p "$subpkgdir"/var/dcc/libexec
+	cd "$pkgdir"/var/dcc/libexec
+	mv dccifd start-dccifd "$subpkgdir"/var/dcc/libexec/
+}
+
+dccm() {
+	depends="dcc"
+	mkdir -p "$subpkgdir"/var/dcc/libexec
+	cd "$pkgdir"/var/dcc/libexec
+	mv dccm start-dccm "$subpkgdir"/var/dcc/libexec/
+}
+
+sha512sums="384a572e5b18bed6aed08dce6ebc468d5737b0cb4774fe502f527b101a38b4bec1fdd73384c6fb437c21ae46aa56ae04c5c459737cdda6ab3ce186ff4f77cf98  dcc-2.3.167.tar.Z"
-- 
2.24.1