[packages] lighttpd:
authorNicolas Thill <nico@openwrt.org>
Wed, 13 May 2009 20:25:20 +0000 (20:25 +0000)
committerNicolas Thill <nico@openwrt.org>
Wed, 13 May 2009 20:25:20 +0000 (20:25 +0000)
 - fix webdav support (closes: #4859)
 - move config file from /etc/lighttpd.conf to /etc/lighttpd/lighttpd.conf
 - fix pcre (mis)detection by configure
 - add commented webdav examples in config file
 - bump release number

SVN-Revision: 15830

net/lighttpd/Makefile
net/lighttpd/files/lighttpd.conf
net/lighttpd/files/lighttpd.default

index d8f9f36713e382bb885f612d1ba8c41fbd174e9c..84d207f84587129bd5de4a35d5b89c1f379f4ea0 100644 (file)
@@ -9,12 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lighttpd
 PKG_VERSION:=1.4.22
 
 PKG_NAME:=lighttpd
 PKG_VERSION:=1.4.22
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.lighttpd.net/download/
 PKG_MD5SUM:=ed4ca3897eadf419c893b03fee53c982
 
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.lighttpd.net/download/
 PKG_MD5SUM:=ed4ca3897eadf419c893b03fee53c982
 
+PKG_FIXUP:=libtool
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/lighttpd/Default
 include $(INCLUDE_DIR)/package.mk
 
 define Package/lighttpd/Default
@@ -195,25 +197,16 @@ endef
 
 define Package/lighttpd-mod-webdav
   $(call Package/lighttpd/Default)
 
 define Package/lighttpd-mod-webdav
   $(call Package/lighttpd/Default)
-  DEPENDS:=lighttpd +libsqlite3 +libxml2
+  DEPENDS:=lighttpd +libsqlite3 +libuuid +libxml2
   TITLE:=WebDAV module
 endef
 
   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 \
 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 \
        --without-attr \
        --without-bzip2 \
        --without-fam \
@@ -225,24 +218,47 @@ CONFIGURE_ARGS+= \
        --with-openssl="$(STAGING_DIR)/usr" \
        --with-pcre \
        --without-valgrind \
        --with-openssl="$(STAGING_DIR)/usr" \
        --with-pcre \
        --without-valgrind \
-       --with-webdav-props \
 
 CONFIGURE_VARS+= \
 
 CONFIGURE_VARS+= \
-       CPPFLAGS="-I$(STAGING_DIR)/usr/include/libxml2 $$$$CPPFLAGS" \
        PCRE_LIB="-lpcre" \
 
        PCRE_LIB="-lpcre" \
 
+ifneq ($(CONFIG_LARGEFILE),y)
+  CONFIGURE_ARGS+= \
+       --disable-lfs
+endif
+
+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 Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
 endef
 
 define Package/lighttpd/conffiles
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
 endef
 
 define Package/lighttpd/conffiles
-/etc/lighttpd.conf
+/etc/lighttpd/lighttpd.conf
 /etc/default/lighttpd
 endef
 
 define Package/lighttpd/install
 /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
        $(INSTALL_DIR) $(1)/etc/default
        $(INSTALL_DATA) ./files/lighttpd.default $(1)/etc/default/lighttpd
        $(INSTALL_DIR) $(1)/etc/init.d
index 788ed64b6c7cb814d7a9da76109a81a50cd49d1c..48d6d1806e068cf11f433713a51dbe4d7fd38b91 100644 (file)
@@ -17,7 +17,8 @@
 #      "mod_cgi",
 #      "mod_ssi",
 #      "mod_usertrack",
 #      "mod_cgi",
 #      "mod_ssi",
 #      "mod_usertrack",
-#      "mod_expire"
+#      "mod_expire",
+#      "mod_webdav"
 #)
 
 # force use of the "write" backend (closes: #2401)
 #)
 
 # force use of the "write" backend (closes: #2401)
@@ -220,3 +221,10 @@ server.upload-dirs = ( "/tmp" )
 #include_shell "echo var.a=1"
 ## the above is same as:
 #var.a=1
 #include_shell "echo var.a=1"
 ## the above is same as:
 #var.a=1
+
+#### webdav
+#$HTTP["url"] =~ "^/webdav($|/)" {
+# webdav.activate = "enable"
+# webdav.is-readonly = "enable"
+# webdav.sqlite-db-name = "/var/run/lighttpd-webdav-lock.db"
+#}
index 649571e640cfad860dc901d06507e83e9b92ed01..340a1d2788db9d7661924d3ae6133814c6944e0d 100644 (file)
@@ -1 +1 @@
-OPTIONS="-f /etc/lighttpd.conf"
\ No newline at end of file
+OPTIONS="-f /etc/lighttpd/lighttpd.conf"