%define name freeradius %define version 0.9.3 %define release 5mdk Summary: High-performance and highly configurable RADIUS server Name: %{name} Version: %{version} Release: %{release} Source0: ftp://ftp.freeradius.org/pub/radius/%{name}-%{version}.tar.gz Source1: ftp://ftp.freeradius.org/pub/radius/%{name}-%{version}.tar.gz.sig Source2: %{name}.pam.bz2 Source3: %{name}.init.bz2 Source4: %{name}.logrotate.bz2 Patch0: %{name}-0.9.2-config.patch.bz2 Patch2: %{name}-0.9.0-ltdl_no_la.patch.bz2 Patch3: %{name}-0.8.1-sasl2.patch.bz2 Patch4: %{name}-0.8.1-use-system-com_err.patch.bz2 Patch5: %{name}-0.9.0-libdir.patch.bz2 URL: http://www.freeradius.org/ License: GPL Group: System/Servers PreReq: rpm-helper BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: krb5-devel BuildRequires: gdbm-devel BuildRequires: libtool-devel BuildRequires: MySQL-devel BuildRequires: net-snmp-devel BuildRequires: openssl-devel BuildRequires: postgresql-libs-devel BuildRequires: libsasl2-devel BuildRequires: libldap2-devel BuildRequires: libtool BuildRequires: unixODBC-devel BuildRequires: net-snmp BuildRequires: pam-devel BuildRequires: postgresql-devel BuildRequires: zlib-devel #Requires: libgdbm2 #Requires: libltdl3 #Requires: libnet-snmp50 #Requires: libopenssl0.9.7 Requires: net-snmp Requires: net-snmp-mibs Requires: net-snmp-utils Requires: perl Requires: perl-base Conflicts: radiusd-cistron %description The FreeRADIUS Server Project is a high-performance and highly configurable GPL'd RADIUS server. It is somewhat similar to the Livingston 2.0 RADIUS server, but has many more features, and is much more configurable. %package krb5 Summary: The Kerberos module for %{name} Group: System/Servers Requires: krb5-libs Requires: %{name} = %{version} %description krb5 The FreeRADIUS server can use Kerberos to authenticate users, and this module is necessary for that. %package ldap Summary: The LDAP module for %{name} Group: System/Servers #Requires: libldap2 #Requires: libsasl2 Requires: %{name} = %{version} %description ldap The FreeRADIUS server can use LDAP to authenticate users, and this module is necessary for that. %package postgresql Summary: The PostgreSQL module for %{name} Group: System/Servers #Requires: libpq3 Requires: %{name} = %{version} %description postgresql The FreeRADIUS server can use PostgreSQL to authenticate users and do accounting, and this module is necessary for that. %package mysql Summary: The MySQL module for %{name} Group: System/Servers #Requires: libmysql12 Requires: %{name} = %{version} %description mysql The FreeRADIUS server can use MySQL to authenticate users and do accounting, and this module is necessary for that. %package unixODBC Summary: The unixODBC module for %{name} Group: System/Servers #Requires: libunixODBC2 Requires: %{name} = %{version} %description unixODBC The FreeRADIUS server can use unixODBC to authenticate users and do accounting, and this module is necessary for that. %package devel Summary: Development headers and libraries for %{name} Group: Development/C Requires: %{name} = %{version} %description devel Development headers and libraries for %{name} %prep %setup -q %patch0 -p0 %patch2 -p1 %patch3 -p0 %patch4 -p1 -b .peroyvind %patch5 -p1 %__install -d mandrake bzcat %{SOURCE2} > mandrake/%{name}.pam bzcat %{SOURCE3} > mandrake/%{name}.init bzcat %{SOURCE4} > mandrake/%{name}.logrotate %build #export WANT_AUTOCONF_2_5=1 #libtoolize --copy --force; aclocal; autoconf %serverbuild %configure2_5x \ --with-gnu-ld \ --with-threads \ --with-thread-pool \ --with-system-libtool \ --libdir=%{_libdir}/%{name} \ --libexecdir=%{_libdir}/%{name} \ --localstatedir=%{_var} \ --with-logdir=%{_var}/log/radius \ --disable-ltdl-install \ --with-ltdl-lib=%{_libdir} \ --with-ltdl-include=%{_includedir} \ --with-radacctdir=%{_var}/log/radius/radacct \ --with-raddbdir=%{_sysconfdir}/raddb \ --with-snmp \ --with-static-modules="" \ --with-experimental-modules \ # dirty trick to allow build rlm_ldap %__cp %{_libdir}/liblber.la src/modules/rlm_ldap %__cp %{_libdir}/libsasl2.la src/modules/rlm_ldap make %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %__install -d %{buildroot}%{_sysconfdir}/logrotate.d %__install -d %{buildroot}%{_sysconfdir}/pam.d %__install -d %{buildroot}%{_initrddir} %__install -d %{buildroot}/var/run/radiusd %__install -d %{buildroot}%{_includedir}/%{name} make install R=%{buildroot} # install headers %__install -m0644 src/include/* %{buildroot}%{_includedir}/%{name}/ # install mandrake scripts and stuff... %__install -m0644 mandrake/%{name}.pam %{buildroot}%{_sysconfdir}/pam.d/radiusd %__install -m0644 mandrake/%{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/radiusd %__install -m0755 mandrake/%{name}.init %{buildroot}%{_initrddir}/radiusd # put the mibs in place %__install -d %{buildroot}%{_datadir}/snmp/mibs %__install -m0644 mibs/GNOME* mibs/RADIUS* %{buildroot}%{_datadir}/snmp/mibs/ # fix ghostfiles touch %{buildroot}/var/log/radius/radutmp touch %{buildroot}/var/log/radius/radwtmp touch %{buildroot}/var/log/radius/radius.log # remove unneeded stuff %__rm -f %{buildroot}%{_sbindir}/rc.radiusd %__rm -f %{buildroot}%{_sysconfdir}/raddb/mssql.conf %__rm -f %{buildroot}%{_sysconfdir}/raddb/oraclesql.conf # remove faulty perl file... %__rm -f %{buildroot}%{_libdir}/%{name}/rlm_perl.a # this annoying file gets installed on ML9.0, remove it... %__rm -f %{buildroot}%{_sysconfdir}/raddb/Makefile # include more docs %__cp src/modules/rlm_sql/README README.sql %__cp src/modules/rlm_cram/Readme Readme.cram %__cp src/modules/rlm_cram/Standard.draft . %__cp src/modules/rlm_cram/dictionary.sandy . %__cp src/modules/rlm_smb/README README.smb # put specific docs and files where they belong (prepare for doc inclusion) %__cp src/modules/rlm_sql/drivers/rlm_sql_postgresql/db_postgresql.sql . %__cp src/modules/rlm_sql/drivers/rlm_sql_mysql/db_mysql.sql . %__cp doc/rlm_krb5 . %__cp doc/RADIUS-LDAP.schema . %__cp doc/RADIUS-LDAPv3.schema . %__cp doc/rlm_ldap . # fix the naming of the sql.conf file %__mv %{buildroot}%{_sysconfdir}/raddb/sql.conf %{buildroot}%{_sysconfdir}/raddb/mysql.conf %pre %_pre_useradd radius /var/log/radius/radacct /bin/false %post %_post_service radiusd %create_ghostfile /var/log/radius/radutmp radius radius 0644 %create_ghostfile /var/log/radius/radwtmp radius radius 0644 %create_ghostfile /var/log/radius/radius.log radius radius 0644 %preun %_preun_service radiusd %postun %_postun_userdel radius %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc doc COPYRIGHT CREDITS INSTALL LICENSE README %doc README.sql README.smb Readme.cram Standard.draft dictionary.sandy %attr(0755,radius,radius) %dir %{_sysconfdir}/raddb %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/pam.d/radiusd %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/radiusd %config(noreplace) %attr(0755,root,root) %{_initrddir}/radiusd %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/acct_users %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/attrs %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/dictionary* %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/experimental.conf %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/example.pl %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/hints %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/huntgroups %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/naslist #%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/persistent.pl %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/radiusd.conf %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/realms %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/x99.conf %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/clients %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/clients.conf %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/naspasswd %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/preproxy_users %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/proxy.conf %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/snmp.conf %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/users %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/x99passwd.sample %{_bindir}/rad* %{_bindir}/rlm_* %{_bindir}/smbencrypt %{_sbindir}/check* %{_sbindir}/rad* # these belong to their respective sub package %exclude %{_libdir}/%{name}/rlm_sql_mysql* %exclude %{_libdir}/%{name}/rlm_sql_postgresql* %exclude %{_libdir}/%{name}/rlm_sql_unixodbc* %exclude %{_libdir}/%{name}/rlm_krb5* %exclude %{_libdir}/%{name}/rlm_ldap* %{_libdir}/%{name}/libradius*.so %{_libdir}/%{name}/rlm_*.so %attr(0755,radius,radius) %dir /var/log/radius %attr(0755,radius,radius) %dir /var/log/radius/radacct %attr(0755,radius,radius) %dir /var/run/radiusd %attr(0644,radius,radius) %ghost /var/log/radius/radutmp %attr(0644,radius,radius) %ghost /var/log/radius/radwtmp %attr(0644,radius,radius) %ghost /var/log/radius/radius.log %attr(0644,root,root) %{_datadir}/snmp/mibs/* %{_datadir}/freeradius %attr(0644,root,root) %{_mandir}/man*/* %files krb5 %defattr(-,root,root) %doc rlm_krb5 %{_libdir}/%{name}/rlm_krb5*.so* %files ldap %defattr(-,root,root) %doc RADIUS-LDAP.schema RADIUS-LDAPv3.schema rlm_ldap %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/ldap.attrmap %{_libdir}/%{name}/rlm_ldap*.so* %files postgresql %defattr(-,root,root) %doc db_postgresql.sql %doc src/billing %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/postgresql.conf %{_libdir}/%{name}/rlm_sql_postgresql*.so* %files mysql %defattr(-,root,root) %doc db_mysql.sql %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/mysql.conf %{_libdir}/%{name}/rlm_sql_mysql*.so* %files unixODBC %defattr(-,root,root) %{_libdir}/%{name}/rlm_sql_unixodbc*.so* %files devel %defattr(-,root,root) %doc todo %{_includedir}/%{name} %{_libdir}/%{name}/*.a %{_libdir}/%{name}/libradius*.la %{_libdir}/%{name}/rlm_*.la %changelog * Tue Mar 2 2004 Tibor Pittich <Tibor.Pittich@mandrake.org> 0.9.3-5mdk - rebuild only to increase number of package in changelog * Sun Feb 22 2004 Tibor Pittich <Tibor.Pittich@mandrake.org> 0.9.3-1mdk - updated to 0.9.3 - fixed previous changelog version mismatch (thanks to Bill Randle) - freeradius requires openldap2-devel/libs and sasl2-devel/libs - some macroszification in configure stage - remove duplicate --with-system-libtool from configure macro - remove --enable-developer from configure macro, we are users :) - added dirty trick to allow build rlm_ldap; somewhere is problem caused that libtool only here can't find liblber.la and libsasl2.la - /var/log/radius as --with-logdir - some cleanup * Fri Jan 30 2004 Tibor Pittich <Tibor.Pittich@mandrake.org> 0.9.2-3mdk - fixed freeradius-mysql and freeradius-unixODBC packages to really include so library not only symlink * Thu Oct 23 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.9.2-2mdk - fix pid file location (duh!) - lib64 fix in S2 * Mon Oct 20 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.9.2-1mdk - 0.9.2 - fix P0 - drop P1, it's included - merge rh patches (P2 & P5) - fix invalid-build-requires - fix explicit-lib-dependency - misc spec file fixes * Sat Jul 26 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 0.8.1-4mdk - rebuild against new kerberos - use system com_err.h header (P4) * Wed Jul 16 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.8.1-3mdk - rebuilt against new openldap, sasl2, etc. * Sun Jun 29 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.8.1-2mdk - added P1 from CVS to enable build against new PostgreSQL libs - use macros - added missing files - might as well enable the "experimental-modules" - don't link against db2 - added P2 by RH to make it load modules without la files - updated P0 - put correct attributes on the files in %{_sysconfdir}/raddb/ - the %{_sysconfdir}/raddb dir has to be owned by the radius user - misc spec file fixes * Sun Mar 02 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.8.1-1mdk - initial cooker contrib - used microscopic parts of the provided spec file and debian conf - don't pack the web gui, it will be a separate package, if ever - great thanks to Jim Tarvid at LSNet for testing!