diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-07-09 08:53:40 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-07-09 08:53:40 +0000 |
commit | 847097b5ef4a33e865127cea8dd937c839b0673d (patch) | |
tree | e4ff2a20e7040862918ccb12ac70309587431c65 /testing | |
parent | 59587b6549409b0914b0aff314d93ead3d8509d5 (diff) | |
download | aports-847097b5ef4a33e865127cea8dd937c839b0673d.tar.bz2 aports-847097b5ef4a33e865127cea8dd937c839b0673d.tar.xz |
testing/freeradius3: cleanup
use return 1 instead of exit 1 so abuild gets a chance to clean up
Diffstat (limited to 'testing')
-rw-r--r-- | testing/freeradius3/APKBUILD | 76 |
1 files changed, 47 insertions, 29 deletions
diff --git a/testing/freeradius3/APKBUILD b/testing/freeradius3/APKBUILD index 11524c20d..96bd7f6e0 100644 --- a/testing/freeradius3/APKBUILD +++ b/testing/freeradius3/APKBUILD @@ -86,16 +86,22 @@ build() { package() { cd "$_builddir" - install -d -m0750 -o root -g radius "${pkgdir}"${radconfdir} || exit 1 - install -d -m0750 -o radius -g radius "$pkgdir"/var/run/radius || exit 1 - install -d -m0750 -o radius -g radius "$pkgdir"/var/log/radius || exit 1 - install -d -m0750 -o radius -g radius "$pkgdir"/var/log/radius/radacct || exit 1 + install -d -m0750 -o root -g radius \ + "${pkgdir}"${radconfdir} || return 1 + install -d -m0750 -o radius -g radius \ + "$pkgdir"/var/run/radius || return 1 + install -d -m0750 -o radius -g radius \ + "$pkgdir"/var/log/radius || return 1 + install -d -m0750 -o radius -g radius \ + "$pkgdir"/var/log/radius/radacct || return 1 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 || exit 1 - install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/radiusd || exit 1 + install -m755 -D "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/radiusd || return 1 + install -m644 -D "$srcdir"/$pkgname.confd \ + "$pkgdir"/etc/conf.d/radiusd || return 1 #Install misses to create this mkdir -p "${pkgdir}"${radmodsconfdir}/sql/ippool-dhcp/postgresql find "$pkgdir" -iname *.la -delete @@ -105,52 +111,57 @@ _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 || exit 1 + "${subpkgdir}"${radmodsconfdir}/sql/$dir || return 1 done mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_sql_${1}.so "${subpkgdir}"${radlibdir} || exit 1 + mv "${pkgdir}"${radlibdir}/rlm_sql_${1}.so "${subpkgdir}"${radlibdir} \ + || return 1 } eap() { depends="freeradius3" mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_eap*.so "${subpkgdir}"${radlibdir} || exit 1 + mv "${pkgdir}"${radlibdir}/rlm_eap*.so "${subpkgdir}"${radlibdir} \ + || return 1 mkdir -p "${subpkgdir}"${radmodsdir} - mv "${pkgdir}"${radmodsdir}/eap "${subpkgdir}"${radmodsdir} || exit 1 + mv "${pkgdir}"${radmodsdir}/eap "${subpkgdir}"${radmodsdir} || return 1 } ldap() { depends="freeradius3" mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_ldap* "${subpkgdir}"${radlibdir} || exit 1 + mv "${pkgdir}"${radlibdir}/rlm_ldap* "${subpkgdir}"${radlibdir} \ + || return 1 } lib() { depends="" mkdir -p "${subpkgdir}"${radlibdir} "${subpkgdir}"${radconfdir} \ - "$subpkgdir"/usr/share/freeradius || exit 1 + "$subpkgdir"/usr/share/freeradius || return 1 mv "${pkgdir}"${radlibdir}/libfreeradius-*.so \ - "${subpkgdir}"${radlibdir} || exit 1 + "${subpkgdir}"${radlibdir} || return 1 cp "$_builddir"/share/* \ - "${subpkgdir}"/usr/share/freeradius || exit 1 + "${subpkgdir}"/usr/share/freeradius || return 1 } sql() { depends="freeradius3" mkdir -p "${subpkgdir}"${radlibdir} for lib in sql sqlippool sql_null sqlcounter; do - mv "${pkgdir}"${radlibdir}/rlm_${lib}.so "${subpkgdir}"${radlibdir} || exit 1 + mv "${pkgdir}"${radlibdir}/rlm_${lib}.so \ + "${subpkgdir}"${radlibdir} || return 1 done mkdir -p "${subpkgdir}"${radconfdir}/sites-available mv "${pkgdir}"${radconfdir}/sites-available/buffered-sql \ - "${subpkgdir}"${radconfdir}/sites-available || exit 1 + "${subpkgdir}"${radconfdir}/sites-available || return 1 mkdir -p "${subpkgdir}"${radmodsdir} - mv "${pkgdir}"${radmodsdir}/*sql* "${subpkgdir}"${radmodsdir} || exit 1 + mv "${pkgdir}"${radmodsdir}/*sql* "${subpkgdir}"${radmodsdir} \ + || return 1 } mysql() { depends="freeradius3-sql" - _mvdb mysql || exit 1 + _mvdb mysql || return 1 } mssql() { @@ -158,55 +169,62 @@ mssql() { arch="noarch" mkdir -p "${subpkgdir}"${radmodsconfdir}/sql/main mv "${pkgdir}"${radmodsconfdir}/sql/main/mssql \ - "${subpkgdir}"${radmodsconfdir}/sql/main || exit 1 + "${subpkgdir}"${radmodsconfdir}/sql/main || return 1 } perl() { depends="freeradius3 perl" mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_perl* "${subpkgdir}"${radlibdir} || exit 1 + mv "${pkgdir}"${radlibdir}/rlm_perl* "${subpkgdir}"${radlibdir} \ + || return 1 mkdir -p "$subpkgdir"/usr/bin - mv "$pkgdir"/usr/sbin/checkrad "$subpkgdir"/usr/bin/checkrad || exit 1 + mv "$pkgdir"/usr/sbin/checkrad "$subpkgdir"/usr/bin/checkrad \ + || return 1 mkdir -p "${subpkgdir}"${radconfdir}/mods-available - mv "${pkgdir}"${radconfdir}/mods-available/perl "${subpkgdir}"${radconfdir}/mods-available/perl || exit 1 + mv "${pkgdir}"${radconfdir}/mods-available/perl \ + "${subpkgdir}"${radconfdir}/mods-available/perl || return 1 } postgresql() { depends="freeradius3-sql" - _mvdb postgresql || exit 1 + _mvdb postgresql || return 1 } python() { depends="freeradius3 python" mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_python* "${subpkgdir}"${radlibdir} || exit 1 + mv "${pkgdir}"${radlibdir}/rlm_python* "${subpkgdir}"${radlibdir} \ + || return 1 for dir in $radmodsdir $radmodsconfdir; do mkdir -p "${subpkgdir}"$dir - mv "${pkgdir}"$dir/python "${subpkgdir}"$dir || exit 1 + mv "${pkgdir}"$dir/python "${subpkgdir}"$dir || return 1 done } radclient() { depends="" mkdir -p "$subpkgdir"/usr/bin - mv "$pkgdir"/usr/bin/radclient "$subpkgdir"/usr/bin/radclient || exit 1 + mv "$pkgdir"/usr/bin/radclient "$subpkgdir"/usr/bin/radclient \ + || return 1 } sqlite() { depends="freeradius3-sql" - _mvdb sqlite || exit 1 + _mvdb sqlite || return 1 } unixodbc() { depends="freeradius3" mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_sql_unixodbc.so "${subpkgdir}"${radlibdir} || exit 1 + mv "${pkgdir}"${radlibdir}/rlm_sql_unixodbc.so \ + "${subpkgdir}"${radlibdir} || return 1 } pam() { depends="freeradius3" mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_pam* "${subpkgdir}"${radlibdir} || exit 1 + mv "${pkgdir}"${radlibdir}/rlm_pam* "${subpkgdir}"${radlibdir} \ + || return 1 } md5sums="f031cdf90b94957b05a12468c95172d9 freeradius-server-3.0.3.tar.gz |