packages/vpzone: use new service functions
[packages.git] / net / lighttpd / Makefile
index d8f9f36..1bdb6ac 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2009 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,17 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lighttpd
-PKG_VERSION:=1.4.22
-PKG_RELEASE:=1
+PKG_VERSION:=1.4.29
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://www.lighttpd.net/download/
-PKG_MD5SUM:=ed4ca3897eadf419c893b03fee53c982
+PKG_SOURCE_URL:=http://download.lighttpd.net/lighttpd/releases-1.4.x
+PKG_MD5SUM:=e6e67b09986cb504db630b5a86b2dd76
+
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/lighttpd/Default
-  SUBMENU:=Web
+  SUBMENU:=Web Servers/Proxies
   SECTION:=net
   CATEGORY:=Network
   URL:=http://www.lighttpd.net/
@@ -79,6 +82,12 @@ define Package/lighttpd-mod-evasive
   TITLE:=Evasive module
 endef
 
+define Package/lighttpd-mod-evhost
+  $(call Package/lighttpd/Default)
+  DEPENDS:=lighttpd
+  TITLE:=Exnhanced Virtual-Hosting module
+endef
+
 define Package/lighttpd-mod-expire
   $(call Package/lighttpd/Default)
   DEPENDS:=lighttpd
@@ -195,25 +204,16 @@ endef
 
 define Package/lighttpd-mod-webdav
   $(call Package/lighttpd/Default)
-  DEPENDS:=lighttpd +libsqlite3 +libxml2
+  DEPENDS:=lighttpd +libsqlite3 +libuuid +libxml2
   TITLE:=WebDAV module
 endef
 
-
-ifneq ($(CONFIG_LARGEFILE),y)
-  DISABLE_LARGEFILE:=--disable-lfs
-endif
-
-DISABLE_IPV6:=
-
 CONFIGURE_ARGS+= \
        --libdir=/usr/lib/lighttpd \
        --sysconfdir=/etc/lighttpd \
        --enable-shared \
        --enable-static \
        --disable-rpath \
-       $(DISABLE_LARGEFILE) \
-       $(DISABLE_IPV6) \
        --without-attr \
        --without-bzip2 \
        --without-fam \
@@ -225,24 +225,39 @@ CONFIGURE_ARGS+= \
        --with-openssl="$(STAGING_DIR)/usr" \
        --with-pcre \
        --without-valgrind \
-       --with-webdav-props \
+        $(call autoconf_bool,CONFIG_IPV6,ipv6)
 
 CONFIGURE_VARS+= \
-       CPPFLAGS="-I$(STAGING_DIR)/usr/include/libxml2 $$$$CPPFLAGS" \
        PCRE_LIB="-lpcre" \
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
+ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-webdav),)
+  CONFIGURE_ARGS+= \
+       --with-webdav-locks \
+       --with-webdav-props
+  # XXX: needed by sqlite3 to prevent segfaults in mod_webdav.so
+  CONFIGURE_VARS+= \
+       LIBS="-lpthread"
+else
+  CONFIGURE_ARGS+= \
+       --without-webdav-locks \
+       --without-webdav-props
+endif
+
+define Build/Configure
+$(call Build/Configure/Default)
+       # XXX: override pcre (mis)detection by ./configure when cross-compiling
+       echo "#define HAVE_LIBPCRE 1" >>$(PKG_BUILD_DIR)/config.h
+       echo "#define HAVE_PCRE_H 1" >>$(PKG_BUILD_DIR)/config.h
 endef
 
 define Package/lighttpd/conffiles
-/etc/lighttpd.conf
+/etc/lighttpd/lighttpd.conf
 /etc/default/lighttpd
 endef
 
 define Package/lighttpd/install
-       $(INSTALL_DIR) $(1)/etc
-       $(INSTALL_DATA) ./files/lighttpd.conf $(1)/etc/
+       $(INSTALL_DIR) $(1)/etc/lighttpd
+       $(INSTALL_DATA) ./files/lighttpd.conf $(1)/etc/lighttpd/
        $(INSTALL_DIR) $(1)/etc/default
        $(INSTALL_DATA) ./files/lighttpd.default $(1)/etc/default/lighttpd
        $(INSTALL_DIR) $(1)/etc/init.d
@@ -275,10 +290,12 @@ $(eval $(call BuildPlugin,lighttpd-mod-cgi,cgi))
 $(eval $(call BuildPlugin,lighttpd-mod-cml,cml))
 $(eval $(call BuildPlugin,lighttpd-mod-compress,compress))
 $(eval $(call BuildPlugin,lighttpd-mod-evasive,evasive))
-$(eval $(call BuildPlugin,lighttpd-mod-expire, expire))
-$(eval $(call BuildPlugin,lighttpd-mod-extforward, extforward))
+$(eval $(call BuildPlugin,lighttpd-mod-evhost,evhost))
+$(eval $(call BuildPlugin,lighttpd-mod-expire,expire))
+$(eval $(call BuildPlugin,lighttpd-mod-extforward,extforward))
 $(eval $(call BuildPlugin,lighttpd-mod-fastcgi,fastcgi))
 $(eval $(call BuildPlugin,lighttpd-mod-flv-streaming,flv_streaming))
+$(eval $(call BuildPlugin,lighttpd-mod-magnet,magnet))
 $(eval $(call BuildPlugin,lighttpd-mod-proxy,proxy))
 $(eval $(call BuildPlugin,lighttpd-mod-redirect,redirect))
 $(eval $(call BuildPlugin,lighttpd-mod-rewrite,rewrite))