[RADIATOR] Radiator.spec file: 4.7-3
Mike McCauley
mikem at open.com.au
Thu Jan 13 18:37:13 CST 2011
Hi Nick,
On Friday 14 January 2011 10:25:23 am Nick Urbanik wrote:
> Dear Radiator folks,
>
> I'm building a Radiator RPM which we've patched to support
> AddressAllocatorDHCP.pm using a DHCP failover pair. The SPEC file
> provided with the tarball is not the one used to build the RPM, but
> that spec file is not provided, nor is there a source RPM provided.
>
> Please could anyone provide the spec file for Radiator 4.7-3?
Attached.
>
> I'm re-writing the spec file to avoid hard coding Perl version numbers
> and other such practices, but it would be nice to have a better
> starting point.
Cheers.
--
Mike McCauley mikem at open.com.au
Open System Consultants Pty. Ltd
9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au
Phone +61 7 5598-7474 Fax +61 7 5598-7070
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc.
-------------- next part --------------
#
# RPM Spec file for Radiator on RH7, SuSE and similar
#
# Author: Mike McCauley (mikem at open.com.au)
# Copyright (C) 2001-2004 Open System Consultants
# $Id: Radiator.spec,v 1.53 2010/09/21 23:11:48 mikem Exp $
# Allow us to control whether we are building Locked or UNlocked from the command line
# Disable the default LZMA compression on OpenSuSE, since it is not available on all platforms
%define _binary_payload w9.bzdio
%{!?DISTNAME:%define DISTNAME Radiator}
%{!?PERLVER:%define PERLVER 5.10.0}
Summary: Radiator Radius server
Name: %{DISTNAME}
Version: 4.7
Release: 3
Epoch: 40703
License: Proprietary, Open System Consultants Pty Ltd
Group: System/Servers
Source: %{name}-%{version}.tgz
URL: http://www.open.com.au/radiator/
Vendor: Open System Consultants Pty. Ltd.
Packager: Open System Consultants, Mike McCauley <mikem at open.com.au>
AutoReqProv: no
Provides: Radiator
Requires: perl >= 5.6.0
Prefix: /usr
BuildRoot: /var/tmp/%{name}-root
%description
Radiator Radius server provides RADIUS authentication through
a wide range of data sources, such as flat file, DBM, SQL, SecurID
LDAP, Unix Passwd, TACACS+, NT SAM, Active Directory, OPIE
NIS+, CDB, AFS Kerberos, PAM, RAdmin, global roaming (iPASS, GoRemote)
ISP billing (Emerald, Platypus, Rodopi, Optigold, Hawk-i, Billmax
Interbiller, Freeside).
%prep
%setup
%build
PREFIX=$RPM_BUILD_ROOT/%{prefix} perl Makefile.PL
make
%install
mkdir -p $RPM_BUILD_ROOT/bin
mkdir -p $RPM_BUILD_ROOT/var/log/radius
mkdir -p $RPM_BUILD_ROOT/etc/radiator
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/
mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/site_perl
mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/vendor_perl
mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/site_perl/%PERLVER/Radius
make install
install -m644 goodies/linux-radius.cfg $RPM_BUILD_ROOT/etc/radiator/radius.cfg
install -m644 goodies/simple-users $RPM_BUILD_ROOT/etc/radiator/users
install -m644 dictionary $RPM_BUILD_ROOT/etc/radiator
install -m755 goodies/linux-radiator.init $RPM_BUILD_ROOT/etc/init.d/radiator
ln -fs /usr/lib/perl5/site_perl/%PERLVER/Radius $RPM_BUILD_ROOT/usr/lib/perl5/site_perl
ln -fs /usr/lib/perl5/site_perl/%PERLVER/Radius $RPM_BUILD_ROOT/usr/lib/perl5
ln -fs /usr/lib/perl5/site_perl/%PERLVER/Radius $RPM_BUILD_ROOT/usr/lib/perl5/vendor_perl
%files
%attr(-, root, root) %doc doc
%attr(-, root, root) %doc goodies
%attr(-, root, root) %doc ppm
%attr(-, root, root) %doc certificates
%attr(-, root, root) %doc dictionary*
%config /etc/radiator/radius.cfg
%config /etc/radiator/users
%dir /var/log/radius
/usr/bin/builddbm
/usr/bin/radpwtst
/usr/bin/radiusd
/usr/bin/buildsql
/usr/lib/perl5/site_perl/%PERLVER/Radius
/usr/lib/perl5/site_perl/Radius
/usr/lib/perl5/Radius
/usr/lib/perl5/vendor_perl/Radius
/etc/radiator/dictionary
/etc/init.d/radiator
%post
# Just in case they have a different perl version
#ln -fs /usr/lib/perl5/site_perl/5.8.3/Radius /usr/lib/perl5/site_perl/Radius
if [ -x /etc/rc.d/rc.M -a -x /etc/rc.d/rc.local ]; then
# Slackware
if ! grep -q 'radiator startup, added by rpm' /etc/rc.d/rc.local>/dev/null; then
echo '# radiator startup, added by rpm' >> /etc/rc.d/rc.local
echo 'if [ -x /etc/init.d/radiator ]; then' >> /etc/rc.d/rc.local
echo '/etc/init.d/radiator start' >> /etc/rc.d/rc.local
echo 'fi' >> /etc/rc.d/rc.local
fi
else
# LSB and similar
# Try to be compatible with Cobalt and others:
if [ -d /etc/rc.d/rc0.d ]; then
rcbase=/etc/rc.d
else
rcbase=/etc
fi
# Add startup script
for i in 0 1 2
do
ln -sf ../init.d/radiator $rcbase/rc$i.d/K15radiator
done
for i in 2 3 4 5 6
do
ln -sf ../init.d/radiator $rcbase/rc$i.d/S90radiator
done
fi
%preun
if [ -x /etc/rc.d/rc.M -a -x /etc/rc.d/rc.local ]; then
# Slackware
echo slackware
else
# LSB and similar
# Try to be compatible with Cobalt and others:
if [ -d /etc/rc.d/rc0.d ]; then
rcbase=/etc/rc.d
else
rcbase=/etc
fi
# Remove any links from startup dirs
if [ $1 = 0 ]; then
for i in 0 1 2 3 4 5 6
do
rm -f $rcbase/rc$i.d/K15radiator $rcbase/rc$i.d/S90radiator
done
rm -rf /usr/lib/perl5/site_perl/*/Radius
rm -rf /usr/lib/perl5/site_perl/Radius
rm -rf /usr/lib/perl5/vendor_perl/Radius
rm -rf /usr/lib/perl5/Radius
fi
fi
%changelog
* Wed Sep 22 2010 Mike McCauley <mikem at open.com.au>
- Fixed some problems with installed Radius paths
* Wed Sep 15 2010 Mike McCauley <mikem at open.com.au>
- Disable LZMA compression (suse default at 11.0), use BZ2 instead
* Thu Aug 11 2010 Mike McCauley <mikem at open.com.au>
- Update to perl 5.10.0 opensuse 11.1
* Thu Dec 24 2009 Mike McCauley <mikem at open.com.au>
- Fixed problems with PERLVER
* Tue Nov 24 2009 "Bjoern A. Zeeb" <info at cksoft.de>
- Auto-detect Perl version for site_local paths.
* Fri Nov 13 2009 Mike McCauley <mikem at open.com.au>
- Added /usr/lib/perl5/vendor_perl/Radius to the install links for SLES 11
* Thu Mar 21 2009 Mike McCauley <mikem at open.com.au>
- Replaced Serial tag with Epoch. Serial is obsolete.
* Wed Mar 9 2005 Mike McCauley <mikem at open.com.au>
- Install on Debian: /usr/lib/perl5/site_perl/ is not in @INC, so add /usr/lib/perl5/Radius symlink
* Thu Nov 11 2004 Mike McCauley <mikem at open.com.au>
- Improved behaviour when doing rpm -F install over an old version. The symlink in /usr/lib/perl5/site_perl/Radius
could end up incorrect.
* Wed Oct 20 2004 Mike McCauley <mikem at open.com.au>
- Improved install behaviour for Slackware
* Tue Oct 5 2004 Mike McCauley <mikem at open.com.au>
- Name of the key-locked distribution file changed from Radiator-Demo to Radiator-Locked.
- Added ppm directory to RPM dist
* Mon Aug 2 2004 Mike McCauley <mikem at open.com.au>
- Improvements to handling perl versions in /usr/lib/perl5/site_perl/, and fixed doc ownership problems
* Tue May 20 2003 Mike McCauley <mikem at open.com.au>
- Fixed problem with check-files and rpmbuild on RH8
* Fri Jul 16 2002 Mike McCauley <mikem at open.com.au>
- Improve install compatibility with Cobalt etc rc directories
* Thu Mar 15 2002 Mike McCauley <mikem at open.com.au>
- Further improvements for SuSE compat suggested by Alfredo Sola <alfredo at intelideas.com>
* Thu Feb 28 2002 Mike McCauley <mikem at open.com.au>
- Include all dictionaries into doc area
* Tue Sep 11 2001 Mike McCauley <mikem at open.com.au>
- Removed usage of chkconfig: its not on all systems
* Sun Jun 6 2001 Mike McCauley <mikem at open.com.au>
- Improvements suggested by Gustav Foseid <gustavf at initio.no>
# This fixes a legacy problem with rpmbuild in RH8:
%undefine __check_files
More information about the radiator
mailing list