summaryrefslogtreecommitdiffstats
path: root/main/cyrus-sasl/APKBUILD
blob: 1ef87b3f79742e4fc5545745aba6629d2f4690d5 (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
# Contributor: Leonardo Arena <larena@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cyrus-sasl
pkgver=2.1.26
pkgrel=2
pkgdesc="Cyrus Simple Authentication Service Layer (SASL)"
url="http://cyrusimap.web.cmu.edu/downloads.html#sasl"
arch="all"
license="custom"
subpackages="$pkgname-dev $pkgname-doc libsasl"
depends=
makedepends="db-dev openssl-dev heimdal-dev
	autoconf automake libtool"
source="ftp://ftp.cyrusimap.org/$pkgname/$pkgname-$pkgver.tar.gz
	saslauthd.initd
	cyrus-sasl-2.1.25-avoid_pic_overwrite.patch
	cyrus-sasl-2.1.26-size_t.patch
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	# the libtool they ship is broken
	sed 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' -i configure.in || return 1
	rm -rf config/config.guess config/config.sub config/ltconfig \
		config/ltmain.sh config/libtool.m4 autom4te.cache
	libtoolize -c && aclocal -I config -I cmulocal \
		&& automake -a -c && autoheader && autoconf
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-anon \
		--disable-cram \
		--disable-digest \
		--enable-login \
		--disable-otp \
		--enable-plain \
		--with-gss_impl=heimdal \
		--with-devrandom=/dev/urandom \
		--without-ldap \
		--with-saslauthd=/var/run/saslauthd \
		--mandir=/usr/share/man || return 1
	# parallell builds is broken
	make -j1 || return 1
}

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

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

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

md5sums="a7f4e5e559a0e37b3ffc438c9456e425  cyrus-sasl-2.1.26.tar.gz
30d7a8cf31448a9ad2bfa632c3ed9659  saslauthd.initd
085acdc345bcce896f3eea8956cc0892  cyrus-sasl-2.1.25-avoid_pic_overwrite.patch
bcaafcbc79054e8356217213d6eda16d  cyrus-sasl-2.1.26-size_t.patch"
sha256sums="8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3  cyrus-sasl-2.1.26.tar.gz
334ec4c797d0aeceaab08412170a5f41aeb52211df67a95b249d61d5f4908f75  saslauthd.initd
80cb9cf22b0507b503ff0cf6c5946a44eb5c3808e0a77e66d56d5a53e5e76fa7  cyrus-sasl-2.1.25-avoid_pic_overwrite.patch
b85b20bdd25b42098e07a8ba7e435f02b5cd882dcf69572c4d32de4a5e4f41bb  cyrus-sasl-2.1.26-size_t.patch"
sha512sums="78819cb9bb38bea4537d6770d309deeeef09ff44a67526177609d3e1257ff4334d2b5e5131d5a1e4dea7430d8db1918ea9d171f0dee38b5e8337f4b72ed068f0  cyrus-sasl-2.1.26.tar.gz
f5a33202046b51f5dcf416321838cb2d338696da68d9735e187fe1547a5bdebe988d981ab324a69c79532b6d39011bb0ea38d16852ae7577da3ceb5b49ddd8c9  saslauthd.initd
033e3634116e1d3b316052dbe0b671cca0fcfb6063fca1a97d990c422c2ce05109a1e424e84ed9928dc0312a325a7248f2d2e3f9547f84453b36331c01f63be5  cyrus-sasl-2.1.25-avoid_pic_overwrite.patch
fe4c3e6d5230eb50b9e6885129760a12e7bce316b41a3e58b2c550fa83526b91205cd827f7d1367751313559875d32982b95b024b1a22300ac5b35214e7c2b78  cyrus-sasl-2.1.26-size_t.patch"