diff options
author | Leonardo Arena <rnalrd@gmail.com> | 2010-10-25 12:29:17 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@gmail.com> | 2010-10-25 12:29:44 +0000 |
commit | 7901aaada9de9473336772ba54f4a37734f76b6d (patch) | |
tree | 3b5189489f9ee02b834b77eb026e1609d4427b54 /main/freeradius/APKBUILD | |
parent | 45a3bc8ebaa875b88786682ea94c4fb7f152b1f9 (diff) | |
download | aports-7901aaada9de9473336772ba54f4a37734f76b6d.tar.bz2 aports-7901aaada9de9473336772ba54f4a37734f76b6d.tar.xz |
testing/freeradius: move to main
Diffstat (limited to 'main/freeradius/APKBUILD')
-rw-r--r-- | main/freeradius/APKBUILD | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/main/freeradius/APKBUILD b/main/freeradius/APKBUILD new file mode 100644 index 0000000000..272b0219be --- /dev/null +++ b/main/freeradius/APKBUILD @@ -0,0 +1,146 @@ +# Contributor: +# Maintainer: Leonardo Arena <rnalrd@gmail.com> +pkgname=freeradius +pkgver=2.1.10 +pkgrel=13 +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 perl-dev python-dev openldap-dev unixodbc-dev" +pkggroups="radiusd" +pkgusers="radiusd" +install="freeradius.pre-install" +subpackages="$pkgname-doc $pkgname-dev $pkgname-ldap $pkgname-mssql \ + $pkgname-mysql $pkgname-oracle $pkgname-perl $pkgname-postgresql \ + $pkgname-python $pkgname-unixodbc" +source="ftp://ftp.freeradius.org/pub/freeradius/$pkgname-server-$pkgver.tar.gz + freeradius.confd + freeradius.initd + " + +_builddir="$srcdir"/$pkgname-server-$pkgver + +prepare() { + cd "$_builddir" +# for i in ../*.patch; do +# msg "Applying $i" +# patch -p1 -i $i || return 1 +# done + + # we dont have libnsl + sed -i 's/-lnsl //g' configure || return 1 + sed -i 's/nsl, //g' configure.in || return 1 + + # Fix compilation with heimdal >= 1.3.1 + sed -i 's/ -DKRB5_DEPRECATED//' src/modules/rlm_krb5/Makefile.in || return 1 + + # Fix default config + sed -i 's%run_dir = .*%run_dir = \$\{localstatedir\}/run/radius%' \ + raddb/radiusd.conf.in || return 1 + + aclocal && ./autogen.sh || return 1 +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --libdir=/usr/lib/freeradius \ + --disable-static \ + --enable-shared \ + --disable-ltdl-install \ + --with-system-libltdl \ + --with-system-libtool \ + --with-udpfromto \ + || return 1 + + # workaround parallel build issue + make -j1 || return 1 +} + +package() { + cd "$_builddir" + install -d -m0750 -o root -g radiusd "$pkgdir"/etc/raddb + install -d -m0770 -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/radiusd + install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/radiusd + install -m644 -D scripts/logrotate.freeradius "$pkgdir"/etc/lorotate.d/$pkgname +} + +ldap() { + depends="freeradius" + mkdir -p $subpkgdir/etc/raddb + mv $pkgdir/etc/raddb/ldap.attrmap $subpkgdir/etc/raddb + mkdir -p $subpkgdir/etc/raddb/modules + mv $pkgdir/etc/raddb/modules/ldap $subpkgdir/etc/raddb/modules + mkdir -p $subpkgdir/usr/lib/freeradius + mv $pkgdir/usr/lib/freeradius/rlm_ldap* $subpkgdir/usr/lib/freeradius +} + +mysql() { + depends="freeradius" + mkdir -p $subpkgdir/etc/raddb/sql + mv $pkgdir/etc/raddb/sql/mysql $subpkgdir/etc/raddb/sql + mv $pkgdir/etc/raddb/sql/ndb $subpkgdir/etc/raddb/sql + mkdir -p $subpkgdir/usr/lib/freeradius + mv $pkgdir/usr/lib/freeradius/rlm_sql_mysql* $subpkgdir/usr/lib/freeradius +} + +mssql() { + depends="freeradius" + mkdir -p $subpkgdir/etc/raddb/sql + mv $pkgdir/etc/raddb/sql/mssql $subpkgdir/etc/raddb/sql +} + +oracle() { + depends="freeradius" + mkdir -p $subpkgdir/etc/raddb/sql + mv $pkgdir/etc/raddb/sql/oracle $subpkgdir/etc/raddb/sql +} + +perl() { + depends="freeradius perl" + mkdir -p $subpkgdir/usr/lib/freeradius + mv $pkgdir/usr/lib/freeradius/rlm_perl* $subpkgdir/usr/lib/freeradius + mkdir -p $subpkgdir/usr/bin + mv $pkgdir/usr/sbin/checkrad $subpkgdir/usr/bin/checkrad + mkdir -p $subpkgdir/etc/raddb/modules + mv $pkgdir/etc/raddb/modules/perl $subpkgdir/etc/raddb/modules/perl +} + +postgresql() { + depends="freeradius" + mkdir -p $subpkgdir/etc/raddb/sql + mv $pkgdir/etc/raddb/sql/postgresql $subpkgdir/etc/raddb/sql + mkdir -p $subpkgdir/usr/lib/freeradius + mv $pkgdir/usr/lib/freeradius/rlm_sql_postgresql* $subpkgdir/usr/lib/freeradius +} + +python() { + depends="freeradius python" + mkdir -p $subpkgdir/usr/lib/freeradius + mv $pkgdir/usr/lib/freeradius/rlm_python* $subpkgdir/usr/lib/freeradius +} + +unixodbc() { + depends="freeradius" + mkdir -p $subpkgdir/usr/lib/freeradius + mv $pkgdir/usr/lib/freeradius/rlm_sql_unixodbc* $subpkgdir/usr/lib/freeradius +} + +md5sums="e552704fc1b46d51176e575afa96dcc6 freeradius-server-2.1.10.tar.gz +fc6693f3df5a0694610110287a28568a freeradius.confd +6cd5d02575f514a51d741dba3f7c70d2 freeradius.initd" |