install apache includes into usr/include/apache instead of usr/include - fixes xf86...
[openwrt/svn-archive/archive.git] / net / apache / Makefile
index 9fa7a402787767aab9889ab3c66e376fc6aa5dcf..f65154f1e0fc87f479d50576f0d795b9635dff8b 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2008 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,48 +9,83 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apache
-PKG_VERSION:=2.2.4
+PKG_VERSION:=2.2.9
 PKG_RELEASE:=1
 PKG_SOURCE_NAME:=httpd
 
-PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://ftp.uni-erlangen.de/pub/mirrors/apache/httpd/
-PKG_MD5SUM:=3add41e0b924d4bb53c2dee55a38c09e
-PKG_CAT:=zcat
+PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://ftp.uni-erlangen.de/pub/mirrors/apache/httpd/ \
+               http://apache.imsam.info/httpd/
+PKG_MD5SUM:=3afa8137dc1999be695a20b62fdf032b
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/apache/Default
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+apr +apr-util +zlib +libexpat +libpcre +libopenssl +libsqlite3
+  SUBMENU:=Web
   TITLE:=The Apache Web Server
   URL:=http://httpd.apache.org/
-  SUBMENU:=apache
+endef
+
+define Package/apache
+  $(call Package/apache/Default)
+  MENU=1
+  DEPENDS:=+libapr +libaprutil +zlib +libexpat +libpcre +libopenssl +libsqlite3
+endef
+
+define Package/apache/description
+       The Apache Web Server is a powerful and flexible HTTP/1.1 compliant
+       web server.  Originally designed as a replacement for the NCSA HTTP
+       Server, it has grown to be the most popular web server on the Internet.
 endef
 
 define Package/apache-server
   $(call Package/apache/Default)
-  TITLE:=The apache server & and some tools
-  DESCRIPTION:=\
-       Take care that you don't include apache at the moment into your image\\\
-       please select it only as module because busybox will override\\\
-       /usr/sbin/httpd. It'll be solved soon. If you need to include this\\\
-       package in the image anyway, remove httpd from busybox\\\
-       (Base system --> Configuration --> Networking Utilities --> httpd).\\\
-       Also you should take care for the initscripts, apache's httpd isn't\\\
-       compatible with the one from busybox, so if you want to use apache\\\
-       for running your webif, you'll need to change the parameters in the\\\
+  TITLE:=The Apache Web Server and some tools
+  DEPENDS:=apache
+endef
+
+define Package/apache-server/description
+       Take care that you don't include apache at the moment into your image
+       please select it only as module because busybox will override
+       /usr/sbin/httpd. It'll be solved soon. If you need to include this
+       package in the image anyway, remove httpd from busybox
+       (Base system --> Configuration --> Networking Utilities --> httpd).
+       Also you should take care for the initscripts, apache's httpd isn't
+       compatible with the one from busybox, so if you want to use apache
+       for running your webif, you'll need to change the parameters in the
        scripts and configure the rest in /etc/httpd.conf.
 endef
 
+define Package/apache-server/conffiles
+/etc/apache/httpd.conf
+/etc/apache/extra/httpd-autoindex.conf
+/etc/apache/extra/httpd-dav.conf
+/etc/apache/extra/httpd-default.conf
+/etc/apache/extra/httpd-info.conf
+/etc/apache/extra/httpd-languages.conf
+/etc/apache/extra/httpd-manual.conf
+/etc/apache/extra/httpd-mpm.conf
+/etc/apache/extra/httpd-multilang-errordoc.conf
+/etc/apache/extra/httpd-ssl.conf
+/etc/apache/extra/httpd-userdir.conf
+/etc/apache/extra/httpd-vhosts.conf
+/etc/apache/magic
+/etc/apache/mime.types
+endef
+
 define Package/apache-icons
   $(call Package/apache/Default)
   TITLE:=Icons from Apache
-  DEPENDS:=
+  DEPENDS:=apache
+endef
+
+define Package/apache-icons/description
+  $(call Package/apache/description)
+  This package contains the icons from Apache.
 endef
 
 define Build/Configure 
@@ -60,10 +95,12 @@ define Build/Configure
                --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
                --enable-http \
                --enable-ssl \
+               --enable-proxy \
                --disable-disk-cache \
                --enable-maintainer-mode \
                --enable-mime-magic \
                --without-suexec-bin \
+               --sysconfdir=/etc/apache \
                ap_void_ptr_lt_long=no \
                logfiledir="/var/log" \
        )
@@ -79,29 +116,21 @@ define Build/InstallDev
        rm -rf  $(PKG_INSTALL_DIR)/usr/man/ \
                $(PKG_INSTALL_DIR)/usr/share/manual/
        # if you need docs take a look into the build-dir :)
-       mkdir -p $(STAGING_DIR)/etc
+       mkdir -p $(1)/etc
        $(CP)   $(PKG_INSTALL_DIR)/etc/* \
-               $(STAGING_DIR)/etc
-       mkdir -p $(STAGING_DIR)/usr/include
+               $(1)/etc
+       mkdir -p $(1)/usr/include/apache
        $(CP)   $(PKG_INSTALL_DIR)/usr/include/* \
-               $(STAGING_DIR)/usr/include
-       mkdir -p $(STAGING_DIR)/usr/lib
+               $(1)/usr/include/apache
+       mkdir -p $(1)/usr/lib
        $(CP)   $(PKG_INSTALL_DIR)/usr/lib/httpd.exp \
-               $(STAGING_DIR)/usr/lib
-       mkdir -p $(STAGING_DIR)/usr/sbin
+               $(1)/usr/lib
+       mkdir -p $(1)/usr/sbin
        $(CP)   $(PKG_INSTALL_DIR)/usr/sbin/* \
-               $(STAGING_DIR)/usr/sbin
-       mkdir -p $(STAGING_DIR)/usr/share
+               $(1)/usr/sbin
+       mkdir -p $(1)/usr/share
        $(CP)   $(PKG_INSTALL_DIR)/usr/share/* \
-               $(STAGING_DIR)/usr/share
-endef
-
-define Build/UninstallDev
-       rm -rf  $(STAGING_DIR)/usr/include/{ap_*,http*,mod_*,mpm*,os.h,scoreboard.h,unixd.h,util_*} \
-               $(STAGING_DIR)/etc/{httpd.conf,magic,mime.types,extra,original} \
-               $(STAGING_DIR)/usr/sbin/{ab,apachectl,apxs,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} \
-               $(STAGING_DIR)/usr/share/{error,icons,htdocs,cgi-bin,build} \
-               $(STAGING_DIR)/usr/lib/httpd.exp
+               $(1)/usr/share
 endef
 
 define Package/apache-server/preinst
@@ -113,14 +142,14 @@ endef
 define Package/apache-server/install
        $(INSTALL_DIR) $(1)/usr/sbin
        # we don't need apxs on the router, it's just for building apache modules.  
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{ab,apachectl,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{ab,apachectl,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/share
        $(CP) $(PKG_INSTALL_DIR)/usr/share/{error,htdocs,cgi-bin,build} $(1)/usr/share/
-       $(INSTALL_DIR) $(1)/etc
-       $(CP) $(PKG_INSTALL_DIR)/etc/{magic,mime.types,extra} $(1)/etc/
-       $(CP) ./files/etc/httpd.conf $(1)/etc/
+       $(INSTALL_DIR) $(1)/etc/apache
+       $(CP) $(PKG_INSTALL_DIR)/etc/apache/{magic,mime.types,extra} $(1)/etc/apache/
+       $(CP) ./files/etc/apache/httpd.conf $(1)/etc/apache/
 endef
 
 define Package/apache-server/postrm
@@ -135,5 +164,6 @@ define Package/apache-icons/install
        $(CP) $(PKG_INSTALL_DIR)/usr/share/icons $(1)/usr/share/
 endef
 
+$(eval $(call BuildPackage,apache))
 $(eval $(call BuildPackage,apache-server))
 $(eval $(call BuildPackage,apache-icons))