Makefile 7.8 KB

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