aboutsummaryrefslogtreecommitdiffstats
path: root/main/krb5/APKBUILD
blob: 7c8a9827e6f305b6ea3503c8f9534562c4e8c786 (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=krb5
pkgver=1.13
pkgrel=1

case $pkgver in
*.*.*) _ver=${pkgver%.*};;
*) _ver=${pkgver};;
esac

pkgdesc="The Kerberos network authentication system"
url="http://web.mit.edu/kerberos/www/"
arch="all"
license="MIT"
depends="krb5-conf"
depends_dev="e2fsprogs-dev"
makedepends="$depends_dev libverto-dev openldap-dev openssl-dev
	keyutils-dev bison flex perl"
install=""
options="suid"
subpackages="$pkgname-dev $pkgname-doc $pkgname-server
	$pkgname-server-ldap:ldap $pkgname-pkinit $pkgname-libs"
source="http://web.mit.edu/kerberos/dist/krb5/${_ver}/krb5-$pkgver-signed.tar
	mit-krb5_krb5-config_LDFLAGS.patch
	CVE-2014-5353.patch
	CVE-2014-5354.patch

	krb5kadmind.initd
	krb5kdc.initd
	krb5kpropd.initd
	"

_builddir="$srcdir"/krb5-$pkgver
unpack() {
	default_unpack
	cd "$srcdir"
	tar -zxf krb5-$pkgver.tar.gz
}

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

build() {
	cd "$_builddir"/src
	./configure \
		CPPFLAGS="$CPPFLAGS -fPIC -I/usr/include/et" \
		WARN_CFLAGS= \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--localstatedir=/var/lib \
		--enable-shared \
		--disable-static \
		--disable-rpath \
		--with-system-et \
		--with-system-ss \
		--with-system-verto \
		--without-tcl \
		--with-ldap \
		--with-crypto-impl=openssl \
		|| return 1
	make
}

package() {
	cd "$_builddir"/src
	make install DESTDIR="$pkgdir" || return 1
	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	mv "$pkgdir"/usr/share/examples "$pkgdir"/usr/share/doc/$pkgname/

	for i in $source; do
		case $i in
		*.initd) install -Dm755 "$srcdir"/$i \
			"$pkgdir"/etc/init.d/${i%.initd};;
		esac
	done
}

server() {
	pkgdesc="The KDC and related programs for Kerberos 5"
	depends="libverto-libev"
	mkdir -p "$subpkgdir"/usr/share \
		"$subpkgdir"/usr/bin \
		"$subpkgdir"/etc/
	install -d "$subpkgdir"/var/lib/krb5kdc || return 1
	mv "$pkgdir"/usr/sbin "$subpkgdir"/usr/ || return 1
	mv "$pkgdir"/etc/init.d "$subpkgdir"/etc/ || return 1
	# used for testing server
	mv "$pkgdir"/usr/bin/sclient "$subpkgdir"/usr/bin/

}

ldap() {
	pkgdesc="The LDAP storage plugin for the Kerberos 5 KDC"
	mkdir -p "$subpkgdir"/usr/lib/krb5/plugins/kdb
	mv "$pkgdir"/usr/lib/krb5/plugins/kdb/kldap.so \
		"$subpkgdir"/usr/lib/krb5/plugins/kdb/ || return 1
	mv "$pkgdir"/usr/lib/libkdb_ldap* \
		 "$subpkgdir"/usr/lib/
}

pkinit() {
	pkgdesc="The PKINIT module for Kerberos 5"
	mkdir -p "$subpkgdir"/usr/lib/krb5/plugins/preauth
	mv "$pkgdir"/usr/lib/krb5/plugins/preauth/pkinit.so \
		"$subpkgdir"/usr/lib/krb5/plugins/preauth/pkinit.so
}

libs() {
	pkgdesc="The shared libraries used by Kerberos 5"
	depends="krb5-conf"
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ || return 1
}

md5sums="fa5d4dcd7b79e2165d0ec4affa0956ea  krb5-1.13-signed.tar
c84a0c7d8014e3528524956ffdd1c3e9  mit-krb5_krb5-config_LDFLAGS.patch
491f8cdf54124ab52eb414b8075c6be7  CVE-2014-5353.patch
ec1e83cc8fd39af0a0e47041d21998d1  CVE-2014-5354.patch
29906e70e15025dda8b315d8209cab4c  krb5kadmind.initd
47efe7f24c98316d38ea46ad629b3517  krb5kdc.initd
3e0b8313c1e5bfb7625f35e76a5e53f1  krb5kpropd.initd"
sha256sums="dc8f79ae9ab777d0f815e84ed02ac4ccfe3d5826eb4947a195dfce9fd95a9582  krb5-1.13-signed.tar
84007c7423f67db7a8b248b9643c49ef25f2d56ce15c2574eb41ecbf51bcd3f2  mit-krb5_krb5-config_LDFLAGS.patch
fcdfd81dc63abbdeaca4eb5bbcd3c3088c44e3a96aa7fe191f82c341d38f360c  CVE-2014-5353.patch
616362df107bb63fd060ed3084e98d3523bbea245ff1cef6bd2074a27838ae61  CVE-2014-5354.patch
c7a1ec03472996daaaaf1a4703566113c80f72ee8605d247098a25a13dad1f5f  krb5kadmind.initd
709309dea043aa306c2fcf0960e0993a6db540c220de64cf92d6b85f1cca23c5  krb5kdc.initd
86b15d691e32b331ac756ee368b7364de6ab238dcae5adfed2a00b57d1b64ef4  krb5kpropd.initd"
sha512sums="99cf647ab39f5a34acaf2049908f91d3f3822f4afd3b9dad1630b31c72518398069f4f3d3840168122cb12aa5e5540466729bc714fbda96eb9403e635f88d244  krb5-1.13-signed.tar
5a3782ff17b383f8cd0415fd13538ab56afd788130d6ad640e9f2682b7deaae7f25713ce358058ed771091040dccf62a3bc87e6fd473d505ec189a95debcc801  mit-krb5_krb5-config_LDFLAGS.patch
736753afb36bc494bc42f3cd33fc013ad49625e8d90672b85784f9f4fe96ff8d3f8c014aa1678d8892cb4204243369ee583232047fa9178fcdff03ab4087b171  CVE-2014-5353.patch
e795258f958cd5ce86ff9930bdb7b119253d694bff32c0e4a9a414f184678d52f556a1f24af8032e447a2ecb24de24a50e8590d33019be2028ce452c8915daa9  CVE-2014-5354.patch
561af06b4e0f0e130dda345ad934bcdb9984ec00cc38d871df1d3bb3f9e1c7d86f06db5b03229707c88b96ad324e3a2222420f8494aa431002cacea0246b1153  krb5kadmind.initd
d6d0076886ce284fc395fafc2dc253b4b3ee97b2986dea51388d96a1e1294680fb171f475efc7844559e2c6aac44b26678a9255921db9a58dcf2e7164f0aeec5  krb5kdc.initd
f97d33fa977c132a470d95fd539d8e8db018e03f28dbc9d3e04faf78ebb7392196e7d5135f138c2390979bf37b3ae0265e6827f0c17b44b277eb2dfff0a96f77  krb5kpropd.initd"