lighttpd.mk 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. ################################################################################
  2. #
  3. # lighttpd
  4. #
  5. ################################################################################
  6. LIGHTTPD_VERSION_MAJOR = 1.4
  7. LIGHTTPD_VERSION = $(LIGHTTPD_VERSION_MAJOR).73
  8. LIGHTTPD_SOURCE = lighttpd-$(LIGHTTPD_VERSION).tar.xz
  9. LIGHTTPD_SITE = http://download.lighttpd.net/lighttpd/releases-$(LIGHTTPD_VERSION_MAJOR).x
  10. LIGHTTPD_LICENSE = BSD-3-Clause
  11. LIGHTTPD_LICENSE_FILES = COPYING
  12. LIGHTTPD_CPE_ID_VENDOR = lighttpd
  13. LIGHTTPD_DEPENDENCIES = host-pkgconf xxhash
  14. LIGHTTPD_CONF_OPTS = \
  15. -Dwith_dbi=disabled \
  16. -Dwith_fam=disabled \
  17. -Dwith_gnutls=false \
  18. -Dwith_libev=disabled \
  19. -Dwith_libunwind=disabled \
  20. -Dwith_mbedtls=false \
  21. -Dwith_nettle=false \
  22. -Dwith_nss=false \
  23. -Dwith_pcre=disabled \
  24. -Dwith_sasl=disabled \
  25. -Dwith_wolfssl=false \
  26. -Dwith_xattr=false \
  27. -Dwith_xxhash=enabled \
  28. -Dbuild_extra_warnings=false \
  29. -Dbuild_static=false \
  30. -Dmoduledir=lib/lighttpd
  31. ifeq ($(BR2_PACKAGE_LIGHTTPD_BROTLI),y)
  32. LIGHTTPD_DEPENDENCIES += brotli
  33. LIGHTTPD_CONF_OPTS += -Dwith_brotli=enabled
  34. else
  35. LIGHTTPD_CONF_OPTS += -Dwith_brotli=disabled
  36. endif
  37. ifeq ($(BR2_PACKAGE_LIGHTTPD_BZIP2),y)
  38. LIGHTTPD_DEPENDENCIES += bzip2
  39. LIGHTTPD_CONF_OPTS += -Dwith_bzip=enabled
  40. else
  41. LIGHTTPD_CONF_OPTS += -Dwith_bzip=disabled
  42. endif
  43. ifeq ($(BR2_PACKAGE_LIGHTTPD_KRB5),y)
  44. LIGHTTPD_DEPENDENCIES += libkrb5
  45. LIGHTTPD_CONF_OPTS += -Dwith_krb5=enabled
  46. else
  47. LIGHTTPD_CONF_OPTS += -Dwith_krb5=disabled
  48. endif
  49. ifeq ($(BR2_PACKAGE_LIGHTTPD_LDAP),y)
  50. LIGHTTPD_DEPENDENCIES += openldap
  51. LIGHTTPD_CONF_OPTS += -Dwith_ldap=enabled
  52. else
  53. LIGHTTPD_CONF_OPTS += -Dwith_ldap=disabled
  54. endif
  55. ifeq ($(BR2_PACKAGE_LIGHTTPD_LUA),y)
  56. LIGHTTPD_DEPENDENCIES += lua
  57. LIGHTTPD_CONF_OPTS += -Dwith_lua=true
  58. else
  59. LIGHTTPD_CONF_OPTS += -Dwith_lua=false
  60. endif
  61. ifeq ($(BR2_PACKAGE_LIGHTTPD_MAXMINDDB),y)
  62. LIGHTTPD_DEPENDENCIES += libmaxminddb
  63. LIGHTTPD_CONF_OPTS += -Dwith_maxminddb=enabled
  64. else
  65. LIGHTTPD_CONF_OPTS += -Dwith_maxminddb=disabled
  66. endif
  67. ifeq ($(BR2_PACKAGE_LIGHTTPD_MYSQL),y)
  68. LIGHTTPD_DEPENDENCIES += mariadb
  69. LIGHTTPD_CONF_OPTS += -Dwith_mysql=enabled
  70. else
  71. LIGHTTPD_CONF_OPTS += -Dwith_mysql=disabled
  72. endif
  73. ifeq ($(BR2_PACKAGE_LIGHTTPD_OPENSSL),y)
  74. LIGHTTPD_DEPENDENCIES += openssl
  75. LIGHTTPD_CONF_OPTS += -Dwith_openssl=true
  76. else
  77. LIGHTTPD_CONF_OPTS += -Dwith_openssl=false
  78. endif
  79. ifeq ($(BR2_PACKAGE_LIGHTTPD_PAM),y)
  80. LIGHTTPD_DEPENDENCIES += linux-pam
  81. LIGHTTPD_CONF_OPTS += -Dwith_pam=enabled
  82. else
  83. LIGHTTPD_CONF_OPTS += -Dwith_pam=disabled
  84. endif
  85. ifeq ($(BR2_PACKAGE_LIGHTTPD_PCRE),y)
  86. LIGHTTPD_DEPENDENCIES += pcre2
  87. LIGHTTPD_CONF_OPTS += -Dwith_pcre2=true
  88. else
  89. LIGHTTPD_CONF_OPTS += -Dwith_pcre2=false
  90. endif
  91. ifeq ($(BR2_PACKAGE_LIGHTTPD_PGSQL),y)
  92. LIGHTTPD_DEPENDENCIES += postgresql
  93. LIGHTTPD_CONF_OPTS += -Dwith_pgsql=enabled
  94. else
  95. LIGHTTPD_CONF_OPTS += -Dwith_pgsql=disabled
  96. endif
  97. ifeq ($(BR2_PACKAGE_LIGHTTPD_WEBDAV),y)
  98. LIGHTTPD_DEPENDENCIES += libxml2 sqlite
  99. LIGHTTPD_CONF_OPTS += -Dwith_webdav_props=enabled
  100. ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
  101. LIGHTTPD_CONF_OPTS += -Dwith_webdav_locks=enabled
  102. LIGHTTPD_DEPENDENCIES += util-linux
  103. else
  104. LIGHTTPD_CONF_OPTS += -Dwith_webdav_locks=disabled
  105. endif
  106. else
  107. LIGHTTPD_CONF_OPTS += -Dwith_webdav_props=disabled -Dwith_webdav_locks=disabled
  108. endif
  109. ifeq ($(BR2_PACKAGE_LIGHTTPD_ZLIB),y)
  110. LIGHTTPD_DEPENDENCIES += zlib
  111. LIGHTTPD_CONF_OPTS += -Dwith_zlib=enabled
  112. else
  113. LIGHTTPD_CONF_OPTS += -Dwith_zlib=disabled
  114. endif
  115. ifeq ($(BR2_PACKAGE_LIGHTTPD_ZSTD),y)
  116. LIGHTTPD_DEPENDENCIES += zstd
  117. LIGHTTPD_CONF_OPTS += -Dwith_zstd=enabled
  118. else
  119. LIGHTTPD_CONF_OPTS += -Dwith_zstd=disabled
  120. endif
  121. define LIGHTTPD_INSTALL_CONFIG
  122. $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/lighttpd/conf.d
  123. $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/www
  124. $(INSTALL) -D -m 0644 $(@D)/doc/config/lighttpd.conf \
  125. $(TARGET_DIR)/etc/lighttpd/lighttpd.conf
  126. $(INSTALL) -D -m 0644 $(@D)/doc/config/modules.conf \
  127. $(TARGET_DIR)/etc/lighttpd/modules.conf
  128. $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/access_log.conf \
  129. $(TARGET_DIR)/etc/lighttpd/conf.d/access_log.conf
  130. $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/debug.conf \
  131. $(TARGET_DIR)/etc/lighttpd/conf.d/debug.conf
  132. $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/dirlisting.conf \
  133. $(TARGET_DIR)/etc/lighttpd/conf.d/dirlisting.conf
  134. $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/mime.conf \
  135. $(TARGET_DIR)/etc/lighttpd/conf.d/mime.conf
  136. endef
  137. LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG
  138. define LIGHTTPD_INSTALL_INIT_SYSV
  139. $(INSTALL) -D -m 0755 package/lighttpd/S50lighttpd \
  140. $(TARGET_DIR)/etc/init.d/S50lighttpd
  141. endef
  142. define LIGHTTPD_INSTALL_INIT_SYSTEMD
  143. $(INSTALL) -D -m 0644 $(@D)/doc/systemd/lighttpd.service \
  144. $(TARGET_DIR)/usr/lib/systemd/system/lighttpd.service
  145. $(INSTALL) -D -m 644 package/lighttpd/lighttpd_tmpfiles.conf \
  146. $(TARGET_DIR)/usr/lib/tmpfiles.d/lighttpd.conf
  147. endef
  148. $(eval $(meson-package))