############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = freeradius version = 2.1.12 release = 4 thisapp = %{name}-server-%{version} groups = System/Daemons url = http://www.freeradius.org license = GPLv2+ and LGPLv2+ summary = High-performance and highly configurable free RADIUS server. description The FreeRADIUS Server Project is a high performance and highly configurable GPL'd free RADIUS server. FreeRADIUS is an Internet authentication daemon, which implements the RADIUS protocol, as defined in RFC 2865. It allows Network Access Servers to perform authentication for dial-up users. end source_dl = ftp://ftp.freeradius.org/pub/freeradius/ build requires gdbm-devel libpcap-devel libtool libtool-devel openssl-devel perl shadow-utils end PARALLELISMFLAGS = # Disabled configure_options +=\ %{CONFIGURE_ARCH} \ --libdir=%{libdir}/freeradius \ --with-system-libtool \ --with-threads \ --with-thread-pool \ --disable-ltdl-install \ --with-gnu-ld \ --without-rlm_eap_ikev2 \ --without-rlm_sql_iodbc \ --without-rlm_sql_firebird \ --without-rlm_sql_db2 \ --without-rlm_sql_oracle prepare_cmds %{create_user} end make_build_targets = LINK_MODE=-pie install make install R=%{BUILDROOT} # Change freeradius user and group. perl -i -pe 's/^#user =.*$/user = radiusd/' %{BUILDROOT}/etc/raddb/radiusd.conf perl -i -pe 's/^#group =.*$/group = radiusd/' %{BUILDROOT}/etc/raddb/radiusd.conf # Create emty logfiles. mkdir -pv %{BUILDROOT}/var/log/radius/radacct touch %{BUILDROOT}/var/log/radius/{radutmp,radius.log} chown -Rv radiusd.radiusd %{BUILDROOT}/var/log/radius/ # Create tmpfiles folder. mkdir -pv %{BUILDROOT}/run/radiusd chown -Rv radiusd.radiusd %{BUILDROOT}/run/radiusd/ # Remove unneeded stuff. rm -vf %{BUILDROOT}/usr/sbin/rc.radiusd rm -rvf %{BUILDROOT}/etc/raddb/sql/ rm -rvf %{BUILDROOT}/var/run/ # Remove header files, we don't ship a devel package. rm -rvf %{BUILDROOT}/usr/include/ # remove unsupported config file. rm -vf %{BUILDROOT}/etc/raddb/experimental.conf # Fix permissions. chown -Rv root.radiusd %{BUILDROOT}/etc/raddb end end create_user getent group radiusd >/dev/null || /usr/sbin/groupadd -r radiusd getent passwd radiusd >/dev/null || /usr/sbin/useradd -r -g radiusd \ -d /var/lib/radiusd -s /sbin/nologin radiusd end quality-agent whitelist_rpath %{libdir}/freeradius end end packages package %{name} configfiles /etc/raddb/radiusd.conf end prerequires shadow-utils systemd-units end script prein %{create_user} end script postin /bin/systemctl daemon-reload >/dev/null 2>&1 || : end script preun /bin/systemctl --no-reload disable freeradius.service >/dev/null 2>&1 || : /bin/systemctl stop freeradius.service >/dev/null 2>&1 || : end script postup /bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl try-restart freeradius.service >/dev/null 2>&1 || : end end package freeradius-utils summary = FreeRADIUS utilities. description Additional utilities to configure and manage FreeRADUIS Servers. end files /usr/bin/* /usr/share/man/man1/radclient.1 /usr/share/man/man1/radeapclient.1 /usr/share/man/man1/radlast.1 /usr/share/man/man1/radtest.1 /usr/share/man/man1/radwho.1 /usr/share/man/man1/radzap.1 /usr/share/man/man1/smbencrypt.1 /usr/share/man/man5/checkrad.5 /usr/share/man/man8/radconf2xml.8 /usr/share/man/man8/radcrypt.8 /usr/share/man/man8/radsniff.8 /usr/share/man/man8/radsqlrelay.8 /usr/share/man/man8/rlm_ippool_tool.8 end end package %{name}-debuginfo template DEBUGINFO end end