summaryrefslogtreecommitdiffstats
path: root/kerberos/Pkgfile
blob: f0aa85c29c8468b6203c17db91d82ceea0260b4f (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
# Description: Utilitaire et démon MIT Kerberos V5 client et serveur.
# URL: 	http://web.mit.edu/kerberos/
# Packager: thierryn1 at hispeed dot ch
# Maintainer: thierryn1 at hispeed

name=kerberos
version=1.10.2
release=1
source=(http://web.mit.edu/$name/www/dist/krb5/${version%.*}/krb5-$version-signed.tar
	MITKRB5-SA-2012-001.patch
	gcc4.7.patch)

build()  {
	tar xf krb5-${version}-signed.tar
	tar xzf krb5-${version}.tar.gz
	cd krb5-$version/src

	patch -p2 < $SRC/gcc4.7.patch
	rm lib/krb5/krb/deltat.c

	sed -i "/KRB5ROOT=/s/\/local//" util/ac_check_krb5.m4
	patch -p2 < $SRC/MITKRB5-SA-2012-001.patch

	export CFLAGS+=" -fPIC -fno-strict-aliasing -fstack-protector-all"
	export CPPFLAGS+=" -I/usr/include/et"

	./configure --prefix=/usr \
		--sysconfdir=/etc/krb5 \
		--localstatedir=/var/lib \
		--enable-shared \
		--enable-dns-for-realm \
		--disable-rpath \
		--with-system-et \
		--with-system-ss \
		--mandir=/usr/share/man

	make
	make DESTDIR=$PKG install

	mv ${PKG}/usr/bin/uuclient ${PKG}/usr/bin/kuucclient

	mkdir -p $PKG/{lib,bin}
	mv -v $PKG/usr/bin/ksu $PKG/bin
	chmod -v 755 $PKG/bin/ksu
	mv -v $PKG/usr/lib/libkrb5.so.3* $PKG/lib
	mv -v $PKG/usr/lib/libk5crypto.so.3* $PKG/lib
	mv -v $PKG/usr/lib/libkrb5support.so.0* $PKG/lib
	ln -v -sf ../../lib/libkrb5.so.3.3 $PKG/usr/lib/libkrb5.so
	ln -v -sf ../../lib/libk5crypto.so.3.1 $PKG/usr/lib/libk5crypto.so
	ln -v -sf ../../lib/libkrb5support.so.0.1 $PKG/usr/lib/libkrb5support.so
}