%define name mod_auth_radius %define version 1.5.7 %define apache_version 1.3.33 %define release 3mdk Summary: Apache authentication via Radius Name: %{name} Version: %{version} Release: %{release} Group: System/Servers License: Apache License URL: http://www.freeradius.org Source0: ftp://ftp.freeradius.org/pub/radius/mod_auth_radius-%{version}.tar.bz2 Prereq: apache = %{apache_version} Prereq: apache-common >= %{apache_version} Prereq: apache-conf >= %{apache_version} BuildRequires: apache-devel BuildRoot: %{_tmppath}/%{name}-root %description With mod_auth_radius you are able to authenticate in Apache using Radius. %prep %setup -q %build %{_sbindir}/apxs -o mod_auth_radius.so -c mod_auth_radius.c %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_libdir}/apache install -m0755 mod_auth_radius.so %{buildroot}%{_libdir}/apache/ %pre #Check config file sanity if [ -e %{_sbindir}/ap13chkconfig ]; then %{_sbindir}/ap13chkconfig;fi %post if [ $1 = "1" ]; then #We're in Install mode, add module to the config files for config in %{_sysconfdir}/httpd/conf/{httpd,httpd-perl}.conf; do if [ -x %{_sbindir}/advxaddmod -a -e $config ]; then %{_sbindir}/advxaddmod $config \ extramodules/mod_auth_radius.so mod_auth_radius.c radius_module \ define=HAVE_RADIUS fi done if [ -e %{_sbindir}/ADVXctl ]; then %{_sbindir}/ADVXctl update;fi fi if [ $1 -gt 1 ]; then #We're in *upgrade mode*. Since we can't be sure the configuration files #are sane, remove module from the conf files to clean them, re-add again #in a way that the older module we're replacing won't try to erase (the #post scripts were broken on some packages), and finally clean the module #specific config file so it's compatible with the upgrade. for config in %{_sysconfdir}/httpd/conf/{httpd,httpd-perl}.conf; do if [ -x %{_sbindir}/advxdelmod -a -e $config ]; then %{_sbindir}/advxdelmod $config \ extramodules/mod_auth_radius.so mod_auth_radius.c radius_module \ define=HAVE_RADIUS $config fi if [ -x %{_sbindir}/advxaddmod -a -e $config ]; then %{_sbindir}/advxaddmod $config \ extramodules/mod_auth_radius.so mod_auth_radius.c radius_module \ define=HAVE_RADIUS fi done if [ -e %{_sbindir}/ADVXctl ]; then %{_sbindir}/ADVXctl update;fi fi %postun if [ $1 = "0" ]; then for config in %{_sysconfdir}/httpd/conf/{httpd,httpd-perl}.conf; do if [ -x %{_sbindir}/advxdelmod -a -e $config ]; then %{_sbindir}/advxdelmod $config \ extramodules/mod_auth_radius.so mod_auth_radius.c radius_module \ define=HAVE_RADIUS fi done if [ -e %{_sbindir}/ADVXctl ]; then %{_sbindir}/ADVXctl update;fi fi %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc README htaccess httpd.conf index.html %{_libdir}/apache/mod_auth_radius.so %changelog * Tue Feb 15 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1.5.7-3mdk - spec file cleanups, remove the ADVX-build stuff * Sun Nov 21 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.5.7-2mdk - built for apache 1.3.33 * Thu Jun 10 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.5.7-1mdk - 1.5.7 - built for apache 1.3.31 * Sun Nov 09 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.5.2-13mdk - built for apache 1.3.29 * Tue Sep 16 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.5.2-12mdk - rebuild with apache 1.3.28 * Thu Feb 13 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.5.2-11mdk - new macros from ADVX-build * Thu Jan 30 2003 Lenny Cartier <lenny@mandrakesoft.com> 1.5.2-10mdk - rebuild * Fri Nov 8 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.5.2-9mdk - Rebuild for Cooker * Mon Oct 28 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.5.2-8mdk - Rebuild with new apache * Wed Jun 26 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.5.2-7mdk - rebuild against new apache. * Sun May 19 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.5.2-6mdk - build with gcc 3.1. - add %%post and %%postun sections. - macroize a little more. - add BuildRequires. - quiet the setup. * Mon Apr 15 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.5.2-5mdk - Apache 1.3.24. * Mon Feb 04 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.5.2-4mdk - Rebuild against new apache. * Fri Jul 13 2001 Philippe Libat <philippe@mandrakesoft.com> 1.5.2-3mdk - recompiled for apache 1.3.20 * Tue Apr 24 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.5.2-2mdk - recompiled for apache 1.3.19 * Sat Dec 16 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.5.2-1mdk - first release * Fri Oct 20 2000 Magic Bumper <dist@conectiva.com.br> - Automatically increased release * Wed Aug 11 1999 Marcelo Tosatti <marcelo@conectiva.com> - First package - Added to Conectiva Linux