Sophie

Sophie

distrib > Mandriva > 10.0-com > x86_64 > by-pkgid > 2bad6ecd3ee0a4432016e55e8222c774 > files > 1

mod_sxnet-1.2.4-25mdk.src.rpm

#New ADVX macros
%define ADVXdir %{_datadir}/ADVX
%{expand:%(cat %{ADVXdir}/ADVX-build)}

%{expand:%%define apache_version %(rpm -q apache-devel|sed 's/apache-devel-\([0-9].*\)-.*$/\1/')}
%{expand:%%define apache_release %(rpm -q apache-devel|sed 's/apache-devel-[0-9].*-\(.*\)$/\1/')}

%{expand:%%define mm_major %(mm-config --version|sed 's/MM \([0-9]\)\.\([0-9.].*\) \(.*\)$/\1/')}
%{expand:%%define mm_minor %(mm-config --version|sed 's/MM \([0-9]\)\.\([0-9.].*\) \(.*\)$/\2/')}
%define mm_version %{mm_major}.%{mm_minor}

%define version 1.2.4
%define release 25mdk

Summary: Strong Extranet module for mod_ssl and apache
Name: mod_sxnet
Version: %{version}
Release: %{release}
Group: System/Servers
URL: http://www.thawte.com
Source0: ftp://ftp.thawte.com/pub/sxnet/sxnet-%{version}.tar.bz2
Source1: sxnet.html
Patch:	sxnet-register.patch.bz2
License: BSD-Style
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot

Prereq: apache = %{apache_version}
Prereq:	apache-common >= %{apache_version}
Prereq:	apache-conf >= %{apache_version}
Prereq: mm = %{mm_major}.%{mm_minor}

Prereq:	mod_ssl
Provides: mod_ssl-sxnet
Obsoletes: mod_ssl-sxnet
Provides: 	ADVXpackage
Provides:	AP13package

BuildRequires: ADVX-build >= 1.2
BuildRequires: apache-devel, openssl-devel >= 0.9.7

%description
The Strong Extranet allows you to use digital certificates to authenticate
users on your web server. Typically, your users enroll in your Strong 
Extranet, under your control, through the Thawte Personal Cert System.  

%prep
%setup -q -n sxnet
%patch -p1 

%build

cp %{SOURCE1} index.html

perl -pi -e "s/Malloc/malloc/g;" *
perl -pi -e "s/Free/free/g;" *
if [ `uname` = "SunOS" ]; then export SSLDEF="-DHAVE_CRYPT_H"; fi
%{_sbindir}/apxs -I%{_includedir}/openssl/ -L%{_libdir} \
	-l ssl -l crypto $SSLDEF -c mod_sxnet.c

%install

rm -rf %{buildroot}
mkdir -p %{buildroot}%{_libdir}/apache-extramodules
install -m 755 mod_sxnet.so \
	%{buildroot}%{_libdir}/apache-extramodules

mkdir -p %{buildroot}%{ap_webdoc}
pushd %{buildroot}%{ap_webdoc}
ln -s ../../../..%{_docdir}/mod_sxnet-%{version} mod_sxnet-%{version}
popd

%pre
#Check config file sanity
%AP13pre

%post
if [ $1 = "1" ]; then 
   #We're in Install mode, add module to the config files
   for config in %{ap_base}/conf/{httpd,httpd-perl}.conf; do
     if [ -x %{_sbindir}/advxaddmod -a -e $config ]; then
       %{_sbindir}/advxaddmod $config \
	extramodules/mod_sxnet.so mod_sxnet.c sxnet_module \
	define=HAVE_SXNET
     fi
   done
   %ADVXpost
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 %{ap_base}/conf/{httpd,httpd-perl}.conf; do
     if [ -x %{_sbindir}/advxdelmod -a -e $config ]; then
       %{_sbindir}/advxdelmod $config \
	extramodules/mod_sxnet.so mod_sxnet.c sxnet_module \
	define=HAVE_SXNET 
	$config
     fi
     if [ -x %{_sbindir}/advxaddmod -a -e $config ]; then
       %{_sbindir}/advxaddmod $config \
	extramodules/mod_sxnet.so mod_sxnet.c sxnet_module \
	define=HAVE_SXNET 
     fi
   done
   %ADVXpost
fi

%postun
if [ $1 = "0" ]; then 
   for config in %{ap_base}/conf/{httpd,httpd-perl}.conf; do
     if [ -x %{_sbindir}/advxdelmod -a -e $config ]; then
       %{_sbindir}/advxdelmod $config \
	extramodules/mod_sxnet.so mod_sxnet.c sxnet_module \
	define=HAVE_SXNET
     fi
   done
   %ADVXpost
fi

%files
%defattr(-,root,root)
%{ap_webdoc}/*
%doc CHANGES COPYRIGHT LICENCE index.html
%{_libdir}/apache-extramodules/mod_sxnet.so

%clean
rm -rf %{buildroot}

%changelog
* Sun Nov 09 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.2.4-25mdk
- built for apache 1.3.29

* Mon Sep 15 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.2.4-24mdk
- rebuild

* Mon Aug 04 2003 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.2.4-23mdk
- rebuild

* Thu Feb 13 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.2.4-22mdk
- new macros from ADVX-build

* Sat Jan 18 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.2.4-21mdk
- rebuilt for new openssl

* Mon Jan 06 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.2.4-20mdk
- rebuilt for new mm version
- Add Provides: ADVXpackage, all ADVX package will have this tag, 
  so we can easily do a rpm --whatprovides ADVXpackage to find out
  what ADVX packages a user has installed on his system. 

* Fri Nov  8 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.2.4-19mdk
- Rebuild for Cooker

* Mon Oct 28 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.2.4-18mdk
- Rebuild with new apache

* Fri Aug 16 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.2.4-17mdk
- rebuild against latest openssl.

* Mon Aug 12 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.2.4-16mdk
- rebuild against latest openssl.

* Tue Jul  9 2002 Pixel <pixel@mandrakesoft.com> 1.2.4-15mdk
- rebuild (so that it builds with "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64")
  => fix segfault

* Wed Jun 26 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.2.4-14mdk
- rebuild against new apache.

* Sat May 18 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.2.4-13mdk
- build with gcc 3.1.
- build against new openssl.
- macroize a little more.
- remove macros in BuildRequires.

* Mon Apr 15 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.2.4-12mdk
- Apache 1.3.24.
- Update OpenSSL version in BuildRequires.

* Mon Mar 02 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.2.4-11mdk
- Register module so we know it's loading or not

* Mon Mar 02 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.2.4-10mdk
- Rebuilt against new mod_ssl

* Mon Feb 04 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.2.4-9mdk
- Rebuild against latest apache.

* Thu Nov 22 2001 Christian Belisle <cbelisle@mandrakesoft.com> 1.2.4-8mdk
- Fix invalid-packager and no-url warning (rpmlint).

* Tue Oct 16 2001 Christian Belisle <cbelisle@mandrakesoft.com> 1.2.4-7mdk
- apache 1.3.22.

* Thu Oct 12 2001 Stefan van der Eijk <stefan@eijk.nu> 1.2.4-6mdk
- BuildRequires: openssl --> openssl-devel

* Tue Sep 11 2001 Christian Belisle <cbelisle@mandrakesoft.com> 1.2.4-5mdk
- Provides the Obsoletes for compatibility.

* Thu Sep 06 2001 Christian Belisle <cbelisle@mandrakesoft.com> 1.2.4-4mdk
- rebuild against last mod_ssl.

* Thu Jul 12 2001 Philippe Libat <philippe@mandrakesoft.com> 1.2.4-3mdk
- fix spec translation

* Thu Jul 12 2001 Philippe Libat <philippe@mandrakesoft.com> 1.2.4-2mdk
- new apache

* Sat Apr 14 2001 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.2.4-1mdk
- Split package from mod_ssl spec, since Thawte are now supplying a module
  that adds documentation.