aboutsummaryrefslogtreecommitdiffstats
path: root/main/cyrus-sasl/APKBUILD
blob: 6346d9fae2fdc99867c08dcfd5181ed30433d4a1 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cyrus-sasl
pkgver=2.1.23
pkgrel=2
pkgdesc="Cyrus Simple Authentication Service Layer (SASL)"
url="http://cyrusimap.web.cmu.edu/downloads.html#sasl"
license="custom"
subpackages="$pkgname-dev $pkgname-doc libsasl"
depends=
makedepends="db-dev openssl-dev"
source="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$pkgname-$pkgver.tar.gz
	saslauthd.initd
	cyrus-sasl-2.1.19-checkpw.c.patch
	db-4.7.patch"

build ()
{
	cd "$srcdir"/cyrus-sasl-$pkgver
	for i in ../*.patch; do
		msg "Applying $i..."
		patch -p0 -i $i || return 1
	done

	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-anon \
		--disable-cram \
		--disable-digest \
		--disable-gssapi \
		--enable-login \
		--disable-otp \
		--enable-plain \
		--with-devrandom=/dev/urandom \
		--mandir=/usr/share/man || return 1
	# parallell buildds is broken so we build libs first
	cd lib && make || return 1

	cd "$srcdir"/cyrus-sasl-$pkgver
	make || return 1
}

package() {
	cd "$srcdir"/cyrus-sasl-$pkgver
	make -j1 DESTDIR="$pkgdir" install || return 1
	install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING

	install -Dm755 ../saslauthd.initd "$pkgdir"/etc/init.d/saslauthd
}

libsasl() {
	depends=
	pkgdesc="Cyrus Simple Authentication and Security Layer (SASL) library"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
}

md5sums="2eb0e48106f0e9cd8001e654f267ecbc  cyrus-sasl-2.1.23.tar.gz
ba499a13d8d08d1b97bb0d5cb0b01bcc  saslauthd.initd
e27ddff076342e7a3041c4759817d04b  cyrus-sasl-2.1.19-checkpw.c.patch
71a3b7454f4d7cc2966b347bdf03f2fc  db-4.7.patch"