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