void-packages/srcpkgs/FreeRADIUS/template
2021-03-05 12:40:15 +01:00

67 lines
2.2 KiB
Bash

# Template file for 'FreeRADIUS'
pkgname=FreeRADIUS
version=3.0.20
revision=4
wrksrc=freeradius-server-release_${version//./_}
build_style=gnu-configure
makedepends="talloc-devel openssl-devel mit-krb5-devel pam-devel \
libmariadbclient-devel postgresql-libs-devel json-c-devel"
short_desc="World's most popular RADIUS Server"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://freeradius.org"
distfiles="https://github.com/FreeRADIUS/freeradius-server/archive/release_${version//./_}.tar.gz"
checksum=8177fe550af6685a040884dbe3df28431bdc5a8d3a48a9f4f88bdb49f2d0e90c
nocross=yes # Not supported by upstream
system_accounts="_freeradius"
make_dirs="/etc/raddb 0750 _freeradius _freeradius"
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
pre_install() {
# FreeRADIUS uses 'R' instead of 'DESTDIR'
export R=${DESTDIR}
}
post_install() {
# Remove the default generated certificates, it would be nice to just
# not build these, but the Makefiles are inordinately complex and
# cannot be easily modified to not build the certificate files.
_CERTDIR=${DESTDIR}/etc/raddb/certs
rm ${_CERTDIR}/index*
rm ${_CERTDIR}/*.crt
rm ${_CERTDIR}/*.csr
rm ${_CERTDIR}/*.key
rm ${_CERTDIR}/*.p12
rm ${_CERTDIR}/*.pem
rm ${_CERTDIR}/serial*
rm ${_CERTDIR}/*.der
rm ${_CERTDIR}/*dh*
rm ${_CERTDIR}/bootstrap
# Install the service
vsv FreeRADIUS
# While the config installed by the makefiles is usable, its
# also very complex and not likely to be a good solution for
# most sites installing FreeRADIUS, so the existing config
# will be moved out of the way here so that experienced admins
# can install a configuration set that is appropriate for the
# specific site. Intentionally the examples directory
# contains 'raddb' to clarify that the examples examples
# within are an example raddb configuration.
vmkdir usr/share/examples/${pkgname}/
mv ${DESTDIR}/etc/raddb/ ${DESTDIR}/usr/share/examples/${pkgname}
}
FreeRADIUS-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove /usr/lib/*.a
vmove /usr/lib/*.la
vmove /usr/include/freeradius
}
}