configs: atmel: at91sam9260eknf: update defconfig
[buildroot-gz.git] / package / lighttpd / lighttpd.mk
blob9f7599a1e4493ebe3fbc40016f9bf63882476913
1 ################################################################################
3 # lighttpd
5 ################################################################################
7 LIGHTTPD_VERSION_MAJOR = 1.4
8 LIGHTTPD_VERSION = $(LIGHTTPD_VERSION_MAJOR).43
9 LIGHTTPD_SOURCE = lighttpd-$(LIGHTTPD_VERSION).tar.xz
10 LIGHTTPD_SITE = http://download.lighttpd.net/lighttpd/releases-$(LIGHTTPD_VERSION_MAJOR).x
11 LIGHTTPD_LICENSE = BSD-3c
12 LIGHTTPD_LICENSE_FILES = COPYING
13 LIGHTTPD_DEPENDENCIES = host-pkgconf
14 LIGHTTPD_CONF_OPTS = \
15 --libdir=/usr/lib/lighttpd \
16 --libexecdir=/usr/lib
18 ifeq ($(BR2_PACKAGE_LIGHTTPD_OPENSSL),y)
19 LIGHTTPD_DEPENDENCIES += openssl
20 LIGHTTPD_CONF_OPTS += --with-openssl
21 else
22 LIGHTTPD_CONF_OPTS += --without-openssl
23 endif
25 ifeq ($(BR2_PACKAGE_LIGHTTPD_ZLIB),y)
26 LIGHTTPD_DEPENDENCIES += zlib
27 LIGHTTPD_CONF_OPTS += --with-zlib
28 else
29 LIGHTTPD_CONF_OPTS += --without-zlib
30 endif
32 ifeq ($(BR2_PACKAGE_LIGHTTPD_BZIP2),y)
33 LIGHTTPD_DEPENDENCIES += bzip2
34 LIGHTTPD_CONF_OPTS += --with-bzip2
35 else
36 LIGHTTPD_CONF_OPTS += --without-bzip2
37 endif
39 ifeq ($(BR2_PACKAGE_LIGHTTPD_PCRE),y)
40 LIGHTTPD_CONF_ENV = PCRECONFIG=$(STAGING_DIR)/usr/bin/pcre-config
41 LIGHTTPD_DEPENDENCIES += pcre
42 LIGHTTPD_CONF_OPTS += --with-pcre
43 else
44 LIGHTTPD_CONF_OPTS += --without-pcre
45 endif
47 ifeq ($(BR2_PACKAGE_LIGHTTPD_WEBDAV),y)
48 LIGHTTPD_DEPENDENCIES += libxml2 sqlite
49 LIGHTTPD_CONF_OPTS += --with-webdav-props
50 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
51 LIGHTTPD_CONF_OPTS += --with-webdav-locks
52 LIGHTTPD_DEPENDENCIES += util-linux
53 else
54 LIGHTTPD_CONF_OPTS += --without-webdav-locks
55 endif
56 else
57 LIGHTTPD_CONF_OPTS += --without-webdav-props --without-webdav-locks
58 endif
60 ifeq ($(BR2_PACKAGE_LIGHTTPD_LUA),y)
61 LIGHTTPD_DEPENDENCIES += lua
62 LIGHTTPD_CONF_OPTS += --with-lua
63 else
64 LIGHTTPD_CONF_OPTS += --without-lua
65 endif
67 define LIGHTTPD_INSTALL_CONFIG
68 $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/lighttpd/conf.d
69 $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/www
70 $(INSTALL) -D -m 0644 $(@D)/doc/config/lighttpd.conf \
71 $(TARGET_DIR)/etc/lighttpd/lighttpd.conf
72 $(INSTALL) -D -m 0644 $(@D)/doc/config/modules.conf \
73 $(TARGET_DIR)/etc/lighttpd/modules.conf
74 $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/access_log.conf \
75 $(TARGET_DIR)/etc/lighttpd/conf.d/access_log.conf
76 $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/debug.conf \
77 $(TARGET_DIR)/etc/lighttpd/conf.d/debug.conf
78 $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/dirlisting.conf \
79 $(TARGET_DIR)/etc/lighttpd/conf.d/dirlisting.conf
80 $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/mime.conf \
81 $(TARGET_DIR)/etc/lighttpd/conf.d/mime.conf
82 endef
84 LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG
86 define LIGHTTPD_INSTALL_INIT_SYSV
87 $(INSTALL) -D -m 0755 package/lighttpd/S50lighttpd \
88 $(TARGET_DIR)/etc/init.d/S50lighttpd
89 endef
91 define LIGHTTPD_INSTALL_INIT_SYSTEMD
92 $(INSTALL) -D -m 0644 $(@D)/doc/systemd/lighttpd.service \
93 $(TARGET_DIR)/usr/lib/systemd/system/lighttpd.service
95 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
97 ln -fs ../../../../usr/lib/systemd/system/lighttpd.service \
98 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lighttpd.service
99 endef
101 $(eval $(autotools-package))