~alpine/aports

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH v2] testing/dcc arrange files better

Duncan Bellamy <dunk@denkimushi.com>
Details
Message ID
<20200225142218.16420-1-dunk@denkimushi.com>
DKIM signature
missing
Download raw message
Patch: +17 -18
add dcc.post-deinstall to remove crontab entry created during install
remove dcc-openrc from depends as other packages do not do this
add dccifd-test to dccifs package and dump-clients to dccd package
move dccproc to extras as procmail is depreciated
add extras to subpackages as it was missing
chmod LICENESE file so it is installed and fix man path
---
 testing/dcc/APKBUILD           | 30 ++++++++++++------------------
 testing/dcc/dcc.post-deinstall |  5 +++++
 2 files changed, 17 insertions(+), 18 deletions(-)
 create mode 100644 testing/dcc/dcc.post-deinstall

diff --git a/testing/dcc/APKBUILD b/testing/dcc/APKBUILD
index e9a5bae765..9a0b981c61 100644
--- a/testing/dcc/APKBUILD
+++ b/testing/dcc/APKBUILD
@@ -2,16 +2,16 @@
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
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,12 +19,13 @@ 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() {
	chmod 755 configure
	chmod 644 include/dcc_types.h include/dcc_config.h.in homedir/dcc_conf.in
	chmod 644 include/dcc_types.h include/dcc_config.h.in homedir/dcc_conf.in LICENSE
	default_prepare
}

@@ -32,19 +33,18 @@ build() {
	./configure \
		--with-installroot="$pkgdir" \
		--bindir="/usr/bin" \
		--mandir="/usr/man" \
		--mandir="/usr/share/man" \
		--with-uid=dcc
	make
}

package() {
	make install
	install -Dm644 "$builddir"/LICENSE \
		usr/share/licenses/$pkgname/LICENSE

	cd "$pkgdir"
	install -Dm 755 "$srcdir"/$pkgname.initd etc/init.d/$pkgname
	install -Dm 644 "$srcdir"/$pkgname.confd etc/conf.d/$pkgname
	install -Dm644 "$builddir"/LICENSE usr/share/licenses/$pkgname/LICENSE

	chmod 755 "$pkgdir"/var/dcc/libexec/dccsight
	cd "$pkgdir"/usr/bin
@@ -56,14 +56,14 @@ dccd() {
	depends="dcc"
	_p=var/dcc/libexec
	cd "$pkgdir"/$_p
	amove "$_p"/dccd "$_p"/start-dccd "$_p"/stop-dccd "$_p"/start-grey
	amove "$_p"/dccd "$_p"/start-dccd "$_p"/stop-dccd "$_p"/start-grey "$_p"/dump-clients
}

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,16 +74,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
}

doc() {
	pkgdesc="$pkgdesc (man files)"
	cd "$pkgdir"
	amove usr/man
	amove var/dcc/libexec/updatedcc var/dcc/libexec/uninstalldcc usr/bin/dccproc
}

sha512sums="384a572e5b18bed6aed08dce6ebc468d5737b0cb4774fe502f527b101a38b4bec1fdd73384c6fb437c21ae46aa56ae04c5c459737cdda6ab3ce186ff4f77cf98  dcc-2.3.167.tar.gz
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
Reply to thread Export thread (mbox)