package/ti-sgx-um: fix Config.in
[buildroot-gz.git] / package / lighttpd / lighttpd.mk
blob01463737f38b9a5375c21148dc3e28010f8abb09
1 ################################################################################
3 # lighttpd
5 ################################################################################
7 LIGHTTPD_VERSION_MAJOR = 1.4
8 LIGHTTPD_VERSION = $(LIGHTTPD_VERSION_MAJOR).39
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 --with-webdav-locks
50 else
51 LIGHTTPD_CONF_OPTS += --without-webdav-props --without-webdav-locks
52 endif
54 ifeq ($(BR2_PACKAGE_LIGHTTPD_LUA),y)
55 LIGHTTPD_DEPENDENCIES += lua
56 LIGHTTPD_CONF_OPTS += --with-lua
57 else
58 LIGHTTPD_CONF_OPTS += --without-lua
59 endif
61 define LIGHTTPD_INSTALL_CONFIG
62 $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/lighttpd/conf.d
63 $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/www
64 $(INSTALL) -D -m 0644 $(@D)/doc/config/lighttpd.conf \
65 $(TARGET_DIR)/etc/lighttpd/lighttpd.conf
66 $(INSTALL) -D -m 0644 $(@D)/doc/config/modules.conf \
67 $(TARGET_DIR)/etc/lighttpd/modules.conf
68 $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/access_log.conf \
69 $(TARGET_DIR)/etc/lighttpd/conf.d/access_log.conf
70 $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/debug.conf \
71 $(TARGET_DIR)/etc/lighttpd/conf.d/debug.conf
72 $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/dirlisting.conf \
73 $(TARGET_DIR)/etc/lighttpd/conf.d/dirlisting.conf
74 $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/mime.conf \
75 $(TARGET_DIR)/etc/lighttpd/conf.d/mime.conf
76 endef
78 LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG
80 define LIGHTTPD_INSTALL_INIT_SYSV
81 $(INSTALL) -D -m 0755 package/lighttpd/S50lighttpd \
82 $(TARGET_DIR)/etc/init.d/S50lighttpd
83 endef
85 define LIGHTTPD_INSTALL_INIT_SYSTEMD
86 $(INSTALL) -D -m 0644 $(@D)/doc/systemd/lighttpd.service \
87 $(TARGET_DIR)/usr/lib/systemd/system/lighttpd.service
89 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
91 ln -fs ../../../../usr/lib/systemd/system/lighttpd.service \
92 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lighttpd.service
93 endef
95 $(eval $(autotools-package))