aboutsummaryrefslogtreecommitdiffstats
path: root/community/dcc/APKBUILD
blob: d3256a5974f3066737e90df6055c0911aa462530 (plain) (blame)
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
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=dcc
pkgver=2.3.167
pkgrel=4
pkgdesc="Distributed Checksum Clearinghouses or DCC spam filter"
url="https://www.dcc-servers.net/dcc/"
arch="all"
license="custom"
pkgusers="dcc"
pkggroups="dcc"
makedepends="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
	$pkgname.confd
	$pkgname.initd
"
install="$pkgname.pre-install $pkgname.post-install $pkgname.post-deinstall"

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"/$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
	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 usr/bin/dccproc usr/bin/dccif-test
}

sha512sums="384a572e5b18bed6aed08dce6ebc468d5737b0cb4774fe502f527b101a38b4bec1fdd73384c6fb437c21ae46aa56ae04c5c459737cdda6ab3ce186ff4f77cf98  dcc-2.3.167.tar.gz
8efe22be50da74abdf8fe26de028f13d7ee572c0f1fcfb174bcd8083523c0c5d2b0a5c2580d77d031c23f5ce728e045a6ba8ef9069a19cc6bcfe865142849d41  10-dcc-alpine.patch
8f7455cb8d49f26688fb8110c1a75311d9a8365e384dedbad7ab48bccdce6c0114f0c22d2024d05ab31d7ae5cdacf96972d8a7c0c361b767bde6532e1d9a94c7  20-dcc-config.patch
14a5d890ecff4081b369b26308d6225ab06d535f159ac59f6554335788bab4684717118f69cbe256075f57af2fc27639a5bcc6ab1bded3590e19cb3b5094ccb8  dcc.confd
a685383af856ea00be0333e4eccf1a8cd8869a286e28c706fb5f296b1e3b1612053f031963524207f614dae3847c165a067ec028dd5fce4f8c8c0f126388ff90  dcc.initd"