Package-Name: apache
Suggests: openssl db
Homepage: http://httpd.apache.org/
#Source: http://www.apache.org/dist/httpd/ <-- main distribution site
Source: ibiblio:///pub/packages/infosystems/WWW/servers/apache/httpd/httpd-(\d+.\d+.\d+).tar.gz $1
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
	mv httpd-"$(VERSION)" apache-"$(VERSION)"
Compile:
#FIXME: have some way for user to select config opts at compile time?
	cp -p ABOUT_APACHE CHANGES LICENSE README ROADMAP "$(PREFIX)/"
	if packager c zlib ; then DEFLATE="--enable-deflate" ; else DEFLATE= ; fi ; \
	SSLDIR=`cd "$(PREFIX)"/..;pwd`/openssl ; \
	if packager c openssl ; then SSL="--enable-ssl --with-ssl=$$SSLDIR" ; else SSL= ; fi ; \
#FIXME: db4 support is broken
	if packager c db ; then DB="--with-dbm=db185" ; else DB="--with-dbm=sdbm" ; fi ; \
	$(MAKE) -f ../Makefile configure CONFIGURE_OPTS="--enable-auth-digest --enable-http --enable-cgi --enable-rewrite $$DEFLATE $$SSL $$DB"
	$(MAKE)
	$(MAKE) install
	rm -f "$(PREFIX)"/bin/suexec "$(PREFIX)"/man/man8/suexec.8
Install:
	$(MAKE) instman SECTION=1 MAN="dbmmanage htdigest htpasswd"
	$(MAKE) instman SECTION=8 MAN="ab apachectl apxs httpd logresolve rotatelogs"
	rm -rf "$(PREFIX)"/etc
	mv "$(PREFIX)"/conf "$(PREFIX)"/etc
	$(MAKE) instetc DEST=apache ETC="*"
	mv "$(PREFIX)"/etc "$(PREFIX)"/conf
	test -d /usr/htdocs || (rm -f /usr/htdocs && cp -a "$(PREFIX)"/htdocs /usr/)
	rm -rf "$(PREFIX)"/htdocs
	ln -s /usr/htdocs "$(PREFIX)"/htdocs
	umask 022 ; mkdir -p /var/log/apache
	rm -rf "$(PREFIX)"/logs
	ln -s /var/log/apache "$(PREFIX)"/logs
#FIXME: whee, autoconf stupidness
Patch: <<EOT
--- srclib/apr-util/configure.old	Thu Oct  3 14:43:17 2002
+++ srclib/apr-util/configure	Fri Nov 15 12:45:11 2002
@@ -10810,23 +10810,11 @@
 #line $LINENO "configure"
 #include "confdefs.h"
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dbopen ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
+#include <db_185.h>
 int
 main ()
 {
-dbopen ();
+dbopen (0,0,0,0,0);
   ;
   return 0;
 }
EOT

-/etc/apache/
-/usr/htdocs/
-/var/log/apache/
/etc/apache/
/pkg/apache/
/usr/htdocs/
/usr/man/man1/dbmmanage.1.gz
/usr/man/man1/htdigest.1.gz
/usr/man/man1/htpasswd.1.gz
/usr/man/man8/ab.8.gz
/usr/man/man8/apachectl.8.gz
/usr/man/man8/apxs.8.gz
/usr/man/man8/httpd.8.gz
/usr/man/man8/logresolve.8.gz
/usr/man/man8/rotatelogs.8.gz
/var/log/apache/
