| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= lighttpd
|
|---|
| 10 | PKG_VERSION:= 1.4.11
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= f55eebb9815c94a7de35906bb557ecd3
|
|---|
| 13 |
|
|---|
| 14 | PKG_SOURCE_URL:= http://www.lighttpd.net/download/
|
|---|
| 15 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 16 |
|
|---|
| 17 | include $(TOPDIR)/mk/package.mk
|
|---|
| 18 |
|
|---|
| 19 | define PKG_mod_template
|
|---|
| 20 |
|
|---|
| 21 | $$(IPKG_$(1)):
|
|---|
| 22 | install -d -m0755 $$(IDIR_$(1))/usr/lib/lighttpd
|
|---|
| 23 | install -m0755 $(WRKINST)/usr/lib/lighttpd/mod_$(2).so $$(IDIR_$(1))/usr/lib/lighttpd/
|
|---|
| 24 | $(RSTRIP) $$(IDIR_$(1))
|
|---|
| 25 | $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
|
|---|
| 26 |
|
|---|
| 27 | endef
|
|---|
| 28 |
|
|---|
| 29 | $(eval $(call PKG_template,LIGHTTPD,lighttpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 30 | $(eval $(call PKG_template,LIGHTTPD_MOD_ACCESSLOG,lighttpd-mod-accesslog,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 31 | $(eval $(call PKG_template,LIGHTTPD_MOD_ALIAS,lighttpd-mod-alias,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 32 | $(eval $(call PKG_template,LIGHTTPD_MOD_AUTH,lighttpd-mod-auth,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 33 | $(eval $(call PKG_template,LIGHTTPD_MOD_CGI,lighttpd-mod-cgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 34 | $(eval $(call PKG_template,LIGHTTPD_MOD_EVASIVE,lighttpd-mod-evasive,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 35 | $(eval $(call PKG_template,LIGHTTPD_MOD_EXPIRE,lighttpd-mod-expire,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 36 | $(eval $(call PKG_template,LIGHTTPD_MOD_FASTCGI,lighttpd-mod-fastcgi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 37 | $(eval $(call PKG_template,LIGHTTPD_MOD_PROXY,lighttpd-mod-proxy,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 38 | $(eval $(call PKG_template,LIGHTTPD_MOD_REDIRECT,lighttpd-mod-redirect,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 39 | $(eval $(call PKG_template,LIGHTTPD_MOD_REWRITE,lighttpd-mod-rewrite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 40 | $(eval $(call PKG_template,LIGHTTPD_MOD_SETENV,lighttpd-mod-setenv,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 41 | $(eval $(call PKG_template,LIGHTTPD_MOD_SIMPLE_VHOST,lighttpd-mod-simple-vhost,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 42 | $(eval $(call PKG_template,LIGHTTPD_MOD_SSI,lighttpd-mod-ssi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 43 | $(eval $(call PKG_template,LIGHTTPD_MOD_STATUS,lighttpd-mod-status,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 44 | $(eval $(call PKG_template,LIGHTTPD_MOD_USERTRACK,lighttpd-mod-usertrack,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 45 | $(eval $(call PKG_template,LIGHTTPD_MOD_WEBDAV,lighttpd-mod-webdav,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 46 |
|
|---|
| 47 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_ACCESSLOG,accesslog))
|
|---|
| 48 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_ALIAS,alias))
|
|---|
| 49 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_AUTH,auth))
|
|---|
| 50 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_CGI,cgi))
|
|---|
| 51 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_EVASIVE,evasive))
|
|---|
| 52 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_EXPIRE,expire))
|
|---|
| 53 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_FASTCGI,fastcgi))
|
|---|
| 54 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_PROXY,proxy))
|
|---|
| 55 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_REDIRECT,redirect))
|
|---|
| 56 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_REWRITE,rewrite))
|
|---|
| 57 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_SETENV,setenv))
|
|---|
| 58 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_SIMPLE_VHOST,simple_vhost))
|
|---|
| 59 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_SSI,ssi))
|
|---|
| 60 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_STATUS,status))
|
|---|
| 61 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_USERTRACK,usertrack))
|
|---|
| 62 | $(eval $(call PKG_mod_template,LIGHTTPD_MOD_WEBDAV,webdav))
|
|---|
| 63 |
|
|---|
| 64 | $(WRKBUILD)/.configured:
|
|---|
| 65 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 66 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 67 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 68 | CPPFLAGS="-I$(STAGING_DIR)/usr/include/libxml2 -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|---|
| 69 | LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
|---|
| 70 | PCRE_LIB="-lpcre" \
|
|---|
| 71 | PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
|
|---|
| 72 | ./configure \
|
|---|
| 73 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 74 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 75 | --build=$(GNU_HOST_NAME) \
|
|---|
| 76 | --program-prefix="" \
|
|---|
| 77 | --program-suffix="" \
|
|---|
| 78 | --prefix=/usr \
|
|---|
| 79 | --exec-prefix=/usr \
|
|---|
| 80 | --bindir=/usr/bin \
|
|---|
| 81 | --datadir=/usr/share \
|
|---|
| 82 | --includedir=/usr/include \
|
|---|
| 83 | --infodir=/usr/share/info \
|
|---|
| 84 | --libdir=/usr/lib/lighttpd \
|
|---|
| 85 | --libexecdir=/usr/lib \
|
|---|
| 86 | --localstatedir=/var \
|
|---|
| 87 | --mandir=/usr/share/man \
|
|---|
| 88 | --sbindir=/usr/sbin \
|
|---|
| 89 | --sysconfdir=/etc/lighttpd \
|
|---|
| 90 | --enable-largefile \
|
|---|
| 91 | --disable-nls \
|
|---|
| 92 | --enable-shared \
|
|---|
| 93 | --enable-static \
|
|---|
| 94 | --disable-rpath \
|
|---|
| 95 | --without-attr \
|
|---|
| 96 | --without-bzip2 \
|
|---|
| 97 | --without-fam \
|
|---|
| 98 | --without-gdbm \
|
|---|
| 99 | --without-ldap \
|
|---|
| 100 | --without-lua \
|
|---|
| 101 | --without-memcache \
|
|---|
| 102 | --without-mysql \
|
|---|
| 103 | --with-openssl="$(STAGING_DIR)/usr" \
|
|---|
| 104 | --with-pcre \
|
|---|
| 105 | --without-valgrind \
|
|---|
| 106 | --with-webdav-props \
|
|---|
| 107 | )
|
|---|
| 108 | touch $@
|
|---|
| 109 |
|
|---|
| 110 | $(WRKBUILD)/.built:
|
|---|
| 111 | rm -rf $(WRKINST)
|
|---|
| 112 | mkdir -p $(WRKINST)
|
|---|
| 113 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 114 | DESTDIR="$(WRKINST)" \
|
|---|
| 115 | all install
|
|---|
| 116 | touch $@
|
|---|
| 117 |
|
|---|
| 118 | $(IPKG_LIGHTTPD):
|
|---|
| 119 | install -m0755 -d $(IDIR_LIGHTTPD)/etc
|
|---|
| 120 | install -m0644 ./files/lighttpd.conf $(IDIR_LIGHTTPD)/etc/
|
|---|
| 121 | install -m0755 -d $(IDIR_LIGHTTPD)/etc/default
|
|---|
| 122 | install -m0644 ./files/lighttpd.default $(IDIR_LIGHTTPD)/etc/default/lighttpd
|
|---|
| 123 | install -m0755 -d $(IDIR_LIGHTTPD)/etc/init.d
|
|---|
| 124 | install -m0755 ./files/lighttpd.init $(IDIR_LIGHTTPD)/etc/init.d/lighttpd
|
|---|
| 125 | install -m0755 -d $(IDIR_LIGHTTPD)/usr/lib/lighttpd
|
|---|
| 126 | for m in dirlisting indexfile staticfile; do \
|
|---|
| 127 | $(CP) $(WRKINST)/usr/lib/lighttpd/mod_$$m.so $(IDIR_LIGHTTPD)/usr/lib/lighttpd/ ; \
|
|---|
| 128 | done
|
|---|
| 129 | install -m0755 -d $(IDIR_LIGHTTPD)/usr/sbin
|
|---|
| 130 | $(CP) $(WRKINST)/usr/sbin/lighttpd $(IDIR_LIGHTTPD)/usr/sbin/
|
|---|
| 131 | $(RSTRIP) $(IDIR_LIGHTTPD)
|
|---|
| 132 | $(IPKG_BUILD) $(IDIR_LIGHTTPD) $(PACKAGE_DIR)
|
|---|
| 133 |
|
|---|