update lighttpd to 1.4.15
[openwrt/svn-archive/archive.git] / net / lighttpd / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=lighttpd
12 PKG_VERSION:=1.4.15
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=http://www.lighttpd.net/download/
18 PKG_MD5SUM:=b994b8c359da578dec073cae52c4924f
19 PKG_CAT:=bzcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/lighttpd/Default
26 SECTION:=net
27 CATEGORY:=Network
28 URL:=http://www.lighttpd.net/
29 endef
30
31 define Package/lighttpd
32 $(call Package/lighttpd/Default)
33 MENU:=1
34 SECTION:=net
35 CATEGORY:=Network
36 DEPENDS:=+libopenssl +libpcre +libpthread +libsqlite3 +libxml2
37 TITLE:=A flexible and lightweight web server
38 URL:=http://www.lighttpd.net/
39 endef
40
41 define Package/lighttpd/conffiles
42 /etc/lighttpd.conf
43 /etc/default/lighttpd
44 /etc/init.d/lighttpd
45 endef
46
47 define Package/lighttpd-mod-accesslog
48 $(call Package/lighttpd/Default)
49 DEPENDS:=lighttpd
50 TITLE:=Access logging module
51 endef
52
53 define Package/lighttpd-mod-alias
54 $(call Package/lighttpd/Default)
55 DEPENDS:=lighttpd
56 TITLE:=Directory alias module
57 endef
58
59 define Package/lighttpd-mod-auth
60 $(call Package/lighttpd/Default)
61 DEPENDS:=lighttpd
62 TITLE:=Authentication module
63 endef
64
65 define Package/lighttpd-mod-cgi
66 $(call Package/lighttpd/Default)
67 DEPENDS:=lighttpd
68 TITLE:=CGI module
69 endef
70
71 define Package/lighttpd-mod-evasive
72 $(call Package/lighttpd/Default)
73 DEPENDS:=lighttpd
74 TITLE:=Evasive module
75 endef
76
77 define Package/lighttpd-mod-expire
78 $(call Package/lighttpd/Default)
79 DEPENDS:=lighttpd
80 TITLE:=Expire module
81 endef
82
83 define Package/lighttpd-mod-fastcgi
84 $(call Package/lighttpd/Default)
85 DEPENDS:=lighttpd
86 TITLE:=FastCGI module
87 endef
88
89 define Package/lighttpd-mod-proxy
90 $(call Package/lighttpd/Default)
91 DEPENDS:=lighttpd
92 TITLE:=Proxy module
93 endef
94
95 define Package/lighttpd-mod-redirect
96 $(call Package/lighttpd/Default)
97 DEPENDS:=lighttpd
98 TITLE:=URL redirection module
99 endef
100
101 define Package/lighttpd-mod-rewrite
102 $(call Package/lighttpd/Default)
103 DEPENDS:=lighttpd
104 TITLE:=URL rewriting module
105 endef
106
107 define Package/lighttpd-mod-setenv
108 $(call Package/lighttpd/Default)
109 DEPENDS:=lighttpd
110 TITLE:=Environment variable setting module
111 endef
112
113 define Package/lighttpd-mod-simple-vhost
114 $(call Package/lighttpd/Default)
115 DEPENDS:=lighttpd
116 TITLE:=Simple virtual hosting module
117 endef
118
119 define Package/lighttpd-mod-ssi
120 $(call Package/lighttpd/Default)
121 DEPENDS:=lighttpd
122 TITLE:=SSI module
123 endef
124
125 define Package/lighttpd-mod-status
126 $(call Package/lighttpd/Default)
127 DEPENDS:=lighttpd
128 TITLE:=Server status display module
129 endef
130
131 define Package/lighttpd-mod-usertrack
132 $(call Package/lighttpd/Default)
133 DEPENDS:=lighttpd
134 TITLE:=User tracking module
135 endef
136
137 define Package/lighttpd-mod-webdav
138 $(call Package/lighttpd/Default)
139 DEPENDS:=lighttpd
140 TITLE:=WebDAV module
141 endef
142
143
144 define Build/Configure
145 $(call Build/Configure/Default, \
146 --libdir=/usr/lib/lighttpd \
147 --sysconfdir=/etc/lighttpd \
148 --enable-shared \
149 --enable-static \
150 --disable-rpath \
151 --without-attr \
152 --without-bzip2 \
153 --without-fam \
154 --without-gdbm \
155 --without-ldap \
156 --without-lua \
157 --without-memcache \
158 --without-mysql \
159 --with-openssl="$(STAGING_DIR)/usr" \
160 --with-pcre \
161 --without-valgrind \
162 --with-webdav-props \
163 , \
164 CPPFLAGS="-I$(STAGING_DIR)/usr/include/libxml2 $$$$CPPFLAGS" \
165 PCRE_LIB="-lpcre" \
166 );
167 endef
168
169 define Build/Compile
170 rm -rf $(PKG_INSTALL_DIR)
171 mkdir -p $(PKG_INSTALL_DIR)
172 $(MAKE) -C $(PKG_BUILD_DIR) \
173 DESTDIR="$(PKG_INSTALL_DIR)" \
174 all install
175 endef
176
177 define Package/lighttpd/install
178 $(INSTALL_DIR) $(1)/etc
179 $(INSTALL_DATA) ./files/lighttpd.conf $(1)/etc/
180 $(INSTALL_DIR) $(1)/etc/default
181 $(INSTALL_DATA) ./files/lighttpd.default $(1)/etc/default/lighttpd
182 $(INSTALL_DIR) $(1)/etc/init.d
183 $(INSTALL_BIN) ./files/lighttpd.init $(1)/etc/init.d/lighttpd
184 $(INSTALL_DIR) $(1)/usr/lib/lighttpd
185 for m in dirlisting indexfile staticfile; do \
186 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$$${m}.so $(1)/usr/lib/lighttpd/ ; \
187 done
188 $(INSTALL_DIR) $(1)/usr/sbin
189 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/lighttpd $(1)/usr/sbin/
190 endef
191
192 define BuildPlugin
193 define Package/$(1)/install
194 [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/lighttpd
195 for m in $(2); do \
196 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$$$$$$${m}.so $$(1)/usr/lib/lighttpd/ ; \
197 done
198 endef
199
200 $$(eval $$(call BuildPackage,$(1)))
201 endef
202
203 $(eval $(call BuildPackage,lighttpd))
204 $(eval $(call BuildPlugin,lighttpd-mod-accesslog,accesslog))
205 $(eval $(call BuildPlugin,lighttpd-mod-alias,alias))
206 $(eval $(call BuildPlugin,lighttpd-mod-auth,auth))
207 $(eval $(call BuildPlugin,lighttpd-mod-cgi,cgi))
208 $(eval $(call BuildPlugin,lighttpd-mod-evasive,evasive))
209 $(eval $(call BuildPlugin,lighttpd-mod-expire, expire))
210 $(eval $(call BuildPlugin,lighttpd-mod-fastcgi,fastcgi))
211 $(eval $(call BuildPlugin,lighttpd-mod-proxy,proxy))
212 $(eval $(call BuildPlugin,lighttpd-mod-redirect,redirect))
213 $(eval $(call BuildPlugin,lighttpd-mod-rewrite,rewrite))
214 $(eval $(call BuildPlugin,lighttpd-mod-setenv,setenv))
215 $(eval $(call BuildPlugin,lighttpd-mod-simple-vhost,simple_vhost))
216 $(eval $(call BuildPlugin,lighttpd-mod-ssi,ssi))
217 $(eval $(call BuildPlugin,lighttpd-mod-status,status))
218 $(eval $(call BuildPlugin,lighttpd-mod-usertrack,usertrack))
219 $(eval $(call BuildPlugin,lighttpd-mod-webdav,webdav))