summaryrefslogtreecommitdiff
path: root/package/lighttpd/Makefile
blob: c4523efd725965637746371a2174fa4a12a0028a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(ADK_TOPDIR)/rules.mk

PKG_NAME:=		lighttpd
PKG_VERSION:=		1.4.35
PKG_RELEASE:=		1
PKG_MD5SUM:=		c7ae774eab4cb7ac85e41b712f4ee9ba
PKG_DESCR:=		lightweight web server
PKG_SECTION:=		net/http
PKG_URL:=		http://www.lighttpd.net/
PKG_SITES:=		http://download.lighttpd.net/lighttpd/releases-1.4.x/

PKG_FLAVOURS_LIGHTTPD:=	WITH_IPV6 WITH_SSL
PKGFD_WITH_IPV6:=	enable ipv6 support
PKGFD_WITH_SSL:=	enable ssl support
PKGFB_WITH_SSL:=	openssl
PKGFS_WITH_SSL:=	libopenssl

PKG_SUBPKGS:=		LIGHTTPD LIGHTTPD_MOD_ALIAS LIGHTTPD_MOD_AUTH
PKG_SUBPKGS+=		LIGHTTPD_MOD_CGI LIGHTTPD_MOD_DIRLIST LIGHTTPD_MOD_EVASIVE LIGHTTPD_MOD_EXPIRE LIGHTTPD_MOD_FASTCGI
PKG_SUBPKGS+=		LIGHTTPD_MOD_PROXY LIGHTTPD_MOD_REDIRECT LIGHTTPD_MOD_REWRITE LIGHTTPD_MOD_SETENV
PKG_SUBPKGS+=		LIGHTTPD_MOD_VHOST LIGHTTPD_MOD_SSI LIGHTTPD_MOD_STATUS LIGHTTPD_MOD_USERTRACK
PKG_SUBPKGS+=		LIGHTTPD_MOD_WEBDAV
PKGSD_LIGHTTPD_MOD_ALIAS:=	alias support
PKGSN_LIGHTTPD_MOD_ALIAS:=	lighttpd
PKGSD_LIGHTTPD_MOD_AUTH:=	authentication support
PKGSN_LIGHTTPD_MOD_AUTH:=	lighttpd
PKGSD_LIGHTTPD_MOD_CGI:=	CGI support
PKGSN_LIGHTTPD_MOD_CGI:=	lighttpd
PKGSD_LIGHTTPD_MOD_DIRLIST:=	Dirlisting support
PKGSB_LIGHTTPD_MOD_DIRLIST:=	pcre
PKGSS_LIGHTTPD_MOD_DIRLIST:=	libpcre
PKGSN_LIGHTTPD_MOD_DIRLIST:=	lighttpd
PKGSD_LIGHTTPD_MOD_EVASIVE:=	Evasive support
PKGSN_LIGHTTPD_MOD_EVASIVE:=	lighttpd
PKGSD_LIGHTTPD_MOD_EXPIRE:=	Expire support
PKGSN_LIGHTTPD_MOD_EXPIRE:=	lighttpd
PKGSD_LIGHTTPD_MOD_FASTCGI:=	FastCGI support
PKGSN_LIGHTTPD_MOD_FASTCGI:=	lighttpd
PKGSD_LIGHTTPD_MOD_PROXY:=	Proxy support
PKGSN_LIGHTTPD_MOD_PROXY:=	lighttpd
PKGSD_LIGHTTPD_MOD_REDIRECT:=	Redirect support
PKGSN_LIGHTTPD_MOD_REDIRECT:=	lighttpd
PKGSD_LIGHTTPD_MOD_REWRITE:=	Rewrite support
PKGSN_LIGHTTPD_MOD_REWRITE:=	lighttpd
PKGSD_LIGHTTPD_MOD_SETENV:=	Setenv support
PKGSN_LIGHTTPD_MOD_SETENV:=	lighttpd
PKGSD_LIGHTTPD_MOD_VHOST:=	Simple Vhost support
PKGSN_LIGHTTPD_MOD_VHOST:=	lighttpd
PKGSD_LIGHTTPD_MOD_SSI:=	SSI support
PKGSN_LIGHTTPD_MOD_SSI:=	lighttpd
PKGSD_LIGHTTPD_MOD_STATUS:=	Status support
PKGSN_LIGHTTPD_MOD_STATUS:=	lighttpd
PKGSD_LIGHTTPD_MOD_USERTRACK:=	Usertracking support
PKGSN_LIGHTTPD_MOD_USERTRACK:=	lighttpd
PKGSD_LIGHTTPD_MOD_WEBDAV:=	Webdav support
PKGSB_LIGHTTPD_MOD_WEBDAV:=	libxml2 sqlite
PKGSS_LIGHTTPD_MOD_WEBDAV:=	libxml2 libsqlite
PKGSN_LIGHTTPD_MOD_WEBDAV:=	lighttpd

include $(ADK_TOPDIR)/mk/package.mk

define PKG_mod_template

INSTALL_MODS_$${ADK_PACKAGE_${1}}+=	${2}-install

${2}-install:
	${INSTALL_DIR} $$(IDIR_$(1))/usr/lib/lighttpd
	${INSTALL_BIN} $(WRKINST)/usr/lib/lighttpd/mod_$(2).so $$(IDIR_$(1))/usr/lib/lighttpd/

endef

$(eval $(call PKG_template,LIGHTTPD,lighttpd,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_ALIAS,lighttpd-mod-alias,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_ALIAS},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_AUTH,lighttpd-mod-auth,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_AUTH},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_CGI,lighttpd-mod-cgi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_CGI},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_DIRLIST,lighttpd-mod-dirlist,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_DIRLIST},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_EVASIVE,lighttpd-mod-evasive,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_EVASIVE},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_EXPIRE,lighttpd-mod-expire,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_EXPIRE},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_FASTCGI,lighttpd-mod-fastcgi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_FASTCGI},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_PROXY,lighttpd-mod-proxy,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_PROXY},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_REDIRECT,lighttpd-mod-redirect,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_REDIRECT},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_REWRITE,lighttpd-mod-rewrite,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_REWRITE},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_SETENV,lighttpd-mod-setenv,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_SETENV},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_VHOST,lighttpd-mod-vhost,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_VHOST},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_SSI,lighttpd-mod-ssi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_SSI},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_STATUS,lighttpd-mod-status,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_STATUS},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_USERTRACK,lighttpd-mod-usertrack,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_USERTRACK},${PKG_SECTION}))
$(eval $(call PKG_template,LIGHTTPD_MOD_WEBDAV,lighttpd-mod-webdav,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIGHTTPD_MOD_WEBDAV},${PKG_SECTION}))

$(eval $(call PKG_mod_template,LIGHTTPD_MOD_ALIAS,alias))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_AUTH,auth))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_CGI,cgi))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_DIRLIST,dirlisting))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_EVASIVE,evasive))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_EXPIRE,expire))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_FASTCGI,fastcgi))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_PROXY,proxy))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_REDIRECT,redirect))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_REWRITE,rewrite))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_SETENV,setenv))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_VHOST,simple_vhost))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_SSI,ssi))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_STATUS,status))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_USERTRACK,usertrack))
$(eval $(call PKG_mod_template,LIGHTTPD_MOD_WEBDAV,webdav))

CONFIGURE_ARGS+=	--libdir=/usr/lib/lighttpd \
			--sysconfdir=/etc/lighttpd \
			--without-attr \
			--without-zlib \
			--without-bzip2 \
			--without-fam \
			--without-gdbm \
			--without-ldap \
			--without-lua \
			--without-memcache \
			--without-mysql \
			--without-valgrind

ifneq ($(ADK_PACKAGE_LIGHTTPD_MOD_WEBDAV),)
CONFIGURE_ARGS+=	--with-webdav-props \
			--with-webdav-locks
else
CONFIGURE_ARGS+=	--without-webdav-props \
			--without-webdav-locks
endif

ifneq ($(ADK_PACKAGE_LIGHTTPD_MOD_SSI)$(ADK_PACKAGE_LIGHTTPD_MOD_DIRLIST)$(ADK_PACKAGE_LIGHTTPD_MOD_REWRITE)$(ADK_PACKAGE_LIGHTTPD_MOD_REDIRECT),)
CONFIGURE_ARGS+=	--with-pcre
CONFIGURE_ENV+=		PCRE_LIB="-lpcre"
else
CONFIGURE_ARGS+=	--without-pcre
endif

ifneq ($(ADK_PACKAGE_LIGHTTPD_WITH_IPV6),)
CONFIGURE_ARGS+=	--enable-ipv6
else
CONFIGURE_ARGS+=	--disable-ipv6
endif
ifneq ($(ADK_PACKAGE_LIGHTTPD_WITH_SSL),)
CONFIGURE_ARGS+=	--with-openssl
else
CONFIGURE_ARGS+=	--without-openssl
endif

post-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
	${INSTALL_DIR} $(IDIR_LIGHTTPD)/etc/lighttpd/conf.d
	${INSTALL_DATA} ./files/lighttpd.conf $(IDIR_LIGHTTPD)/etc/lighttpd
	${INSTALL_DATA} ./files/modules.conf $(IDIR_LIGHTTPD)/etc/lighttpd
	${CP} ${WRKBUILD}/doc/config/conf.d/*.conf \
		$(IDIR_LIGHTTPD)/etc/lighttpd/conf.d
	${CP} ./files/conf.d $(IDIR_LIGHTTPD)/etc/lighttpd
	${INSTALL_DIR} $(IDIR_LIGHTTPD)/usr/lib/lighttpd
	for m in indexfile staticfile accesslog; do \
		$(CP) $(WRKINST)/usr/lib/lighttpd/mod_$$m.so $(IDIR_LIGHTTPD)/usr/lib/lighttpd/ ; \
	done
	${INSTALL_DIR} $(IDIR_LIGHTTPD)/usr/sbin
	$(INSTALL_BIN) $(WRKINST)/usr/sbin/lighttpd $(IDIR_LIGHTTPD)/usr/sbin

include ${ADK_TOPDIR}/mk/pkg-bottom.mk