%define mm_major 1 %define mm_minor 1.3 %define apache_version 1.3.23 %define sysconfdir /etc %define apachecontent /var/www/html %define apachebase %{sysconfdir}/httpd %define apacheroot /var/www %define oldapacheroot /home/httpd %define apachelogs /var/log Summary: Gzip compression module for apache Name: mod_gzip Version: 1.3.19.1a Release: 8mdk Group: System/Servers URL: http://www.remotecommunications.com/apache/mod_gzip Source0: http://www.remotecommunications.com/apache/mod_gzip/src/1.3.19.1a/mod_gzip.c.gz Source1: mod_gzip.html Source2: mod_gzip.conf Source3: changes.txt.mod_gzip License: Apache License Prereq: apache = %{apache_version} Prereq: apache-common = %{apache_version} Prereq: apache-conf = %{apache_version} Prereq: mm = %{mm_major}.%{mm_minor} BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildRequires: apache = %{apache_version} BuildRequires: apache-devel = %{apache_version} BuildRequires: zlib-devel %description mod_gzip is an Internet Content Acceleration module for the popular Apache Web Server. mod_gzip is being offered free to the public by HyperSpace Communications, Inc. There are no forms to fill out, no demographic information required, no emails to wait for and no runtime passwords. All you have to do is download the right version for your platform ( See below ). It is a complete working version of the product fully tested and ready to fulfill your Internet Acceleration needs. mod_gzip uses the well established and publicly available IETF ( Internet Engineering Task Force ) Content-Encoding standards in conjunction with publicy available GZIP compression libraries such as ZLIB ( Copyright © 1995-1998 Jean-loup Gailly and Mark Adler ) to deliver dynamically compressed content 'on the fly' to any browser or user-agent that is capable of receiving it. It is a software based solution that runs perfectly in conjunction with any Apache Web Server on both UNIX and Win32 platforms. No additional client side software is required to use this product. mod_gzip does not require ANY software to be installed on the client side. There is no accompanying 'Plug-in' or 'Client Proxy' of any kind. All you need is your current HTTP 1.1 compliant browser. All modern browsers released since early 1999 are already capable of receiving compressed Internet content via standard IETF Content Encoding if they are HTTP 1.1 compliant. If standard IETF Content Encoding is what you need to accelerate your Apache Web Server, reduce your CPU load, and deliver 75-80 percent less data with no loss of content to your users at all times then look no farther. HSC's mod_gzip is all that you need. mod_gzip is available for all Windows and UNIX based platforms supported by the Apache Web Server %prep %build zcat %{SOURCE0} >./mod_gzip.c %{_sbindir}/apxs -I%{_includedir} -L%{_libdir} \ -lz -c mod_gzip.c %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_libdir}/apache-extramodules install -m 755 mod_gzip.so \ $RPM_BUILD_ROOT%{_libdir}/apache-extramodules mkdir -p $RPM_BUILD_ROOT%{apachecontent}/addon-modules cp %{SOURCE1} $RPM_BUILD_ROOT%{apachecontent}/addon-modules mkdir -p $RPM_BUILD_ROOT%{apachebase}/conf cp %{SOURCE2} $RPM_BUILD_ROOT%{apachebase}/conf cp %{SOURCE3} ./changes.txt %post if [ $1 = "1" ]; then #We're in Install mode, add module to the config files for config in %{apachebase}/conf/{httpd,httpd-perl}.conf; do if [ -x %{_sbindir}/advxaddmod -a -e $config ]; then %{_sbindir}/advxaddmod $config \ extramodules/mod_gzip.so mod_gzip.c gzip_module \ define=HAVE_GZIP addconf=conf/mod_gzip.conf fi done if [ -x %{_sbindir}/AESctl ]; then %{_sbindir}/AESctl 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 %{apachebase}/conf/{httpd,httpd-perl}.conf; do if [ -x %{_sbindir}/advxdelmod -a -e $config ]; then %{_sbindir}/advxdelmod $config \ extramodules/mod_gzip.so mod_gzip.c gzip_module \ define=HAVE_GZIP addconf=conf/mod_gzip.conf $config fi if [ -x %{_sbindir}/advxaddmod -a -e $config ]; then %{_sbindir}/advxaddmod $config \ extramodules/mod_gzip.so mod_gzip.c gzip_module \ define=HAVE_GZIP addconf=conf/mod_gzip.conf fi done if [ -x %{_sbindir}/AESctl ]; then %{_sbindir}/AESctl update; fi fi %postun if [ $1 = "0" ]; then for config in %{apachebase}/conf/{httpd,httpd-perl}.conf; do if [ -x %{_sbindir}/advxdelmod -a -e $config ]; then %{_sbindir}/advxdelmod $config \ extramodules/mod_gzip.so mod_gzip.c gzip_module \ define=HAVE_GZIP addconf=conf/mod_gzip.conf fi done if [ -x %{_sbindir}/AESctl ]; then %{_sbindir}/AESctl update;fi fi %files %defattr(-,root,root) %doc changes.txt %{apachecontent}/addon-modules/* %{_libdir}/apache-extramodules/mod_gzip.so %config(noreplace) %{apachebase}/conf/mod_gzip.conf %clean rm -rf $RPM_BUILD_ROOT %changelog * Mon Mar 04 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.3.19.1a-8mdk - Tested with all mod_* to be sure there is no problem * Mon Feb 04 2002 Christian Belisle <cbelisle@mandrakesoft.com> 1.3.19.1a-7mdk - Rebuild against latest apache. * Thu Nov 22 2001 Christian Belisle <cbelisle@mandrakesoft.com> 1.3.19.1a-6mdk - rebuild to fix invalid-packager warning (rpmlint) * Thu Oct 18 2001 Stefan van der Eijk <stefan@eijk.nu> 1.3.19.1a-5mdk - BuildRequires: zlib-devel * Tue Oct 16 2001 Christian Belisle <cbelisle@mandrakesoft.com> 1.3.19.1a-4mdk - apache 1.3.22. * Thu Oct 11 2001 Christian Belisle <cbelisle@mandrakesoft.com> 1.3.19.1a-3mdk - specify the config file - make rpmlint happier * Thu Jul 12 2001 Philippe Libat <philippe@mandrakesoft.com> 1.3.19.1a-2mdk - new apache * Mon Apr 16 2001 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.3.19.1a-1mdk - Created this RPM since a lot of people want it, and that Gael gave up ;-)