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