%bcond_without firebird # without rlm_sql_firebird extension module
%bcond_without eap_ikev2 # without rlm_eap_ikev2 extension module
%bcond_without kerberos5 # without rlm_krb5 extension module
+%bcond_without ruby # without rlm_ruby extension module
+%bcond_with failed_calls_acc # with failed calls accounting support
#
%include /usr/lib/rpm/macros.perl
#
Summary: High-performance and highly configurable RADIUS server
Summary(pl.UTF-8): Szybki i wysoce konfigurowalny serwer RADIUS
Name: freeradius-server
-Version: 2.1.7
-Release: 7
+Version: 2.1.10
+Release: 3
License: GPL
Group: Networking/Daemons/Radius
Source0: ftp://ftp.freeradius.org/pub/radius/%{name}-%{version}.tar.bz2
-# Source0-md5: b8df6cf0c3df1dded205ad5f954feb78
+# Source0-md5: 8ea2bd39460a06212decf2c14fdf3fb8
Source1: %{name}.logrotate
Source2: %{name}.init
Source3: %{name}.pam
Patch3: %{name}-rundir.patch
Patch4: %{name}-heimdal.patch
Patch5: %{name}-rubyhdrs.patch
+# Patch taken from http://download.ag-projects.com/CDRTool/contrib/freeradius-brandinger/
+Patch6: failed_calls_accounting.patch
URL: http://www.freeradius.org/
%{?with_firebird:BuildRequires: Firebird-devel}
BuildRequires: autoconf
BuildRequires: python-devel
BuildRequires: rpm-perlprov
BuildRequires: rpmbuild(macros) >= 1.268
-BuildRequires: ruby-devel >= 1.8
+%{?with_ruby:BuildRequires: ruby-devel >= 1.8}
BuildRequires: sqlite3-devel
BuildRequires: unixODBC-devel
Requires(post,preun): /sbin/chkconfig
Requires(pre): /usr/sbin/useradd
Requires(pre): /usr/sbin/usermod
Requires: %{name}-libs = %{version}-%{release}
+Requires: openssl-tools
Requires: rc-scripts
Provides: freeradius = %{version}-%{release}
Provides: group(radius)
%description module-python
Python module for %{name}.
+%package module-ruby
+Summary: Ruby module for %{name}
+Group: Networking/Daemons/Radius
+Requires: %{name} = %{version}-%{release}
+
+%description module-ruby
+Ruby module for %{name}.
+
%package module-sqlite
Summary: Sqlite module for %{name}
Group: Networking/Daemons/Radius
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%{?with_failed_calls_acc:%patch6 -p0}
%build
# Keep it for future when ac/am regeneration will be ok
--enable-strict-dependencies \
--with-experimental-modules \
--with-logdir=%{_var}/log/freeradius \
+ --with-system-libltdl \
--with-system-libtool \
--with-udpfromto \
--without-rlm_eap_tnc \
%{!?with_ldap:--without-rlm_ldap} \
%{!?with_eap_ikev2:--without-rlm_eap_ikev2} \
%{?with_kerberos5:--enable-heimdal-krb5} \
- %{!?with_kerberos5:--without-rlm_krb5}
+ %{!?with_kerberos5:--without-rlm_krb5} \
+ %{!?with_ruby:--without-rlm_ruby}
%{make} -j1
%module_scripts module-perl
%module_scripts module-postgresql
%module_scripts module-python
+%module_scripts module-ruby
%module_scripts module-sqlite
%module_scripts module-sql_firebird
%module_scripts module-unix
%attr(755,root,root) %{_libdir}/freeradius/rlm_radutmp*.la
%attr(755,root,root) %{_libdir}/freeradius/rlm_realm*.so
%attr(755,root,root) %{_libdir}/freeradius/rlm_realm*.la
-%attr(755,root,root) %{_libdir}/freeradius/rlm_ruby*.la
-%attr(755,root,root) %{_libdir}/freeradius/rlm_ruby*.so
%attr(755,root,root) %{_libdir}/freeradius/rlm_sim_files*.so
%attr(755,root,root) %{_libdir}/freeradius/rlm_sim_files*.la
%attr(755,root,root) %{_libdir}/freeradius/rlm_smsotp*.so
%attr(755,root,root) %{_libdir}/freeradius/rlm_python*.so
%attr(755,root,root) %{_libdir}/freeradius/rlm_python*.la
+%if %{with ruby}
+%files module-ruby
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/freeradius/rlm_ruby*.so
+%attr(755,root,root) %{_libdir}/freeradius/rlm_ruby*.la
+%endif
+
%files module-sqlite
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/freeradius/rlm_sql_sqlite*.so
%files libs
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libfreeradius-eap-?.?.?.so
-%attr(755,root,root) %{_libdir}/libfreeradius-radius-?.?.?.so
+%attr(755,root,root) %{_libdir}/libfreeradius-eap-?.?.??.so
+%attr(755,root,root) %{_libdir}/libfreeradius-radius-?.?.??.so
%dir %{_libdir}/freeradius
%files devel