1################################################################################
2#
3# civetweb
4#
5################################################################################
6
7CIVETWEB_VERSION = 1.12
8CIVETWEB_SITE = http://github.com/civetweb/civetweb/tarball/v$(CIVETWEB_VERSION)
9CIVETWEB_LICENSE = MIT
10CIVETWEB_LICENSE_FILES = LICENSE.md
11
12CIVETWEB_CONF_OPT = TARGET_OS=LINUX
13CIVETWEB_COPT = $(TARGET_CFLAGS) -DHAVE_POSIX_FALLOCATE=0
14CIVETWEB_LDFLAGS = $(TARGET_LDFLAGS)
15CIVETWEB_SYSCONFDIR = /etc
16CIVETWEB_HTMLDIR = /var/www
17
18ifneq ($(BR2_LARGEFILE),y)
19	CIVETWEB_COPT += -DSQLITE_DISABLE_LFS
20endif
21
22ifeq ($(BR2_INET_IPV6),y)
23	CIVETWEB_CONF_OPT += WITH_IPV6=1
24endif
25
26ifeq ($(BR2_CIVETWEB_WITH_LUA),y)
27	CIVETWEB_CONF_OPT += WITH_LUA=1
28endif
29
30ifeq ($(BR2_PACKAGE_OPENSSL),y)
31	CIVETWEB_COPT += -DNO_SSL_DL -lcrypt -lssl
32	CIVETWEB_DEPENDENCIES += openssl
33else
34	CIVETWEB_COPT += -DNO_SSL
35endif
36
37define CIVETWEB_BUILD_CMDS
38	$(MAKE) CC="$(TARGET_CC)" -C $(@D) build \
39		$(CIVETWEB_CONF_OPT) \
40		COPT="$(CIVETWEB_COPT)"
41endef
42
43define CIVETWEB_INSTALL_TARGET_CMDS
44	$(MAKE) CC="$(TARGET_CC)" -C $(@D) install \
45		DOCUMENT_ROOT="$(CIVETWEB_HTMLDIR)" \
46		CONFIG_FILE2="$(CIVETWEB_SYSCONFDIR)/civetweb.conf" \
47		HTMLDIR="$(TARGET_DIR)$(CIVETWEB_HTMLDIR)" \
48		SYSCONFDIR="$(TARGET_DIR)$(CIVETWEB_SYSCONFDIR)" \
49		PREFIX="$(TARGET_DIR)/usr" \
50		$(CIVETWEB_CONF_OPT) \
51		COPT='$(CIVETWEB_COPT)'
52endef
53
54$(eval $(generic-package))
55
56