From 9d72e09e542751b909603de85ee96128594b24be Mon Sep 17 00:00:00 2001 From: Michael Aldridge Date: Thu, 27 Oct 2016 22:09:22 -0500 Subject: [PATCH] New package: FreeRADIUS-3.0.12 --- srcpkgs/FreeRADIUS-devel | 1 + srcpkgs/FreeRADIUS/files/FreeRADIUS/run | 2 + srcpkgs/FreeRADIUS/template | 64 +++++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 120000 srcpkgs/FreeRADIUS-devel create mode 100644 srcpkgs/FreeRADIUS/files/FreeRADIUS/run create mode 100644 srcpkgs/FreeRADIUS/template diff --git a/srcpkgs/FreeRADIUS-devel b/srcpkgs/FreeRADIUS-devel new file mode 120000 index 00000000000..b9bbd716220 --- /dev/null +++ b/srcpkgs/FreeRADIUS-devel @@ -0,0 +1 @@ +FreeRADIUS \ No newline at end of file diff --git a/srcpkgs/FreeRADIUS/files/FreeRADIUS/run b/srcpkgs/FreeRADIUS/files/FreeRADIUS/run new file mode 100644 index 00000000000..525e8d2ae10 --- /dev/null +++ b/srcpkgs/FreeRADIUS/files/FreeRADIUS/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u _freeradius:_freeradius radiusd -f diff --git a/srcpkgs/FreeRADIUS/template b/srcpkgs/FreeRADIUS/template new file mode 100644 index 00000000000..1875d15e7d4 --- /dev/null +++ b/srcpkgs/FreeRADIUS/template @@ -0,0 +1,64 @@ + +# Template file for 'FreeRADIUS' +pkgname=FreeRADIUS +version=3.0.12 +revision=1 +wrksrc=freeradius-server-${version} +build_style=gnu-configure +nocross=yes # Not supported by upstream +makedepends="talloc-devel libressl-devel mit-krb5-devel pam-devel \ + libmariadbclient-devel postgresql-libs-devel json-c-devel" +system_accounts="_freeradius" +make_dirs="/etc/raddb 0750 _freeradius _freeradius" +short_desc="The world's most popular RADIUS Server" +maintainer="Michael Aldridge " +license="GPL-2" +homepage="http://freeradius.org" +distfiles="ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-${version}.tar.bz2" +checksum=fe4e1f52cc2873f6aee2b12b0f03236978e4632f2acf298f834686b240c4183d + +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 + } +}