You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

328 lines
8.3 KiB

  1. #
  2. # Copyright (C) 2006-2012 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=lighttpd
  9. PKG_VERSION:=1.4.35
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://download.lighttpd.net/lighttpd/releases-1.4.x
  13. PKG_MD5SUM:=c7ae774eab4cb7ac85e41b712f4ee9ba
  14. PKG_FIXUP:=autoreconf
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/lighttpd/Default
  18. SUBMENU:=Web Servers/Proxies
  19. SECTION:=net
  20. CATEGORY:=Network
  21. URL:=http://www.lighttpd.net/
  22. MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  23. endef
  24. define Package/lighttpd
  25. $(call Package/lighttpd/Default)
  26. MENU:=1
  27. DEPENDS:=+LIGHTTPD_SSL:libopenssl +libpcre +libpthread
  28. TITLE:=A flexible and lightweight web server
  29. endef
  30. define Package/lighttpd/config
  31. config LIGHTTPD_SSL
  32. bool "SSL support"
  33. depends on PACKAGE_lighttpd
  34. default y
  35. help
  36. Implements SSL support in lighttpd (using libopenssl). This
  37. option is required if you enable the SSL engine in your
  38. lighttpd confguration file.
  39. endef
  40. define Package/lighttpd-mod-access
  41. $(call Package/lighttpd/Default)
  42. DEPENDS:=lighttpd
  43. TITLE:=Access restrictions module
  44. endef
  45. define Package/lighttpd-mod-accesslog
  46. $(call Package/lighttpd/Default)
  47. DEPENDS:=lighttpd
  48. TITLE:=Access logging module
  49. endef
  50. define Package/lighttpd-mod-alias
  51. $(call Package/lighttpd/Default)
  52. DEPENDS:=lighttpd
  53. TITLE:=Directory alias module
  54. endef
  55. define Package/lighttpd-mod-auth
  56. $(call Package/lighttpd/Default)
  57. DEPENDS:=lighttpd
  58. TITLE:=Authentication module
  59. endef
  60. define Package/lighttpd-mod-cgi
  61. $(call Package/lighttpd/Default)
  62. DEPENDS:=lighttpd
  63. TITLE:=CGI module
  64. endef
  65. define Package/lighttpd-mod-cml
  66. $(call Package/lighttpd/Default)
  67. DEPENDS:=lighttpd
  68. TITLE:=Cache Meta Language module
  69. endef
  70. define Package/lighttpd-mod-compress
  71. $(call Package/lighttpd/Default)
  72. DEPENDS:=lighttpd +zlib
  73. TITLE:=Compress output module
  74. endef
  75. define Package/lighttpd-mod-evasive
  76. $(call Package/lighttpd/Default)
  77. DEPENDS:=lighttpd
  78. TITLE:=Evasive module
  79. endef
  80. define Package/lighttpd-mod-evhost
  81. $(call Package/lighttpd/Default)
  82. DEPENDS:=lighttpd
  83. TITLE:=Exnhanced Virtual-Hosting module
  84. endef
  85. define Package/lighttpd-mod-expire
  86. $(call Package/lighttpd/Default)
  87. DEPENDS:=lighttpd
  88. TITLE:=Expire module
  89. endef
  90. define Package/lighttpd-mod-extforward
  91. $(call Package/lighttpd/Default)
  92. DEPENDS:=lighttpd
  93. TITLE:=Extract client IP module
  94. endef
  95. define Package/lighttpd-mod-fastcgi
  96. $(call Package/lighttpd/Default)
  97. DEPENDS:=lighttpd
  98. TITLE:=FastCGI module
  99. endef
  100. define Package/lighttpd-mod-flv-streaming
  101. $(call Package/lighttpd/Default)
  102. DEPENDS:=lighttpd
  103. TITLE:=flv streaming module
  104. endef
  105. define Package/lighttpd-mod-magnet
  106. $(call Package/lighttpd/Default)
  107. DEPENDS:=lighttpd
  108. TITLE:=magnet module
  109. endef
  110. define Package/lighttpd-mod-mysql-vhost
  111. $(call Package/lighttpd/Default)
  112. DEPENDS:=lighttpd +libmysqlclient
  113. TITLE:=Mysql virtual hosting module
  114. endef
  115. define Package/lighttpd-mod-proxy
  116. $(call Package/lighttpd/Default)
  117. DEPENDS:=lighttpd
  118. TITLE:=Proxy module
  119. endef
  120. define Package/lighttpd-mod-redirect
  121. $(call Package/lighttpd/Default)
  122. DEPENDS:=lighttpd +libpcre
  123. TITLE:=URL redirection module
  124. endef
  125. define Package/lighttpd-mod-rewrite
  126. $(call Package/lighttpd/Default)
  127. DEPENDS:=lighttpd +libpcre
  128. TITLE:=URL rewriting module
  129. endef
  130. define Package/lighttpd-mod-rrdtool
  131. $(call Package/lighttpd/Default)
  132. DEPENDS:=lighttpd
  133. TITLE:=rrdtool module
  134. endef
  135. define Package/lighttpd-mod-scgi
  136. $(call Package/lighttpd/Default)
  137. DEPENDS:=lighttpd
  138. TITLE:=SCGI module
  139. endef
  140. define Package/lighttpd-mod-secdownload
  141. $(call Package/lighttpd/Default)
  142. DEPENDS:=lighttpd
  143. TITLE:=Secure and fast download module
  144. endef
  145. define Package/lighttpd-mod-setenv
  146. $(call Package/lighttpd/Default)
  147. DEPENDS:=lighttpd
  148. TITLE:=Environment variable setting module
  149. endef
  150. define Package/lighttpd-mod-simple-vhost
  151. $(call Package/lighttpd/Default)
  152. DEPENDS:=lighttpd
  153. TITLE:=Simple virtual hosting module
  154. endef
  155. define Package/lighttpd-mod-ssi
  156. $(call Package/lighttpd/Default)
  157. DEPENDS:=lighttpd +libpcre
  158. TITLE:=SSI module
  159. endef
  160. define Package/lighttpd-mod-status
  161. $(call Package/lighttpd/Default)
  162. DEPENDS:=lighttpd
  163. TITLE:=Server status display module
  164. endef
  165. define Package/lighttpd-mod-trigger-b4-dl
  166. $(call Package/lighttpd/Default)
  167. DEPENDS:=lighttpd +libpcre
  168. TITLE:=Trigger before download module
  169. endef
  170. define Package/lighttpd-mod-userdir
  171. $(call Package/lighttpd/Default)
  172. DEPENDS:=lighttpd
  173. TITLE:=User directory module
  174. endef
  175. define Package/lighttpd-mod-usertrack
  176. $(call Package/lighttpd/Default)
  177. DEPENDS:=lighttpd
  178. TITLE:=User tracking module
  179. endef
  180. define Package/lighttpd-mod-webdav
  181. $(call Package/lighttpd/Default)
  182. DEPENDS:=lighttpd +libsqlite3 +libuuid +libxml2
  183. TITLE:=WebDAV module
  184. endef
  185. CONFIGURE_ARGS+= \
  186. --libdir=/usr/lib/lighttpd \
  187. --sysconfdir=/etc/lighttpd \
  188. --enable-shared \
  189. --enable-static \
  190. --disable-rpath \
  191. --without-attr \
  192. --without-bzip2 \
  193. --without-fam \
  194. --without-gdbm \
  195. --without-ldap \
  196. --without-lua \
  197. --without-memcache \
  198. --without-mysql \
  199. --with-pcre \
  200. --without-valgrind \
  201. $(call autoconf_bool,CONFIG_IPV6,ipv6)
  202. CONFIGURE_VARS+= \
  203. PCRE_LIB="-lpcre" \
  204. ifneq ($(strip $(CONFIG_LIGHTTPD_SSL)),)
  205. CONFIGURE_ARGS+= \
  206. --with-openssl="$(STAGING_DIR)/usr"
  207. else
  208. CONFIGURE_ARGS+= \
  209. --without-openssl
  210. endif
  211. ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-webdav),)
  212. CONFIGURE_ARGS+= \
  213. --with-webdav-locks \
  214. --with-webdav-props
  215. # XXX: needed by sqlite3 to prevent segfaults in mod_webdav.so
  216. CONFIGURE_VARS+= \
  217. LIBS="-lpthread"
  218. else
  219. CONFIGURE_ARGS+= \
  220. --without-webdav-locks \
  221. --without-webdav-props
  222. endif
  223. define Build/Configure
  224. $(call Build/Configure/Default)
  225. # XXX: override pcre (mis)detection by ./configure when cross-compiling
  226. echo "#define HAVE_LIBPCRE 1" >>$(PKG_BUILD_DIR)/config.h
  227. echo "#define HAVE_PCRE_H 1" >>$(PKG_BUILD_DIR)/config.h
  228. endef
  229. define Package/lighttpd/conffiles
  230. /etc/lighttpd/lighttpd.conf
  231. endef
  232. define Package/lighttpd/install
  233. $(INSTALL_DIR) $(1)/etc/lighttpd
  234. $(INSTALL_DATA) ./files/lighttpd.conf $(1)/etc/lighttpd/
  235. $(INSTALL_DIR) $(1)/etc/init.d
  236. $(INSTALL_BIN) ./files/lighttpd.init $(1)/etc/init.d/lighttpd
  237. $(INSTALL_DIR) $(1)/usr/lib/lighttpd
  238. for m in dirlisting indexfile staticfile; do \
  239. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$$${m}.so $(1)/usr/lib/lighttpd/ ; \
  240. done
  241. $(INSTALL_DIR) $(1)/usr/sbin
  242. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lighttpd $(1)/usr/sbin/
  243. endef
  244. define BuildPlugin
  245. define Package/$(1)/install
  246. [ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/lighttpd
  247. for m in $(2); do \
  248. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lighttpd/mod_$$$$$$$${m}.so $$(1)/usr/lib/lighttpd/ ; \
  249. done
  250. endef
  251. $$(eval $$(call BuildPackage,$(1)))
  252. endef
  253. $(eval $(call BuildPackage,lighttpd))
  254. $(eval $(call BuildPlugin,lighttpd-mod-access,access))
  255. $(eval $(call BuildPlugin,lighttpd-mod-accesslog,accesslog))
  256. $(eval $(call BuildPlugin,lighttpd-mod-alias,alias))
  257. $(eval $(call BuildPlugin,lighttpd-mod-auth,auth))
  258. $(eval $(call BuildPlugin,lighttpd-mod-cgi,cgi))
  259. $(eval $(call BuildPlugin,lighttpd-mod-cml,cml))
  260. $(eval $(call BuildPlugin,lighttpd-mod-compress,compress))
  261. $(eval $(call BuildPlugin,lighttpd-mod-evasive,evasive))
  262. $(eval $(call BuildPlugin,lighttpd-mod-evhost,evhost))
  263. $(eval $(call BuildPlugin,lighttpd-mod-expire,expire))
  264. $(eval $(call BuildPlugin,lighttpd-mod-extforward,extforward))
  265. $(eval $(call BuildPlugin,lighttpd-mod-fastcgi,fastcgi))
  266. $(eval $(call BuildPlugin,lighttpd-mod-flv-streaming,flv_streaming))
  267. $(eval $(call BuildPlugin,lighttpd-mod-magnet,magnet))
  268. $(eval $(call BuildPlugin,lighttpd-mod-proxy,proxy))
  269. $(eval $(call BuildPlugin,lighttpd-mod-redirect,redirect))
  270. $(eval $(call BuildPlugin,lighttpd-mod-rewrite,rewrite))
  271. $(eval $(call BuildPlugin,lighttpd-mod-rrdtool,rrdtool))
  272. $(eval $(call BuildPlugin,lighttpd-mod-scgi,scgi))
  273. $(eval $(call BuildPlugin,lighttpd-mod-secdownload,secdownload))
  274. $(eval $(call BuildPlugin,lighttpd-mod-setenv,setenv))
  275. $(eval $(call BuildPlugin,lighttpd-mod-simple-vhost,simple_vhost))
  276. $(eval $(call BuildPlugin,lighttpd-mod-ssi,ssi))
  277. $(eval $(call BuildPlugin,lighttpd-mod-status,status))
  278. $(eval $(call BuildPlugin,lighttpd-mod-trigger-b4-dl,trigger_b4_dl))
  279. $(eval $(call BuildPlugin,lighttpd-mod-userdir,userdir))
  280. $(eval $(call BuildPlugin,lighttpd-mod-usertrack,usertrack))
  281. $(eval $(call BuildPlugin,lighttpd-mod-webdav,webdav))