lede-packages-rs

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

Makefile (3502B)


      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:=squid
     11 PKG_VERSION:=3.5.12
     12 PKG_RELEASE:=1
     13 
     14 PKG_LICENSE:=GPL-2.0
     15 PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
     16 
     17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
     18 PKG_SOURCE_URL:=http://www.squid-cache.org/Versions/v3/3.5/
     19 PKG_MD5SUM:=50016bf6e2d3a3a186a6c7236d251f63
     20 
     21 PKG_BUILD_PARALLEL:=1
     22 PKG_INSTALL:=1
     23 
     24 include $(INCLUDE_DIR)/package.mk
     25 
     26 define Package/squid/Default
     27   SECTION:=net
     28   CATEGORY:=Network
     29   SUBMENU:=Web Servers/Proxies
     30   URL:=http://www.squid-cache.org/
     31 endef
     32 
     33 define Package/squid
     34   $(call Package/squid/Default)
     35   MENU:=1
     36   DEPENDS:=+libopenssl +libpthread +librt +libltdl +libstdcpp
     37   TITLE:=full-featured Web proxy cache
     38 endef
     39 
     40 define Package/squid/description
     41   Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more.
     42   It reduces bandwidth and improves response times by caching and reusing
     43   frequently-requested web pages.
     44 endef
     45 
     46 define Package/squid-mod-cachemgr
     47   $(call Package/squid/Default)
     48   DEPENDS:=squid
     49   TITLE:=Web based proxy manager and reporting tool
     50 endef
     51 
     52 CONFIGURE_ARGS += \
     53 	--config-cache \
     54 	--datadir=/usr/share/squid \
     55 	--libexecdir=/usr/lib/squid \
     56 	--sysconfdir=/etc/squid \
     57 	--enable-shared \
     58 	--disable-static \
     59 	--enable-icmp \
     60 	--enable-delay-pools \
     61 	--enable-icap-client \
     62 	--enable-kill-parent-hack \
     63 	--disable-snmp \
     64 	--enable-ssl \
     65 	--enable-ssl-crtd \
     66 	--enable-cache-digests \
     67 	--enable-linux-netfilter \
     68 	--disable-unlinkd \
     69 	--enable-x-accelerator-vary \
     70 	--disable-translation \
     71 	--disable-auto-locale \
     72 	--with-dl \
     73 	--with-pthreads \
     74 	--without-expat \
     75 	--without-libxml2 \
     76 	--without-gnutls \
     77 	--without-nettle \
     78 	--with-openssl=$(STAGING_DIR)/usr \
     79 	--enable-epoll \
     80 	--with-maxfd=4096 \
     81 	--disable-external-acl-helpers \
     82 	--disable-auth-negotiate \
     83 	--disable-auth-ntlm \
     84 	--disable-auth-digest \
     85 	--disable-auth-basic \
     86 	--disable-arch-native \
     87 	--with-krb5-config=no \
     88 	--without-mit-krb5 \
     89 	--without-libcap \
     90 	--without-netfilter-conntrack
     91 
     92 CONFIGURE_VARS += \
     93 	ac_cv_header_linux_netfilter_ipv4_h=yes \
     94 	ac_cv_epoll_works=yes \
     95 	squid_cv_gnu_atomics=no
     96 
     97 define Build/Compile
     98 	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib all
     99 	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
    100 		DESTDIR="$(PKG_INSTALL_DIR)" \
    101 		install
    102 endef
    103 
    104 define Package/squid/install
    105 	$(INSTALL_DIR) $(1)/usr/sbin
    106 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/squid $(1)/usr/sbin/
    107 
    108 	$(INSTALL_DIR) $(1)/usr/lib/squid
    109 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/squid/ssl_crtd $(1)/usr/lib/squid
    110 
    111 	$(INSTALL_DIR) $(1)/etc/config
    112 	$(INSTALL_CONF) ./files/squid.config $(1)/etc/config/squid
    113 
    114 	$(INSTALL_DIR) $(1)/etc/squid
    115 	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/squid/mime.conf $(1)/etc/squid/
    116 	$(INSTALL_CONF) ./files/squid.conf $(1)/etc/squid/
    117 
    118 	$(INSTALL_DIR) $(1)/etc/init.d/
    119 	$(INSTALL_BIN) ./files/squid.init $(1)/etc/init.d/squid
    120 
    121 	$(INSTALL_DIR) $(1)/usr/share/squid/icons/
    122 	$(CP) $(PKG_INSTALL_DIR)/usr/share/squid/icons/* $(1)/usr/share/squid/icons/
    123 
    124 	$(INSTALL_DIR) $(1)/usr/share/squid/errors/templates/
    125 	$(CP) $(PKG_INSTALL_DIR)/usr/share/squid/errors/templates/* $(1)/usr/share/squid/errors/templates/
    126 endef
    127 
    128 define Package/squid-mod-cachemgr/install
    129 	$(INSTALL_DIR) $(1)/www/cgi-bin/
    130 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/cachemgr.cgi $(1)/www/cgi-bin/
    131 endef
    132 
    133 $(eval $(call BuildPackage,squid))
    134 $(eval $(call BuildPackage,squid-mod-cachemgr))