]> git.pld-linux.org Git - packages/apache.git/blobdiff - apache.spec
- new IPv6 patches from KAME and Japan Linux IPv6 Users Group
[packages/apache.git] / apache.spec
index e57c809aafb4f4543693fba41e6e013a4f23f945..c7f8534b40eef68f6d5a482c347430207dc28ccd 100644 (file)
@@ -4,31 +4,40 @@ Summary(fr):  Serveur Web leader du march
 Summary(pl):   Serwer WWW (World Wide Web) ze wsparciem dla IPv6
 Summary(tr):   Lider WWW tarayýcý
 Name:          apache
-Version:       1.3.6
-Release:       2
+Version:       1.3.9
+Release:       5
 Group:         Networking/Daemons
-Group(pl):     Sieci/Demony
+Group(pl):     Sieciowe/Serwery
 Source0:       ftp://ftp.apache.org/apache/dist/%{name}_%{version}.tar.gz
 Source1:       apache.init
-Source2:       %{name}.logrotate
-Source3:       %{name}-extra1.tar.bz2
-########       http://stonecold.unity.ncsu.edu/software/mod_auth_kerb
-#Source5:      mod_auth_kerb-4.3.tar.gz
-Source6:       apache_1.3.6.tar.gz.asc
-Source7:       apache_1.3.6.tar.gz.md5
+Source2:       apache.logrotate
+Source3:       apache-extra1.tar.bz2
 Source8:       apache.sysconfig
-Patch0:                %{name}-suexec.patch
-Patch1:                %{name}_1.3.6.ipv6.patch
-Patch2:                %{name}-htdocs.patch
-Patch3:                %{name}-release.patch
+Patch0:                apache-suexec.patch
+Patch1:                ftp://ftp.kame.net/pub/kame/misc/apache-139-v6-19991013a.diff.gz
+Patch2:                ftp://ftp.nemoto.ecei.tohoku.ac.jp/pub/Net/IPv6/Patches/apache-139-v6-19991013a.new4.patch.gz
+Patch3:                ftp://ftp.nemoto.ecei.tohoku.ac.jp/pub/Net/IPv6/Patches/apache-139-v6-19991013a.new4_to_4.1.patch
+Patch4:                apache-htdocs.patch
+Patch5:                apache-release.patch
+Patch6:                apache-pld.patch
 Copyright:     BSD-like
-Obsoletes:     apache-extra
-Obsoletes:     apache6
 Provides:      httpd
 Provides:      webserver
 Prereq:                /sbin/chkconfig
+Prereq:                /usr/sbin/useradd
+Prereq:                /usr/bin/getgid
+Prereq:                /usr/bin/id
+Prereq:                sh-utils
+Requires:      rc-scripts
 URL:           http://www.apache.org/
 BuildRoot:     /tmp/%{name}-%{version}-root
+Obsoletes:     apache-extra
+Obsoletes:     apache6
+
+%define                _sysconfdir     /etc/httpd
+%define                _includedir     %{_prefix}/include/apache
+%define                _datadir        /home/httpd
+%define                _libexecdir     %{_prefix}/lib/apache
 
 %description
 Apache is a full featured web server that is freely available, and also
@@ -50,11 +59,11 @@ konfigurowanie serwer
 %description -l tr
 Apache serbest daðýtýlan ve çok kullanýlan yetenekli bir web sunucusudur.
 
-%package       suexec
+%package suexec
 Summary:       Apache suexec wrapper
 Summary(pl):   Suexec wrapper do serwera www Apache
 Group:         Networking/Development
-Group(pl):     Sieci/Programowanie
+Group(pl):     Sieciowe/Programowanie
 Requires:      %{name} = %{version}
 
 %description suexec
@@ -68,11 +77,11 @@ SuEXEC umo
 UID ni¿ wywo³uj±cy je serwer. Normalnie programy CGI i SSI s± wykonywane
 jako taki sam u¿ytkownik jak serwer WWW.
 
-%package       devel
+%package devel
 Summary:       Apache include files
 Summary(pl):   Pliki nag³ówkowe do serwera www Apache
 Group:         Networking/Development
-Group(pl):     Sieci/Programowanie
+Group(pl):     Sieciowe/Programowanie
 Requires:      %{name} = %{version}
 
 %description devel
@@ -81,19 +90,18 @@ Apache include files.
 %description -l pl devel
 Pliki nag³ówkowe dla serwera WWW Apache.
 
-%package       doc
+%package doc
 Summary:       Apache dokumentation
 Summary(pl):   Dokumentacja do Apache
 Group:         Documentation
 Group(pl):     Dokumentacja
 Requires:      %{name} = %{version}
-URL:           http://www.apache.org/
 
 %description doc
 Documentation for apache in HTML format.
 
 %description -l pl doc
-Dokumentacja do Apache w formacie HTML
+Dokumentacja do Apache w formacie HTML.
 
 %prep 
 %setup -q -n apache_%{version} -a3
@@ -101,17 +109,23 @@ Dokumentacja do Apache w formacie HTML
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
 
 %build
-OPTIM=$RPM_OPT_FLAGS LDFLAGS=-s\
-    ./configure \
+OPTIM="$RPM_OPT_FLAGS" LDFLAGS="-s" \
+./configure \
        --prefix=%{_prefix} \
-       --sysconfdir=/etc/httpd \
-       --datadir=/home/httpd \
-       --libexecdir=/usr/lib/apache \
+       --sysconfdir=%{_sysconfdir} \
+       --includedir=%{_includedir} \
+       --sbindir=%{_sbindir} \
+       --libexecdir=%{_libexecdir} \
+       --datadir=%{_datadir} \
        --localstatedir=/var \
        --runtimedir=/var/run \
        --logfiledir=/var/log/httpd \
+       --with-layout=PLD \
        --without-confadjust \
        --enable-module=all \
        --enable-shared=max \
@@ -121,9 +135,8 @@ OPTIM=$RPM_OPT_FLAGS LDFLAGS=-s\
        --suexec-caller=http \
        --suexec-uidmin=500 \
        --suexec-gidmin=500 \
-       --sbindir=%{_sbindir} \
-       --includedir=%{_includedir}/apache \
-       --enable-rule=INET6 
+       --enable-rule=INET6 \
+       --disable-rule=WANTHSREGEX
 make
 
 %install
@@ -131,77 +144,107 @@ rm -rf $RPM_BUILD_ROOT
 
 make install-quiet root="$RPM_BUILD_ROOT"
 
-mv $RPM_BUILD_ROOT/home/httpd/htdocs $RPM_BUILD_ROOT/home/httpd/html
+#mv $RPM_BUILD_ROOT%{_datadir}/htdocs $RPM_BUILD_ROOT%{_datadir}/html
 
-install -d $RPM_BUILD_ROOT/etc/{httpd,logrotate.d,rc.d/init.d,sysconfig}
-install -d $RPM_BUILD_ROOT/home/httpd/{html/manual,icons,cgi-bin}
-install -d $RPM_BUILD_ROOT/{usr/{lib/apache,sbin,share,man/man{1,8}},var/log/httpd}
+install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
+       $RPM_BUILD_ROOT/var/log/httpd
 
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/apache
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd
 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/apache
 
-install -d $RPM_BUILD_ROOT%{_includedir}/apache
-
-rm -f $RPM_BUILD_ROOT/etc/httpd/*
-rm -f $RPM_BUILD_ROOT/home/httpd/html/manual/expand.pl
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*
 
 touch $RPM_BUILD_ROOT/var/log/httpd/{access,error,agent,referer}_log
 
-cp -a apache-extra/errordocs   $RPM_BUILD_ROOT/home/httpd/
-cp -a apache-extra/icons/*     $RPM_BUILD_ROOT/home/httpd/icons
-cp -a apache-extra/*.conf      $RPM_BUILD_ROOT/etc/httpd
-cp -a apache-extra/m*          $RPM_BUILD_ROOT/etc/httpd
-
-mv $RPM_BUILD_ROOT/usr/man $RPM_BUILD_ROOT%{_mandir}
-
-strip $RPM_BUILD_ROOT/usr/lib/apache/*
+cp -a apache-extra/errordocs   $RPM_BUILD_ROOT%{_datadir}/
+cp -a apache-extra/icons/*     $RPM_BUILD_ROOT%{_datadir}/icons
+cp -a apache-extra/*.conf      $RPM_BUILD_ROOT%{_sysconfdir}
+cp -a apache-extra/m*          $RPM_BUILD_ROOT%{_sysconfdir}
+
+strip $RPM_BUILD_ROOT%{_libexecdir}/* || :
+
+gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
+       ABOUT_APACHE src/CHANGES KEYS README README.v6
+
+%pre
+if [ -n "`getgid http`" ]; then
+       if [ "`getgid http`" != "51" ]; then
+               echo "Warning: group http haven't gid=51. Corect this before install apache" 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/groupadd -g 51 -r -f http
+       if [ -f /var/db/group.db ]; then
+               /usr/bin/update-db 1>&2
+       fi
+fi
+if [ -n "`id -u http 2>/dev/null`" ]; then
+       if [ "`id -u http`" != "51" ]; then
+               echo "Warning: user http haven't uid=51. Corect this before install apache" 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
+       if [ -f /var/db/passwd.db ]; then
+               /usr/bin/update-db 1>&2
+       fi
+fi
 
-gzip -9nf $RPM_BUILD_ROOT%{_mandir}/{man{1,8}/*}
-gzip -9nf ABOUT_APACHE src/CHANGES KEYS README README.v6
-
-%clean
-rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add httpd
-   if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart >&2
-   fi
+umask 137
+touch /var/log/httpd/{access,error,agent,referer}_log
+if [ -f /var/lock/subsys/httpd ]; then
+       /etc/rc.d/init.d/httpd restart 1>&2
+fi
 
 %preun
-if [ $1 = 0 ]; then
-   if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd stop >&2
-   fi
-   /sbin/chkconfig --del httpd
+if [ "$1" = "0" ]; then
+       if [ -f /var/lock/subsys/httpd ]; then
+               /etc/rc.d/init.d/httpd stop 1>&2
+       fi
+       /sbin/chkconfig --del httpd
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+       /usr/sbin/userdel http
+       if [ -f /var/db/passwd.db ]; then
+               /usr/bin/update-db
+       fi
+       /usr/sbin/groupdel http
+       if [ -f /var/db/group.db ]; then
+               /usr/bin/update-db
+       fi
+fi
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
 %files
 %defattr(644,root,root,755)
 %doc ABOUT_APACHE.gz src/CHANGES.gz KEYS.gz README.gz
 %doc conf/mime.types README.v6.gz
 
-%attr(750,root,root) %dir /etc/httpd
-%attr(640,root,root) %config %verify(not size mtime md5) /etc/httpd/*
+%attr(754,root,root) /etc/rc.d/init.d/*
+
+%attr(751,root,root) %dir %{_sysconfdir}
+%attr(640,root,root) %config %verify(not size mtime md5) %{_sysconfdir}/*
 %attr(640,root,root) %config %verify(not size mtime md5) /etc/sysconfig/*
 %attr(640,root,root) %config /etc/logrotate.d/*
 
-%attr(755,root,root) %dir /home/httpd/html
-
-%config(noreplace) /home/httpd/html/index.html
-
-%attr(644,root,root) /home/httpd/html/*.gif
-%attr(755,root,root) /etc/rc.d/init.d/*
-
-%attr(755,root,root) /home/httpd/cgi-bin
-%attr(755,root,root) /usr/lib/apache
-
-%attr(755,root,root) %dir /home/httpd/icons
-/home/httpd/icons/*.gif
+%attr(755,root,root) %dir %{_datadir}/html
+%config(noreplace) %{_datadir}/html/index.html
+%{_datadir}/html/*.gif
+%{_datadir}/errordocs
+%dir %{_datadir}/icons
+%{_datadir}/icons/*.gif
+%attr(755,root,root) %{_datadir}/cgi-bin
 
-%attr(755,root,root) %dir /home/httpd/errordocs
-/home/httpd/errordocs/*
+%dir %{_libexecdir}
+%attr(755,root,root) %{_libexecdir}/*
 
 %attr(755,root,root) %{_bindir}/dbmmanage 
 %attr(755,root,root) %{_bindir}/htdigest
@@ -219,115 +262,16 @@ fi
 %{_mandir}/man[18]/*
 
 %attr(750,root,root) %dir /var/log/httpd
-%attr(640,root,root) %config %verify(not size mtime md5) /var/log/httpd/*
+%attr(640,root,root) %ghost /var/log/httpd/*
 
 %files suexec
-%attr(4711,root,root) %{_sbindir}/suexec
+%attr(4755,root,root) %{_sbindir}/suexec
 
 %files devel
 %defattr(644,root,root,755) 
 
-%dir %{_includedir}/apache
-%{_includedir}/apache/*
+%{_includedir}
 
 %files doc
 %defattr(644,root,root,755)
-%attr(-,root,root) /home/httpd/html/manual
-
-%changelog
-* Wed May 26 1999 Wojtek ¦lusarczyk <wojtek@shadow.eu.org>
-  [1.3.6-2]
-- misc changes for correct build,
-- fixed apache.logrotate file,
-- apache-htdosc.patch,
-- added apache-release.patch,
-- changed confdir to /etc/httpd instead /etc/httpd/conf,
-- stripped modules & more changes,
-- added new apache-extras packet,
-
-  by Arek Mi¶kiewicz <misiek@pld.org.pl>
-  
-- added IPv6 support,
-- other fixes.  
-
-
-* Thu Feb 10 1999 Micha³ Kuratczyk <kurkens@polbox.com>
-  [1.3.4-6d]
-- added LDFLAGS=-s
-- gzipping instead bzipping
-- cosmetic changes
-
-* Tue Jan 26 1999 Wojtek ¦lusarczyk <wojtek@shadow.eu.org>
-  [1.3.4-5d]
-- rebuild against new kernel-2.2.0 ;)  
-
-* Mon Jan 25 1999 Wojtek ¦lusarczyk <wojtek@shadow.eu.org>
-  [1.3.4-4d]
-- added errordocs.  
-
-* Thu Jan 21 1999 Wojtek ¦lusarczyk <wojtek@shadow.eu.org>
-  [1.3.4-3d]
-- fixed files permission,
-- fixed apache.init,
-- some other changes.
-
-* Sun Jan 17 1999 Wojtek ¦lusarczyk <wojtek@shadow.eu.org>
-  [1.3.4-2d]
-- fixed sbindir && apache includes (by Mirek Nowakowski <nowam@pg.gda.pl>),
-- compressed documentation,
-- fixed Group(pl).
-
-* Wed Nov 13 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
-  [1.3.3-1]
-- removed making symlinks in /etc/rc.d/rc?.d and in %install also
-  removed this symlinks from %files (/etc/rc.d/init.d/httpd suports
-  chkconfig),
-- more simplifications in %install,
-- added new apache-config.patch,
-- added "%ghost /var/log/httpd/suexec_log" for suexec subpackage,
-- added "Requires: setup >= 1.10.0" for proper install in enviroment with
-  http user/group.
-
-* Wed Oct 14 1998 Konrad Stêpieñ <konrad@interdata.com.pl>
-  [1.3.3-1d]
-- up to 1.3.3
-- changed user/group to http
-- added patch against GNU libc-2.1, 
-  prepared by Wojtek ¦lusarczyk <wojtek@shadow.eu.org>
-- enabled all modules (without auth_db ....)
-- added magic (for mod_mime_magic)
-- rebuild spec file to minimize number of patches
-- suEXEC in separated package
-
-* Wed Oct 14 1998 Wojtek ¦lusarczyk <wojtek@shadow.eu.org>
-  [1.3.2-1d]
-- build against Tornado (GNU libc-2.1),
-- minor changes. 
-
-* Fri Sep 25 1998 Konrad Stêpieñ <konrad@interdata.com.pl>
-  [1.3.2-1]
-- up to 1.3.2
-- reconfig to use /etc/mime.types (again)
-  orginal mime.types can be found in documentation directory
-- changed to user/group httpd
-- restore orginal start page
-- documentation in separate package
-- added "Provides:httpd"
-
-* Thu Sep  3 1998 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
-  [1.3.1-2]
-- removed /home/httpd/icons/README
-- added devel subpackage,
-- added pl translation (Wojtek ¦lusarczyk <wojtek@shadow.eu.org>),
-- removed Serial: filed,
-- removed Packager: field (this must be placed in private ~/.rpmrc),
-- simplification in %files and %install,
-- /home/httpd/html/manual is now marked as %doc,
-- added /etc/rc.d/rc*.d/* symlinks as a %config(missingok),
-- changed permidssion on logrotate config file to 600,
-- changed permidssion on /var/log/httpd to 700,
-- added %ghost /var/log/httpd/*
-- added striping modules,
-- added patch to defeat header dos attack,
-- start at spec file prepared by:
-  Manoj Kasichainula <manojk@io.com>.
+%attr(-,root,root) %{_datadir}/html/manual
This page took 0.051787 seconds and 4 git commands to generate.