summaryrefslogtreecommitdiffstats
path: root/testing/freeradius/APKBUILD
blob: 51633591049aa87ff954730305f2d9311ef54a49 (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
# Contributor: 
# Maintainer: 
pkgname=freeradius
pkgver=2.1.7
pkgrel=0
pkgdesc="RADIUS (Remote Authentication Dial-In User Service) server"
url="http://freeradius.org/"
license="GPL"
depends=
makedepends="openssl-dev pth-dev mysql-dev postgresql-dev gdbm-dev readline-dev
	bash libtool autoconf automake
	"
pkggroups="radiusd"
pkgusers="radiusd"
install="freeradius.pre-install"
subpackages="$pkgname-doc $pkgname-dev"
source="ftp://ftp.freeradius.org/pub/freeradius/$pkgname-server-$pkgver.tar.gz
	freeradius.confd
	freeradius.initd
	0001-Fix-detection-of-TLS-for-uClibc.patch
	freeradius-2.1.6-nothreads.patch
	freeradius-2.1.7-pkglibdir.patch
	"

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

	aclocal && ./autogen.sh || return 1

	export CONFIG_SHELL=/bin/bash
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
                --localstatedir=/var \
		--disable-static \
		|| return 1

#	# the configure script fails to detect that we dont have TLS
#	sed -i -e '/^\#define HAVE_THREAD_TLS/d' src/include/autoconf.h \
#		|| return 1

	make -j1 || return 1
	install -d -m0750 -o root -g radiusd "$pkgdir"/etc/raddb
	install -d -m0750 -o root -g radiusd "$pkgdir"/var/run/radius
	install -d -m0750 -o root -g radiusd "$pkgdir"/var/log/radius
	install -d -m0750 -o root -g radiusd "$pkgdir"/var/log/radius/radacct

	make -j1 R="$pkgdir" install
	sed -i -e 's:^#user *= *nobody:user = radiusd:;s:^#group *= *nobody:group = radiusd:' \
		"$pkgdir"/etc/raddb/radiusd.conf
	chown -R root:radiusd "$pkgdir"/etc/raddb/*
	rm -f "$pkgdir/usr/sbin/rc.radiusd"
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname

}

md5sums="b1f77c5e3116bcb0ac0aa9080a06ebf1  freeradius-server-2.1.7.tar.gz
fc6693f3df5a0694610110287a28568a  freeradius.confd
b22092fcdcb61d7f0b8e13a007c444c5  freeradius.initd
2e39f10c814bc7e1172c4cb2d178b39b  0001-Fix-detection-of-TLS-for-uClibc.patch
1e04786d3f626200999f53471c19ac47  freeradius-2.1.6-nothreads.patch
4c8af50e174d392c0210cbf494cd15cd  freeradius-2.1.7-pkglibdir.patch"