1 # FIXME: find a way of getting rid of "-" on versions ... rpm will be happy
2 Summary: High-performance and highly configurable RADIUS server
3 Summary(pl): Szybki i wysoce konfigurowalny serwer RADIUS.
7 URL: http://www.freeradius.org/
9 Group: Networking/Daemons
10 Group(de): Netzwerkwesen/Server
11 Group(pl): Sieciowe/Serwery
12 Prereq: /sbin/chkconfig
13 # FIXME: snmpwalk, snmpget and rusers POSSIBLY needed by checkrad
15 BuildRequires: libltdl-devel
16 BuildRequires: openldap-devel
17 #someone's help needed:split&test into %{name}-{mysql,pgsql,common,devel,static,ldap,pam?} hunter.
18 BuildRequires: mysql-devel
19 BuildRequires: postgresql-devel
20 BuildRequires: pam-devel
21 Obsoletes: cistron-radius
22 Source0: ftp://ftp.freeradius.org/pub/radius/%{name}-%{version}.tar.gz
24 %define _localstatedir /var/radius
26 # FIXME: won't be good to include these contrib examples?
27 # Source1: http://www.ping.de/~fdc/radius/radacct-replay
28 # Source2: http://www.ping.de/~fdc/radius/radlast-0.03
29 # Source3: ftp://ftp.freeradius.org/pub/radius/contrib/radwho.cgi
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 The FreeRADIUS Server Project is an attempt to create a
35 high-performance and highly configurable GPL'd RADIUS server. It is
36 generally similar to the Livingston 2.0 RADIUS server, but has a lot
37 more features, and is much more configurable.
40 Projekt FreeRadius ma na celu stworzenie szybkiego i wysoce
41 konfigurowalnego serwera RADIUS na licencji GPL. Ten jest podobny do
42 Livingston 2.0 RADIUS server ale ma o wiele wiêcej ficzersów i jest
43 bardziej podatny na konfiguracjê.
48 # FIXME: some folks prefer -dist files ... rename them or not?
50 #chmod 640 clients naspasswd radiusd.conf.in
55 #libtoolize --copy --force
60 %configure --localstatedir=%{_localstatedir} \
64 --disable-ltdl-install
67 libtool --finish %{_libdir}
70 # prepare $RPM_BUILD_ROOT
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,pam.d,rc.d/init.d}
75 %{__make} install R=$RPM_BUILD_ROOT
76 # done here & put noreplace in %files to avoid messing up existing installations
77 for i in radutmp radwtmp radius.log radwatch.log checkrad.log
79 touch $RPM_BUILD_ROOT%{_localstatedir}/log/$i
80 echo $RPM_BUILD_ROOT%{_localstatedir}/log/$i
81 #who the hell should own logfiles/ and what sgid should have radiusd ?
82 # do we need %{_sysconfdir}/shadow do be +r for wheel ? or better use PAM ?
87 # remove unneeded stuff
88 %{__rm} -f $RPM_BUILD_ROOT%{_prefix}/{man/man8/builddbm.8,sbin/rc.radiusd}
91 install -m 555 rc.radiusd-redhat $RPM_BUILD_ROOT/etc/rc.d/init.d/radiusd
92 install radiusd-logrotate $RPM_BUILD_ROOT/etc/logrotate.d/radiusd
93 install radiusd-pam $RPM_BUILD_ROOT/etc/pam.d/radius
97 if [ "$1" = "0" ]; then
98 /sbin/chkconfig --del radiusd.init
102 if [ "$1" = "0" ]; then
103 /sbin/chkconfig --add radiusd.init
107 %{__rm} -rf $RPM_BUILD_ROOT
110 %defattr(644,root,root,755)
111 %doc doc/ChangeLog doc/README* todo/ COPYRIGHT INSTALL
112 %config /etc/pam.d/radius
113 %config /etc/logrotate.d/radiusd
114 %config /etc/rc.d/init.d/radiusd
115 %config %{_sysconfdir}/raddb/*
117 %attr(755,root,root) %{_bindir}/*
118 %attr(755,root,root) %{_sbindir}/*
120 %dir %{_localstatedir}/log/radacct/
121 %config(missingok noreplace) %{_localstatedir}/log/checkrad.log
122 %config(missingok noreplace) %{_localstatedir}/log/radwatch.log
123 %config(missingok noreplace) %{_localstatedir}/log/radius.log
124 %config(missingok noreplace) %{_localstatedir}/log/radwtmp
125 %config(missingok noreplace) %{_localstatedir}/log/radutmp