aboutsummaryrefslogtreecommitdiffstats
path: root/community/dcc/APKBUILD
blob: 4f73c5877df55e5b2ae4bf5a0806ef4923ca8aec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=dcc
pkgver=2.3.168
pkgrel=3
pkgdesc="Distributed Checksum Clearinghouses or DCC spam filter"
url="https://www.dcc-servers.net/dcc/"
arch="all"
license="custom"
pkgusers="dcc"
pkggroups="dcc"
makedepends="libmd-dev libmilter-dev"
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
	20-$pkgname-config.patch
	30-pid.patch
	dccd.initd
	dccd-grey.initd
	dccifd.initd
	dccm.initd
	"
install="$pkgname.pre-install $pkgname.post-install $pkgname.post-deinstall"
# there is no test suite
options="!check"

_p=var/dcc/libexec

prepare() {
	chmod 755 configure
	chmod 644 include/dcc_types.h include/dcc_config.h.in homedir/dcc_conf.in LICENSE
	default_prepare
}

build() {
	./configure \
		--with-installroot="$pkgdir" \
		--bindir="/usr/bin" \
		--mandir="/usr/share/man" \
		--with-uid=dcc
	make
}

package() {
	make install

	cd "$pkgdir"
	install -Dm 755 "$srcdir"/dccd.initd "$pkgdir"/etc/init.d/dccd
	install -Dm 755 "$srcdir"/dccd-grey.initd "$pkgdir"/etc/init.d/dccd-grey
	install -Dm 755 "$srcdir"/dccm.initd "$pkgdir"/etc/init.d/dccm
	install -Dm 755 "$srcdir"/dccifd.initd "$pkgdir"/etc/init.d/dccifd

	install -Dm644 "$builddir"/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE

	chmod 755 "$pkgdir/$_p/dccsight"
	cd "$pkgdir"/usr/bin
	chmod 755 cdcc dccproc
}

dccd() {
	pkgdesc="$pkgdesc (dccd server with grey listing)"
	depends="dcc"

	amove "$_p"/dccd "$_p"/start-dccd "$_p"/stop-dccd "$_p"/start-grey \
	"$_p"/dump-clients "$_p"/dblist "$_p"/dccsight
}

dccifd() {
	pkgdesc="$pkgdesc (dccifd server)"
	depends="dcc"

	amove "$_p"/dccifd "$_p"/start-dccifd
}

dccm() {
	pkgdesc="$pkgdesc (dccm server)"
	depends="dcc"

	amove "$_p"/dccm "$_p"/start-dccm
}

extras() {
	pkgdesc="$pkgdesc (dcc user commands)"
	depends="dcc"

	amove "$_p"/updatedcc "$_p"/uninstalldcc "$_p"/rcDCC
	amove usr/bin/dccproc usr/bin/dccif-test
}

sha512sums="
52a9671ba355a2d3e82246c3b5cf3875148d48bd314371d9e608643a59922becdf024b880e4bd37f6e36aa50830110600960ffa7a3ddd69ed7239bfc0578f141  dcc-2.3.168.tar.gz
8efe22be50da74abdf8fe26de028f13d7ee572c0f1fcfb174bcd8083523c0c5d2b0a5c2580d77d031c23f5ce728e045a6ba8ef9069a19cc6bcfe865142849d41  10-dcc-alpine.patch
8f7455cb8d49f26688fb8110c1a75311d9a8365e384dedbad7ab48bccdce6c0114f0c22d2024d05ab31d7ae5cdacf96972d8a7c0c361b767bde6532e1d9a94c7  20-dcc-config.patch
3a5d0b2cba23a6522fc068d225d3fd1abb68e9494802869e45533d5a9c2aaddf45f75aafbfb98bfb502e44c25c0befc569e20ef2d1884356a608012c73caf45f  30-pid.patch
f95ebeb46f6ae0ca80f94d05356f7ccc1ddad409d63b8780fdc4bea73f32c3df26962829cc82809490cbc12df7c24c7e7220bd6fce94df3660884156b4662c8c  dccd.initd
f5218aaf8b0ac9064ac8b6a892cb408f9bdb73af3bd732314714acbd188839a8b621ab79a97f12354f153a64bbc642266e7489e338d599bc6f0d1cd265fbce35  dccd-grey.initd
65ca7c509b61eebae2a733199afa0f0620a3d3b844cbed37e1667004f5cf50d3483b8fa7ce108eeeddc3c0a479ed8daac3703746ec10d2bd6a5b846c82e9f00f  dccifd.initd
ae2c9dde3260f16bdc38bbcc65a42afb20e6fe61c3ee4849b847d4a5a9a3cfd82d585f0b9bde14b5a9f8454a0a8a984fb63be0712357685869ebfb117b3bfe55  dccm.initd
"