lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (7960B)


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