diff mbox series

[v2,4/6] package/lighttpd: add maxminddb support

Message ID 20220123095957.492671-4-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [v2,1/6] package/lighttpd: reorder alphabetically options | expand

Commit Message

Fabrice Fontaine Jan. 23, 2022, 9:59 a.m. UTC
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/lighttpd/Config.in   | 6 ++++++
 package/lighttpd/lighttpd.mk | 8 +++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/package/lighttpd/Config.in b/package/lighttpd/Config.in
index f3e252d850..9a262dbe93 100644
--- a/package/lighttpd/Config.in
+++ b/package/lighttpd/Config.in
@@ -39,6 +39,12 @@  config BR2_PACKAGE_LIGHTTPD_LUA
 	help
 	  Enable Lua support. Needed to support mod_magnet
 
+config BR2_PACKAGE_LIGHTTPD_MAXMINDDB
+	bool "maxminddb support"
+	select BR2_PACKAGE_LIBMAXMINDDB
+	help
+	  Enable MaxMind GeoIP2 support. Needed to support mod_maxminddb
+
 config BR2_PACKAGE_LIGHTTPD_OPENSSL
 	bool "openssl support"
 	select BR2_PACKAGE_OPENSSL
diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk
index 22db1a7348..b2e06c77a1 100644
--- a/package/lighttpd/lighttpd.mk
+++ b/package/lighttpd/lighttpd.mk
@@ -20,7 +20,6 @@  LIGHTTPD_CONF_OPTS = \
 	-Dwith_ldap=false \
 	-Dwith_libev=false \
 	-Dwith_libunwind=false \
-	-Dwith_maxminddb=false \
 	-Dwith_mbedtls=false \
 	-Dwith_mysql=false \
 	-Dwith_nettle=false \
@@ -56,6 +55,13 @@  else
 LIGHTTPD_CONF_OPTS += -Dwith_lua=false
 endif
 
+ifeq ($(BR2_PACKAGE_LIGHTTPD_MAXMINDDB),y)
+LIGHTTPD_DEPENDENCIES += libmaxminddb
+LIGHTTPD_CONF_OPTS += -Dwith_maxminddb=true
+else
+LIGHTTPD_CONF_OPTS += -Dwith_maxminddb=false
+endif
+
 ifeq ($(BR2_PACKAGE_LIGHTTPD_OPENSSL),y)
 LIGHTTPD_DEPENDENCIES += openssl
 LIGHTTPD_CONF_OPTS += -Dwith_openssl=true