Makefile 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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.35
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 69057685df672218d45809539b874917
  8. PKG_DESCR:= a lightweight web server
  9. PKG_SECTION:= www
  10. PKG_DEPENDS:= libgcc
  11. PKG_URL:= http://www.lighttpd.net/
  12. PKG_SITES:= http://download.lighttpd.net/lighttpd/releases-1.4.x/
  13. PKG_MULTI:= 1
  14. PKG_FLAVOURS_LIGHTTPD:= WITH_IPV6 WITH_SSL
  15. PKGFD_WITH_IPV6:= enable IPv6 support
  16. PKGFD_WITH_SSL:= enable SSL support
  17. PKGFB_WITH_SSL:= openssl
  18. PKGFS_WITH_SSL:= libopenssl
  19. PKG_SUBPKGS:= LIGHTTPD LIGHTTPD_MOD_ALIAS LIGHTTPD_MOD_AUTH
  20. PKG_SUBPKGS+= LIGHTTPD_MOD_CGI LIGHTTPD_MOD_DIRLISTING LIGHTTPD_MOD_EVASIVE LIGHTTPD_MOD_EXPIRE LIGHTTPD_MOD_FASTCGI
  21. PKG_SUBPKGS+= LIGHTTPD_MOD_PROXY LIGHTTPD_MOD_REDIRECT LIGHTTPD_MOD_REWRITE LIGHTTPD_MOD_SETENV
  22. PKG_SUBPKGS+= LIGHTTPD_MOD_SIMPLE_VHOST LIGHTTPD_MOD_SSI LIGHTTPD_MOD_STATUS LIGHTTPD_MOD_USERTRACK
  23. PKG_SUBPKGS+= LIGHTTPD_MOD_WEBDAV
  24. PKGSD_LIGHTTPD_MOD_ALIAS:= alias support
  25. PKGSD_LIGHTTPD_MOD_AUTH:= authentication support
  26. PKGSD_LIGHTTPD_MOD_CGI:= CGI support
  27. PKGSD_LIGHTTPD_MOD_DIRLISTING:= Dirlisting support
  28. PKGSB_LIGHTTPD_MOD_DIRLISTING:= pcre
  29. PKGSS_LIGHTTPD_MOD_DIRLISTING:= libpcre
  30. PKGSD_LIGHTTPD_MOD_EVASIVE:= Evasive support
  31. PKGSD_LIGHTTPD_MOD_EXPIRE:= Expire support
  32. PKGSD_LIGHTTPD_MOD_FASTCGI:= FastCGI support
  33. PKGSD_LIGHTTPD_MOD_PROXY:= Proxy support
  34. PKGSD_LIGHTTPD_MOD_REDIRECT:= Redirect support
  35. PKGSD_LIGHTTPD_MOD_REWRITE:= Rewrite support
  36. PKGSD_LIGHTTPD_MOD_SETENV:= Setenv support
  37. PKGSD_LIGHTTPD_MOD_SIMPLE_VHOST:= Simple Vhost support
  38. PKGSD_LIGHTTPD_MOD_SSI:= SSI support
  39. PKGSD_LIGHTTPD_MOD_STATUS:= Status support
  40. PKGSD_LIGHTTPD_MOD_USERTRACK:= Usertracking support
  41. PKGSD_LIGHTTPD_MOD_WEBDAV:= Webdav support
  42. PKGSB_LIGHTTPD_MOD_WEBDAV:= libxml2 sqlite
  43. PKGSS_LIGHTTPD_MOD_WEBDAV:= libxml2 libsqlite
  44. include $(TOPDIR)/mk/package.mk
  45. define PKG_mod_template
  46. INSTALL_MODS_$${ADK_PACKAGE_${1}}+= ${2}-install
  47. ${2}-install:
  48. ${INSTALL_DIR} $$(IDIR_$(1))/usr/lib/lighttpd
  49. ${INSTALL_BIN} $(WRKINST)/usr/lib/lighttpd/mod_$(2).so $$(IDIR_$(1))/usr/lib/lighttpd/
  50. endef
  51. $(eval $(call PKG_template,LIGHTTPD,lighttpd,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  52. $(eval $(call PKG_template,LIGHTTPD_MOD_ALIAS,lighttpd-mod-alias,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_ALIAS},${PKG_SECTION}))
  53. $(eval $(call PKG_template,LIGHTTPD_MOD_AUTH,lighttpd-mod-auth,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_AUTH},${PKG_SECTION}))
  54. $(eval $(call PKG_template,LIGHTTPD_MOD_CGI,lighttpd-mod-cgi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_CGI},${PKG_SECTION}))
  55. $(eval $(call PKG_template,LIGHTTPD_MOD_DIRLISTING,lighttpd-mod-dirlisting,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_DIRLISTING},${PKG_SECTION}))
  56. $(eval $(call PKG_template,LIGHTTPD_MOD_EVASIVE,lighttpd-mod-evasive,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_EVASIVE},${PKG_SECTION}))
  57. $(eval $(call PKG_template,LIGHTTPD_MOD_EXPIRE,lighttpd-mod-expire,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_EXPIRE},${PKG_SECTION}))
  58. $(eval $(call PKG_template,LIGHTTPD_MOD_FASTCGI,lighttpd-mod-fastcgi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_FASTCGI},${PKG_SECTION}))
  59. $(eval $(call PKG_template,LIGHTTPD_MOD_PROXY,lighttpd-mod-proxy,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_PROXY},${PKG_SECTION}))
  60. $(eval $(call PKG_template,LIGHTTPD_MOD_REDIRECT,lighttpd-mod-redirect,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_REDIRECT},${PKG_SECTION}))
  61. $(eval $(call PKG_template,LIGHTTPD_MOD_REWRITE,lighttpd-mod-rewrite,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_REWRITE},${PKG_SECTION}))
  62. $(eval $(call PKG_template,LIGHTTPD_MOD_SETENV,lighttpd-mod-setenv,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_SETENV},${PKG_SECTION}))
  63. $(eval $(call PKG_template,LIGHTTPD_MOD_SIMPLE_VHOST,lighttpd-mod-simple-vhost,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_SIMPLE_VHOST},${PKG_SECTION}))
  64. $(eval $(call PKG_template,LIGHTTPD_MOD_SSI,lighttpd-mod-ssi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_SSI},${PKG_SECTION}))
  65. $(eval $(call PKG_template,LIGHTTPD_MOD_STATUS,lighttpd-mod-status,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_STATUS},${PKG_SECTION}))
  66. $(eval $(call PKG_template,LIGHTTPD_MOD_USERTRACK,lighttpd-mod-usertrack,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_USERTRACK},${PKG_SECTION}))
  67. $(eval $(call PKG_template,LIGHTTPD_MOD_WEBDAV,lighttpd-mod-webdav,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_WEBDAV},${PKG_SECTION}))
  68. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_ALIAS,alias))
  69. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_AUTH,auth))
  70. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_CGI,cgi))
  71. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_DIRLISTING,dirlisting))
  72. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_EVASIVE,evasive))
  73. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_EXPIRE,expire))
  74. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_FASTCGI,fastcgi))
  75. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_PROXY,proxy))
  76. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_REDIRECT,redirect))
  77. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_REWRITE,rewrite))
  78. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_SETENV,setenv))
  79. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_SIMPLE_VHOST,simple_vhost))
  80. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_SSI,ssi))
  81. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_STATUS,status))
  82. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_USERTRACK,usertrack))
  83. $(eval $(call PKG_mod_template,LIGHTTPD_MOD_WEBDAV,webdav))
  84. #TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/usr/include/libxml2
  85. CONFIGURE_ARGS+= --libdir=/usr/lib/lighttpd \
  86. --sysconfdir=/etc/lighttpd \
  87. --without-attr \
  88. --without-zlib \
  89. --without-bzip2 \
  90. --without-fam \
  91. --without-gdbm \
  92. --without-ldap \
  93. --without-lua \
  94. --without-memcache \
  95. --without-mysql \
  96. --without-valgrind
  97. ifneq ($(ADK_PACKAGE_LIGHTTPD_MOD_WEBDAV),)
  98. CONFIGURE_ARGS+= --with-webdav-props \
  99. --with-webdav-locks
  100. else
  101. CONFIGURE_ARGS+= --without-webdav-props \
  102. --without-webdav-locks
  103. endif
  104. ifneq ($(ADK_PACKAGE_LIGHTTPD_MOD_SSI)$(ADK_PACKAGE_LIGHTTPD_MOD_DIRLISTING)$(ADK_PACKAGE_LIGHTTPD_MOD_REWRITE)$(ADK_PACKAGE_LIGHTTPD_MOD_REDIRECT),)
  105. CONFIGURE_ARGS+= --with-pcre
  106. CONFIGURE_ENV+= PCRE_LIB="-lpcre"
  107. else
  108. CONFIGURE_ARGS+= --without-pcre
  109. endif
  110. ifneq ($(ADK_PACKAGE_LIGHTTPD_WITH_IPV6),)
  111. CONFIGURE_ARGS+= --enable-ipv6
  112. else
  113. CONFIGURE_ARGS+= --disable-ipv6
  114. endif
  115. ifneq ($(ADK_PACKAGE_LIGHTTPD_WITH_SSL),)
  116. CONFIGURE_ARGS+= --with-openssl
  117. else
  118. CONFIGURE_ARGS+= --without-openssl
  119. endif
  120. post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
  121. ${INSTALL_DIR} $(IDIR_LIGHTTPD)/etc/lighttpd/conf.d
  122. ${INSTALL_DATA} ./files/lighttpd.conf $(IDIR_LIGHTTPD)/etc/lighttpd
  123. ${INSTALL_DATA} ./files/modules.conf $(IDIR_LIGHTTPD)/etc/lighttpd
  124. ${CP} ./files/conf.d $(IDIR_LIGHTTPD)/etc/lighttpd
  125. ${CP} ${WRKBUILD}/doc/config/conf.d/*.conf \
  126. $(IDIR_LIGHTTPD)/etc/lighttpd/conf.d
  127. ${INSTALL_DIR} $(IDIR_LIGHTTPD)/usr/lib/lighttpd
  128. for m in indexfile staticfile accesslog; do \
  129. $(CP) $(WRKINST)/usr/lib/lighttpd/mod_$$m.so $(IDIR_LIGHTTPD)/usr/lib/lighttpd/ ; \
  130. done
  131. ${INSTALL_DIR} $(IDIR_LIGHTTPD)/usr/sbin
  132. $(INSTALL_BIN) $(WRKINST)/usr/sbin/lighttpd $(IDIR_LIGHTTPD)/usr/sbin
  133. include ${TOPDIR}/mk/pkg-bottom.mk