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