aboutsummaryrefslogtreecommitdiffstats
path: root/main/freeradius/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2020-02-14 01:13:03 +0100
committerJakub Jirutka <jakub@jirutka.cz>2020-02-14 12:13:52 +0100
commitb2d90f498fa53483d8cc2ff6f82d6936b0baa990 (patch)
tree8eac25ab07e7840097149adaa1c1a516f320853c /main/freeradius/APKBUILD
parent18261d1acbb2702dbd32aac695f4004ccedc6f5c (diff)
downloadaports-b2d90f498fa53483d8cc2ff6f82d6936b0baa990.tar.bz2
aports-b2d90f498fa53483d8cc2ff6f82d6936b0baa990.tar.xz
main/freeradius: remove unnused files and move confs to correct subpkgs
Diffstat (limited to 'main/freeradius/APKBUILD')
-rw-r--r--main/freeradius/APKBUILD44
1 files changed, 36 insertions, 8 deletions
diff --git a/main/freeradius/APKBUILD b/main/freeradius/APKBUILD
index cd333c6cbd..a5c60027a6 100644
--- a/main/freeradius/APKBUILD
+++ b/main/freeradius/APKBUILD
@@ -1,6 +1,7 @@
# Contributor: Vladyslav Frolov <frolvlad@gmail.com>
# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=freeradius
pkgver=3.0.20
@@ -41,6 +42,7 @@ subpackages="
$pkgname-dbg
$pkgname-doc
$pkgname-dev
+ $pkgname-eap
$pkgname-ldap
$pkgname-lib
$pkgname-mssql
@@ -53,7 +55,6 @@ subpackages="
$pkgname-sqlite
$pkgname-unixodbc
$pkgname-pam
- $pkgname-eap
$pkgname-krb5
$pkgname-rest
$pkgname-redis
@@ -144,13 +145,36 @@ package() {
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
install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/radiusd
# Install misses to create this
mkdir -p "$pkgdir"$_radmodsconfdir/sql/ippool-dhcp/postgresql
+
+ # Remove unneeded and unused stuff (e.g. for disabled modules).
+
+ rm -f "$pkgdir"/usr/sbin/rc.radiusd
+ rm -f "$pkgdir"$_radlibdir/rlm_test.so
+ rm -f "$pkgdir"$_radconfdir/experimental.conf
+
+ # https://github.com/FreeRADIUS/freeradius-server/issues/1734#issuecomment-247848277
+ rm -f "$pkgdir"/usr/bin/dhcpclient
+ rm -f "$pkgdir"/usr/share/man/man1/dhcpclient.1*
+
+ cd "$pkgdir"$_radmodsdir
+ rm -f couchbase python unbound yubikey
+
+ cd "$pkgdir"$_radmodsconfdir
+ rm -rf sql/*/mongo
+ rm -rf sql/*/oracle
+ rm -rf unbound
+
+ cd "$pkgdir"$_radconfdir/sites-available
+ rm -f abfab* *.orig
+
+ cd "$pkgdir"$_radconfdir/policy.d
+ rm -f abfab*
}
eap() {
@@ -158,12 +182,12 @@ eap() {
depends="freeradius=$pkgver-r$pkgrel"
provides="freeradius3-eap=$pkgver-r$pkgrel"
- amove $_radlibdir/rlm_eap*.so
+ amove $_radlibdir/rlm_eap*.so $_radlibdir/libfreeradius-eap.so
amove usr/bin/radeapclient
- amove $_radmodsdir/eap
- amove $_radconfdir/certs
+ amove $_radmodsdir/eap $_radmodsdir/inner-eap
amove $_radconfdir/mods-enabled/eap
+ amove $_radconfdir/sites-available/check-eap-tls
}
ldap() {
@@ -172,6 +196,7 @@ ldap() {
provides="freeradius3-ldap=$pkgver-r$pkgrel"
amove $_radlibdir/rlm_ldap*
+ amove $_radmodsdir/ldap
}
krb5() {
@@ -180,6 +205,7 @@ krb5() {
provides="freeradius3-krb5=$pkgver-r$pkgrel"
amove $_radlibdir/rlm_krb5*
+ amove $_radmodsdir/krb5
}
lib() {
@@ -226,6 +252,7 @@ perl() {
amove $_radlibdir/rlm_perl*
amove $_radconfdir/mods-available/perl
+ amove $_radmodsconfdir/perl
}
checkrad() {
@@ -283,6 +310,7 @@ pam() {
provides="freeradius3-pam=$pkgver-r$pkgrel"
amove $_radlibdir/rlm_pam*
+ amove $_radmodsdir/pam
}
rest() {
@@ -290,6 +318,7 @@ rest() {
depends="freeradius=$pkgver-r$pkgrel"
amove $_radlibdir/rlm_rest*
+ amove $_radmodsdir/rest
}
redis() {
@@ -297,12 +326,11 @@ redis() {
depends="freeradius=$pkgver-r$pkgrel"
amove $_radlibdir/rlm_redis*
+ amove $_radmodsdir/redis*
}
_mvdb() {
- local dir; for dir in ippool-dhcp ippool counter main cui; do
- amove $_radmodsconfdir/sql/$dir/$1
- done
+ amove $_radmodsconfdir/sql/*/$1
amove $_radlibdir/rlm_sql_$1.so
}