aboutsummaryrefslogtreecommitdiffstats
path: root/main/freeradius/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/freeradius/APKBUILD')
-rw-r--r--main/freeradius/APKBUILD107
1 files changed, 43 insertions, 64 deletions
diff --git a/main/freeradius/APKBUILD b/main/freeradius/APKBUILD
index a581be1113..d7ddf005bd 100644
--- a/main/freeradius/APKBUILD
+++ b/main/freeradius/APKBUILD
@@ -34,7 +34,7 @@ source="ftp://ftp.freeradius.org/pub/freeradius/old/$_realname-server-$pkgver.ta
libressl.patch
"
-_builddir="$srcdir"/$_realname-server-$pkgver
+builddir="$srcdir"/$_realname-server-$pkgver
radconfdir="/etc/raddb"
radmodsdir="$radconfdir/mods-available"
@@ -43,22 +43,14 @@ radmodsconfdir="$radconfdir/mods-config"
ldpath="$radlibdir"
prepare() {
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch)
- msg "Applying $i"
- patch -p1 -i "$srcdir"/$i || return 1
- ;;
- esac
- done
- update_config_sub || return 1
+ default_prepare
+ update_config_sub
# remove certs generation
- # rm -rf raddb/certs || return 1
+ # rm -rf raddb/certs
}
build() {
- cd "$_builddir"
+ cd "$builddir"
# freeradius requries json.h to be in a dir called 'json'. We fool
# the configure script with a symlink pointing to proper location.
ln -s /usr/include/json-c json
@@ -92,30 +84,29 @@ build() {
--without-rlm_sql_oracle \
--without-rlm_yubikey \
--without-rlm_ykclient \
- --with-jsonc-include-dir="$PWD" \
- || return 1
+ --with-jsonc-include-dir="$PWD"
- make -j1 LDFLAGS="$LDFLAGS -lssl" || return 1
+ make -j1 LDFLAGS="$LDFLAGS -lssl"
}
package() {
- cd "$_builddir"
+ cd "$builddir"
install -d -m0750 -o root -g radius \
- "${pkgdir}"${radconfdir} || return 1
+ "${pkgdir}"${radconfdir}
install -d -m0750 -o radius -g radius \
- "$pkgdir"/var/run/radius || return 1
+ "$pkgdir"/var/run/radius
install -d -m0750 -o radius -g radius \
- "$pkgdir"/var/log/radius || return 1
+ "$pkgdir"/var/log/radius
install -d -m0750 -o radius -g radius \
- "$pkgdir"/var/log/radius/radacct || return 1
+ "$pkgdir"/var/log/radius/radacct
- PACKAGE=yes make -j1 R="$pkgdir" install || return 1
+ PACKAGE=yes make -j1 R="$pkgdir" install
chown -R root:radius "$pkgdir"/etc/raddb/*
rm -f "$pkgdir"/usr/sbin/rc.radiusd
install -m755 -D "$srcdir"/$pkgname.initd \
- "$pkgdir"/etc/init.d/radiusd || return 1
+ "$pkgdir"/etc/init.d/radiusd
install -m644 -D "$srcdir"/$pkgname.confd \
- "$pkgdir"/etc/conf.d/radiusd || return 1
+ "$pkgdir"/etc/conf.d/radiusd
#Install misses to create this
mkdir -p "${pkgdir}"${radmodsconfdir}/sql/ippool-dhcp/postgresql
}
@@ -124,11 +115,10 @@ _mvdb() {
for dir in ippool-dhcp ippool counter main cui; do
mkdir -p "${subpkgdir}"${radmodsconfdir}/sql/$dir
mv "${pkgdir}"${radmodsconfdir}/sql/$dir/$1 \
- "${subpkgdir}"${radmodsconfdir}/sql/$dir || return 1
+ "${subpkgdir}"${radmodsconfdir}/sql/$dir
done
mkdir -p "${subpkgdir}"${radlibdir}
- mv "${pkgdir}"${radlibdir}/rlm_sql_${1}.so "${subpkgdir}"${radlibdir} \
- || return 1
+ mv "${pkgdir}"${radlibdir}/rlm_sql_${1}.so "${subpkgdir}"${radlibdir}
}
eap() {
@@ -136,13 +126,12 @@ eap() {
provides="freeradius3-eap=$pkgver-r$pkgrel"
pkgdesc="EAP module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir} "$subpkgdir"/usr/bin
- mv "${pkgdir}"${radlibdir}/rlm_eap*.so "${subpkgdir}"${radlibdir} \
- || return 1
- mv "$pkgdir"/usr/bin/radeapclient "$subpkgdir"/usr/bin || return 1
+ mv "${pkgdir}"${radlibdir}/rlm_eap*.so "${subpkgdir}"${radlibdir}
+ mv "$pkgdir"/usr/bin/radeapclient "$subpkgdir"/usr/bin
mkdir -p "${subpkgdir}"${radmodsdir}
- mv "${pkgdir}"${radmodsdir}/eap "${subpkgdir}"${radmodsdir} || return 1
+ mv "${pkgdir}"${radmodsdir}/eap "${subpkgdir}"${radmodsdir}
mkdir -p "${subpkgdir}"${radconfdir}
- mv "${pkgdir}"${radconfdir}/certs "${subpkgdir}"${radconfdir} || return 1
+ mv "${pkgdir}"${radconfdir}/certs "${subpkgdir}"${radconfdir}
}
ldap() {
@@ -150,8 +139,7 @@ ldap() {
provides="freeradius3-ldap=$pkgver-r$pkgrel"
pkgdesc="LDAP module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir}
- mv "${pkgdir}"${radlibdir}/rlm_ldap* "${subpkgdir}"${radlibdir} \
- || return 1
+ mv "${pkgdir}"${radlibdir}/rlm_ldap* "${subpkgdir}"${radlibdir}
}
krb5() {
@@ -159,19 +147,18 @@ krb5() {
provides="freeradius3-krb5=$pkgver-r$pkgrel"
pkgdesc="Kerberos module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir}
- mv "${pkgdir}"${radlibdir}/rlm_krb5* "${subpkgdir}"${radlibdir} \
- || return 1
+ mv "${pkgdir}"${radlibdir}/rlm_krb5* "${subpkgdir}"${radlibdir}
}
lib() {
depends=""
pkgdesc="Freeradius shared libraries"
mkdir -p "${subpkgdir}"${radlibdir} "${subpkgdir}"${radconfdir} \
- "$subpkgdir"/usr/share/freeradius || return 1
+ "$subpkgdir"/usr/share/freeradius
mv "${pkgdir}"${radlibdir}/libfreeradius-*.so \
- "${subpkgdir}"${radlibdir} || return 1
+ "${subpkgdir}"${radlibdir}
mv "${pkgdir}"/usr/share/freeradius/* \
- "${subpkgdir}"/usr/share/freeradius || return 1
+ "${subpkgdir}"/usr/share/freeradius
}
sql() {
@@ -181,21 +168,20 @@ sql() {
mkdir -p "${subpkgdir}"${radlibdir}
for lib in sql sqlippool sql_null sqlcounter; do
mv "${pkgdir}"${radlibdir}/rlm_${lib}.so \
- "${subpkgdir}"${radlibdir} || return 1
+ "${subpkgdir}"${radlibdir}
done
mkdir -p "${subpkgdir}"${radconfdir}/sites-available
mv "${pkgdir}"${radconfdir}/sites-available/buffered-sql \
- "${subpkgdir}"${radconfdir}/sites-available || return 1
+ "${subpkgdir}"${radconfdir}/sites-available
mkdir -p "${subpkgdir}"${radmodsdir}
- mv "${pkgdir}"${radmodsdir}/*sql* "${subpkgdir}"${radmodsdir} \
- || return 1
+ mv "${pkgdir}"${radmodsdir}/*sql* "${subpkgdir}"${radmodsdir}
}
mysql() {
depends="freeradius-sql=$pkgver-r$pkgrel"
provides="freeradius3-mysql=$pkgver-r$pkgrel"
pkgdesc="MySQL module for FreeRADIUS server"
- _mvdb mysql || return 1
+ _mvdb mysql
}
mssql() {
@@ -204,7 +190,7 @@ mssql() {
pkgdesc="MSSQL module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radmodsconfdir}/sql/main
mv "${pkgdir}"${radmodsconfdir}/sql/main/mssql \
- "${subpkgdir}"${radmodsconfdir}/sql/main || return 1
+ "${subpkgdir}"${radmodsconfdir}/sql/main
}
perl() {
@@ -212,21 +198,19 @@ perl() {
provides="freeradius3-perl=$pkgver-r$pkgrel"
pkgdesc="Perl module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir}
- mv "${pkgdir}"${radlibdir}/rlm_perl* "${subpkgdir}"${radlibdir} \
- || return 1
+ mv "${pkgdir}"${radlibdir}/rlm_perl* "${subpkgdir}"${radlibdir}
mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/sbin/checkrad "$subpkgdir"/usr/bin/checkrad \
- || return 1
+ mv "$pkgdir"/usr/sbin/checkrad "$subpkgdir"/usr/bin/checkrad
mkdir -p "${subpkgdir}"${radconfdir}/mods-available
mv "${pkgdir}"${radconfdir}/mods-available/perl \
- "${subpkgdir}"${radconfdir}/mods-available/perl || return 1
+ "${subpkgdir}"${radconfdir}/mods-available/perl
}
postgresql() {
depends="freeradius-sql=$pkgver-r$pkgrel"
provides="freeradius3-postgresql=$pkgver-r$pkgrel"
pkgdesc="PostgreSQL module for FreeRADIUS server"
- _mvdb postgresql || return 1
+ _mvdb postgresql
}
python() {
@@ -234,11 +218,10 @@ python() {
provides="freeradius3-python=$pkgver-r$pkgrel"
pkgdesc="Python module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir}
- mv "${pkgdir}"${radlibdir}/rlm_python* "${subpkgdir}"${radlibdir} \
- || return 1
+ mv "${pkgdir}"${radlibdir}/rlm_python* "${subpkgdir}"${radlibdir}
for dir in $radmodsdir $radmodsconfdir; do
mkdir -p "${subpkgdir}"$dir
- mv "${pkgdir}"$dir/python "${subpkgdir}"$dir || return 1
+ mv "${pkgdir}"$dir/python "${subpkgdir}"$dir
done
}
@@ -247,15 +230,14 @@ radclient() {
provides="freeradius3-radclient=$pkgver-r$pkgrel"
pkgdesc="Client for FreeRADIUS server"
mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/radclient "$subpkgdir"/usr/bin/radclient \
- || return 1
+ mv "$pkgdir"/usr/bin/radclient "$subpkgdir"/usr/bin/radclient
}
sqlite() {
depends="freeradius-sql=$pkgver-r$pkgrel"
provides="freeradius3-sqlite=$pkgver-r$pkgrel"
pkgdesc="SQLite module for FreeRADIUS server"
- _mvdb sqlite || return 1
+ _mvdb sqlite
}
unixodbc() {
@@ -264,7 +246,7 @@ unixodbc() {
pkgdesc="ODBC module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir}
mv "${pkgdir}"${radlibdir}/rlm_sql_unixodbc.so \
- "${subpkgdir}"${radlibdir} || return 1
+ "${subpkgdir}"${radlibdir}
}
pam() {
@@ -272,24 +254,21 @@ pam() {
provides="freeradius3-pam=$pkgver-r$pkgrel"
pkgdesc="PAM module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir}
- mv "${pkgdir}"${radlibdir}/rlm_pam* "${subpkgdir}"${radlibdir} \
- || return 1
+ mv "${pkgdir}"${radlibdir}/rlm_pam* "${subpkgdir}"${radlibdir}
}
rest() {
depends="freeradius=$pkgver-r$pkgrel"
pkgdesc="REST module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir}
- mv "${pkgdir}"${radlibdir}/rlm_rest* "${subpkgdir}"${radlibdir} \
- || return 1
+ mv "${pkgdir}"${radlibdir}/rlm_rest* "${subpkgdir}"${radlibdir}
}
redis() {
depends="freeradius=$pkgver-r$pkgrel"
pkgdesc="Redis modules for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir}
- mv "${pkgdir}"${radlibdir}/rlm_redis* "${subpkgdir}"${radlibdir} \
- || return 1
+ mv "${pkgdir}"${radlibdir}/rlm_redis* "${subpkgdir}"${radlibdir}
}
sha512sums="b4cb6203ca34ec459ea0f4f7960b4c5039ecd1be3de005251213ab6a9254d11fa9534b96d222eb83e6b35966aaeb6081362fd103eb73e0d76c009a655a47277f freeradius-server-3.0.13.tar.gz