aboutsummaryrefslogtreecommitdiffstats
path: root/community/netatalk/APKBUILD
blob: 4d9b3b99976fc3c6f2cb7f246dac3504a278beb6 (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
# Contributor: Alexander Rigbo <alex@dnb.nu>
# Maintainer: Alexander Rigbo <alex@dnb.nu>
pkgname=netatalk
pkgver=3.1.12
pkgrel=0
pkgdesc="Netatalk is a freely-available Open Source AFP fileserver"
url="http://netatalk.sourceforge.net/"
arch="all"
license="GPL-2.0"
makedepends="acl-dev attr-dev db-dev libevent-dev libgcrypt-dev tdb-dev file"
subpackages="$pkgname-doc $pkgname-dev"
source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	netatalk.initd"
builddir="$srcdir/$pkgname-$pkgver"
options="suid"  # needed for /usr/bin/afppasswd

# secfixes:
#   3.1.12-r0:
#   - CVE-2018-1160

build() {
	cd "$builddir"

	# Notes:
	#  --without-libevent - don't use *bundled* libevent
	#  --without-tdb - don't use *bundled* tdb
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-silent-rules \
		--disable-zeroconf \
		--disable-tcp-wrappers \
		--enable-overwrite \
		--without-libiconv \
		--without-pam \
		--with-shadow \
		--without-kerberos \
		--without-ldap \
		--with-acls \
		--without-libevent \
		--with-libevent-header=/usr/include \
		--with-libevent-lib=/usr/lib \
		--with-bdb=/usr \
		--without-tdb \
		--without-dtrace \
		--without-afpstats \
		--with-lockfile=/var/lock/netatalk
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	# We don't build with dbug support.
	rm "$pkgdir"/etc/dbus-session.conf
	rm "$pkgdir"/usr/bin/afpstats

	install -m 755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
}

sha512sums="ec4e4855628526742ad4bc2a25a0b2acac6fc20146a859b61d220f9f7786b006bd9af5ddc8505ca234913190f8d46649fbe8653eb8b5a0a1580a2bd56e5c09dc  netatalk-3.1.12.tar.gz
c4dc6b1967f4b86ee2f1cfc480edab5467fb1f67fd0cbbed23c8454568d0aaceeedaa23db90f8ca5b47f24d346f72d5e12307557edfeeefcbee003f85c56cced  netatalk.initd"