Makefile 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(TOPDIR)/rules.mk
  4. PKG_NAME:= lighttpd
  5. PKG_VERSION:= 1.4.25
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 87e936ec272ddaba8a2fdfecd8c6b704
  8. PKG_DESCR:= a lightweight web server
  9. PKG_SECTION:= www
  10. PKG_DEPENDS:= libxml2 libsqlite libpcre
  11. PKG_BUILDDEP+= pcre libxml2 sqlite
  12. ifeq (${ADK_COMPILE_LIGHTTPD_WITH_OPENSSL},y)
  13. PKG_DEPENDS+= libopenssl
  14. PKG_BUILDDEP+= openssl
  15. endif
  16. PKG_URL:= http://www.lighttpd.net
  17. PKG_SITES:= http://download.lighttpd.net/lighttpd/releases-1.4.x/
  18. PKG_MULTI:= 1
  19. include $(TOPDIR)/mk/package.mk
  20. define PKG_mod_template
  21. INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
  22. ${2}-install:
  23. ${INSTALL_DIR} $$(IDIR_$(1))/usr/lib/lighttpd
  24. ${INSTALL_BIN} $(WRKINST)/usr/lib/lighttpd/mod_$(2).so $$(IDIR_$(1))/usr/lib/lighttpd/
  25. endef
  26. $(eval $(call PKG_template,LIGHTTPD,lighttpd,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  27. $(eval $(call PKG_template,LIGHTTPD_MOD_ACCESSLOG,lighttpd-mod-accesslog,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  28. $(eval $(call PKG_template,LIGHTTPD_MOD_ALIAS,lighttpd-mod-alias,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  29. $(eval $(call PKG_template,LIGHTTPD_MOD_AUTH,lighttpd-mod-auth,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  30. $(eval $(call PKG_template,LIGHTTPD_MOD_CGI,lighttpd-mod-cgi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  31. $(eval $(call PKG_template,LIGHTTPD_MOD_EVASIVE,lighttpd-mod-evasive,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  32. $(eval $(call PKG_template,LIGHTTPD_MOD_EXPIRE,lighttpd-mod-expire,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  33. $(eval $(call PKG_template,LIGHTTPD_MOD_FASTCGI,lighttpd-mod-fastcgi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  34. $(eval $(call PKG_template,LIGHTTPD_MOD_PROXY,lighttpd-mod-proxy,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  35. $(eval $(call PKG_template,LIGHTTPD_MOD_REDIRECT,lighttpd-mod-redirect,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  36. $(eval $(call PKG_template,LIGHTTPD_MOD_REWRITE,lighttpd-mod-rewrite,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  37. $(eval $(call PKG_template,LIGHTTPD_MOD_SETENV,lighttpd-mod-setenv,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  38. $(eval $(call PKG_template,LIGHTTPD_MOD_SIMPLE_VHOST,lighttpd-mod-simple-vhost,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  39. $(eval $(call PKG_template,LIGHTTPD_MOD_SSI,lighttpd-mod-ssi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  40. $(eval $(call PKG_template,LIGHTTPD_MOD_STATUS,lighttpd-mod-status,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  41. $(eval $(call PKG_template,LIGHTTPD_MOD_USERTRACK,lighttpd-mod-usertrack,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  42. $(eval $(call PKG_template,LIGHTTPD_MOD_WEBDAV,lighttpd-mod-webdav,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  43. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_ACCESSLOG,accesslog))
  44. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_ALIAS,alias))
  45. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_AUTH,auth))
  46. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_CGI,cgi))
  47. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_EVASIVE,evasive))
  48. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_EXPIRE,expire))
  49. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_FASTCGI,fastcgi))
  50. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_PROXY,proxy))
  51. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_REDIRECT,redirect))
  52. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_REWRITE,rewrite))
  53. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_SETENV,setenv))
  54. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_SIMPLE_VHOST,simple_vhost))
  55. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_SSI,ssi))
  56. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_STATUS,status))
  57. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_USERTRACK,usertrack))
  58. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_WEBDAV,webdav))
  59. TCPPFLAGS+= -I$(STAGING_DIR)/usr/include/libxml2
  60. CONFIGURE_ENV+= PCRE_LIB="-lpcre"
  61. CONFIGURE_ARGS+= \
  62. --libdir=/usr/lib/lighttpd \
  63. --sysconfdir=/etc/lighttpd \
  64. --without-attr \
  65. --without-bzip2 \
  66. --without-fam \
  67. --without-gdbm \
  68. --without-ldap \
  69. --without-lua \
  70. --without-memcache \
  71. --without-mysql \
  72. --with-pcre \
  73. --without-valgrind \
  74. --with-webdav-props
  75. ifeq (${ADK_COMPILE_LIGHTTPD_WITH_OPENSSL},y)
  76. CONFIGURE_ARGS+= --with-openssl='${STAGING_DIR}/usr'
  77. else
  78. CONFIGURE_ARGS+= --without-openssl
  79. endif
  80. post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
  81. install -m0755 -d $(IDIR_LIGHTTPD)/etc
  82. install -m0644 ./files/lighttpd.conf $(IDIR_LIGHTTPD)/etc/
  83. install -m0755 -d $(IDIR_LIGHTTPD)/usr/lib/lighttpd
  84. for m in dirlisting indexfile staticfile; do \
  85. $(CP) $(WRKINST)/usr/lib/lighttpd/mod_$$m.so $(IDIR_LIGHTTPD)/usr/lib/lighttpd/ ; \
  86. done
  87. install -m0755 -d $(IDIR_LIGHTTPD)/usr/sbin
  88. $(CP) $(WRKINST)/usr/sbin/lighttpd $(IDIR_LIGHTTPD)/usr/sbin/
  89. include ${TOPDIR}/mk/pkg-bottom.mk