--- apache.spec	Thu Mar 29 19:24:29 2001
+++ apache-1.3.19+IPv6.spec	Thu Jun 14 23:17:07 2001
@@ -2,11 +2,12 @@
 %define apache_ver 1.3.19
 %define mod_ssl_ver 2.8.1
 %define mm_ver 1.1.3
+%define ipv6patch apache-1.3.19-v6-20010309a.diff.gz
 
 Summary: The most widely used web server on the Internet.
 Name: apache
 Version: %{apache_ver}
-Release: 5
+Release: 5+IPv6
 Group: System Environment/Daemons
 Source: ftp://ftp.apache.org/apache/dist/apache_%{version}.tar.gz
 Source1: ftp://ftp.modssl.org/source/mod_ssl-%{mod_ssl_ver}-%{apache_ver}.tar.gz
@@ -22,18 +23,17 @@
 Source11: apache-srm.conf
 Source12: ftp://ftp.cohprog.com/pub/apache/module/1.3.0/mod_bandwidth.c
 Source13: mod_put.c
-Source14: SSL-Certificate-Creation
 Patch0: apache_1.3.14-redhat.patch
 Patch1: apache-1.3.11-apxs.patch
 Patch2: apache_1.3.14-phhttpd-eapi.patch
 Patch3: apache_1.3.12-piranha.patch
-Patch4: mod_ssl-2.6.4-tty.patch
 Patch5: apache_1.3.14-glibc22.patch
 Patch6: apache_1.3.19-fpic.patch
 Patch7: apache_1.3.14-mkstemp.patch
+Patch8: ftp://ftp.kame.net/pub/kame/misc/%{ipv6patch}
 License: Apache Group License
 BuildRoot: %{_tmppath}/apache-root
-BuildPrereq: db3-devel, findutils, openssl-devel, perl
+BuildPrereq: db3-devel, findutils, perl
 Requires: /etc/mime.types, gawk, file, /usr/bin/find
 Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv, /bin/sed, mailcap, grep
 Prereq: textutils, /usr/sbin/useradd
@@ -44,18 +44,7 @@
 Apache is a powerful, full-featured, efficient and freely-available
 web server. Apache is also the most popular web server on the
 Internet.
-
-%package -n mod_ssl
-Group: System Environment/Daemons
-Version: %{mod_ssl_ver}
-Summary: Cryptography support for the Apache web server.
-Requires: apache = %{apache_ver}-%{release}
-Prereq: openssl, dev
-
-%description -n mod_ssl
-The mod_ssl module provides strong cryptography for the Apache web
-server via the Secure Sockets Layer (SSL) and Transport Layer Security
-(TLS) protocols.
+IPv6-enabled by Peter Bieringer <pb@bieringer.de> using the KAME diff
 
 %package devel
 Version: %{apache_ver}
@@ -93,21 +82,16 @@
 %configure --disable-shared
 popd
 
-pushd mod_ssl-%{mod_ssl_ver}-%{apache_ver}
-%configure --with-apache=`cd ..;pwd` --with-mm=$EAPI_MM
-popd
-
 %patch0 -p1 -b .redhat
 %patch1 -p1 -b .apxs
-%patch2 -p1 -b .phttpd-eapi
 %patch3 -p1 -b .piranha
-pushd mod_ssl-%{mod_ssl_ver}-%{apache_ver}
-%patch4 -p2 -b .tty
-popd
 %patch5 -p1 -b .glibc22
 %patch6 -p1 -b .fpic
 %patch7 -p1 -b .mkstemp
 
+# Patch8
+gzip -cd $RPM_SOURCE_DIR/%{ipv6patch} | patch -p1 --fuzz=3
+
 %build
 EAPI_MM=`pwd`/mm-%{mm_ver} ; export EAPI_MM
 
@@ -117,6 +101,7 @@
 popd
 
 ./configure \
+	--enable-rule=INET6 \
  	--prefix=%{_prefix} \
  	--exec-prefix=%{_prefix} \
  	--bindir=%{_bindir} \
@@ -138,8 +123,6 @@
 	--activate-module=src/modules/throttle/mod_throttle.o \
 	--enable-module=all \
 	--enable-shared=max \
-	--enable-shared=ssl \
-	--enable-rule=EAPI \
 	--disable-rule=WANTHSREGEX \
 	--enable-module=auth_dbm \
 	--with-perl=%{__perl} \
@@ -195,13 +178,6 @@
 install -m644 $RPM_SOURCE_DIR/apache-srm.conf \
 	$RPM_BUILD_ROOT/etc/httpd/conf/srm.conf
 
-# Remove default keys and certs, install docs, and point to the right makefile.
-mkdir -p $RPM_BUILD_ROOT%{contentdir}/html/manual/mod/mod_ssl/
-install -m644 mod_ssl-%{mod_ssl_ver}-%{apache_ver}/pkg.ssldoc/*.{html,gif,jpg} \
-	$RPM_BUILD_ROOT%{contentdir}/html/manual/mod/mod_ssl/
-rm -f $RPM_BUILD_ROOT/etc/httpd/conf/ssl.*/server.*
-ln -s ../../../usr/share/ssl/certs/Makefile $RPM_BUILD_ROOT/etc/httpd/conf
-
 # install apache source code for devel package
 #mkdir -p $RPM_BUILD_ROOT/usr/src
 #tar xzf $RPM_SOURCE_DIR/apache_%{version}.tar.gz -C $RPM_BUILD_ROOT/usr/src
@@ -219,9 +195,6 @@
 sed "s^$RPM_BUILD_ROOT^^g" $RPM_BUILD_ROOT%{_sbindir}/apxs > apxs.tmp && \
 cat apxs.tmp > $RPM_BUILD_ROOT%{_sbindir}/apxs
 
-# create a prototype session cache
-touch $RPM_BUILD_ROOT%{_localstatedir}/cache/ssl_gcache_data.{dir,pag,sem}
-
 # fixup the documentation file naming
 find $RPM_BUILD_ROOT%{contentdir} -name "*.html.html" | xargs rename .html.html .html
 
@@ -326,40 +299,14 @@
 %{_sbindir}/apxs
 %{_mandir}/man8/apxs.8*
 
-%post -n mod_ssl
-/sbin/ldconfig
-umask 077
-
-if [ ! -f %{_sysconfdir}/httpd/conf/ssl.key/server.key ] ; then
-%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/httpd/conf/ssl.key/server.key 2> /dev/null
-fi
-
-if [ ! -f %{_sysconfdir}/httpd/conf/ssl.crt/server.crt ] ; then
-cat << EOF | %{_bindir}/openssl req -new -key %{_sysconfdir}/httpd/conf/ssl.key/server.key -x509 -days 365 -out %{_sysconfdir}/httpd/conf/ssl.crt/server.crt 2>/dev/null
---
-SomeState
-SomeCity
-SomeOrganization
-SomeOrganizationalUnit
-localhost.localdomain
-root@localhost.localdomain
-EOF
-fi
-
-%files -n mod_ssl
 %defattr(-,root,root)
-%doc $RPM_SOURCE_DIR/SSL-Certificate-Creation
-%{contentdir}/html/manual/mod/mod_ssl/
-%{_libdir}/apache/libssl.so
-%{_sysconfdir}/httpd/conf/Makefile
-%attr(0700,root,root) %dir %{_sysconfdir}/httpd/conf/ssl.*
-%attr(0600,apache,root) %ghost %{_localstatedir}/cache/ssl_gcache_data.dir
-%attr(0600,apache,root) %ghost %{_localstatedir}/cache/ssl_gcache_data.pag
-%attr(0600,apache,root) %ghost %{_localstatedir}/cache/ssl_gcache_data.sem
 %dir %{_sysconfdir}/httpd
-%{_sysconfdir}/httpd/conf/ssl.*/*
   
 %changelog
+* Thu Jun 14 2001 Peter Bieringer <pb@bieringer.de>
+- IPv6-enabled using the KAME diff
+- disable RH 7.1 original patches: eapi+phhttpd and SSL because of interferences
+
 * Thu Mar 29 2001 Nalin Dahyabhai <nalin@redhat.com>
 - run initlog without -q in the init script, so that mod_ssl can actually
   prompt for pass phrases properly
