1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=squid
PKG_VERSION:=4.4
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www3.us.squid-cache.org/Versions/v4/ \
http://www2.pl.squid-cache.org/Versions/v4/ \
http://www.squid-cache.org/Versions/v4/
PKG_HASH:=4905e6da7f5574d2583ba36f398bb062a12d51e70d67035078b6e85b09e9ee82
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/squid/Default
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
URL:=http://www.squid-cache.org/
endef
define Package/squid
$(call Package/squid/Default)
MENU:=1
DEPENDS:=+libpthread +librt +libltdl +libstdcpp +libatomic +USE_GLIBC:libbsd
DEPENDS+= +SQUID_use-gnutls:libgnutls +SQUID_use-openssl:libopenssl
DEPENDS+= +SQUID_with-libcap:libcap
DEPENDS+= +SQUID_with-nettle:libnettle
DEPENDS+= +SQUID_with-expat:libexpat
DEPENDS+= +SQUID_with-libxml2:libxml2
USERID:=squid=137:squid=137
TITLE:=full-featured Web proxy cache
endef
define Package/squid/description
Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more.
It reduces bandwidth and improves response times by caching and reusing
frequently-requested web pages.
endef
define Package/squid/config
source "$(SOURCE)/Config.in"
endef
define Package/squid/conffiles
/etc/squid/squid.conf
endef
define Package/squid-mod-cachemgr
$(call Package/squid/Default)
DEPENDS:=squid
TITLE:=Web based proxy manager and reporting tool
endef
CONFIGURE_ARGS += \
BUILDCXX=$(HOSTCXX) \
BUILDCXXFLAGS=$(if $(HOST_CXXFLAGS),$(HOST_CXXFLAGS),-O2) \
--config-cache \
--datadir=/usr/share/squid \
--libexecdir=/usr/lib/squid \
--sysconfdir=/etc/squid \
--enable-shared \
--disable-static \
--enable-delay-pools \
--enable-kill-parent-hack \
--enable-ssl \
--enable-cache-digests \
--enable-linux-netfilter \
--disable-unlinkd \
--enable-x-accelerator-vary \
--disable-translation \
--disable-auto-locale \
--with-dl \
--with-pthreads \
--enable-epoll \
--with-maxfd=2048 \
--disable-ecap \
--disable-external-acl-helpers \
--disable-arch-native \
--with-krb5-config=no \
--without-mit-krb5 \
--without-netfilter-conntrack \
--disable-ident-lookups \
$(if $(CONFIG_SQUID_auth-basic),--enable,--disable)-auth-basic \
$(if $(CONFIG_SQUID_auth-digest),--enable,--disable)-auth-digest \
$(if $(CONFIG_SQUID_auth-ntlm),--enable,--disable)-auth-ntlm \
$(if $(CONFIG_SQUID_auth-negotiate),--enable,--disable)-auth-negotiate \
$(if $(CONFIG_SQUID_enable-ipv6),--enable,--disable)-dlmalloc \
$(if $(CONFIG_SQUID_enable-ipv6),--enable,--disable)-ipv6 \
$(if $(CONFIG_SQUID_enable-ssl-crtd),--enable-ssl-crtd) \
$(if $(CONFIG_SQUID_use-gnutls),--with,--without)-gnutls \
$(if $(CONFIG_SQUID_use-gnutls),--without-openssl) \
$(if $(CONFIG_SQUID_use-gnutls),,--with-openssl="$(STAGING_DIR)/usr") \
$(if $(CONFIG_SQUID_enable-icmp),--enable,--disable)-icmp \
$(if $(CONFIG_SQUID_enable-icap-client),--enable,--disable)-icap-client \
$(if $(CONFIG_SQUID_enable-snmp),--enable,--disable)-snmp \
$(if $(CONFIG_SQUID_with-libcap),--with,--without)-libcap \
$(if $(CONFIG_SQUID_with-nettle),--with,--without)-nettle \
$(if $(CONFIG_SQUID_with-expat),--with,--without)-expat \
$(if $(CONFIG_SQUID_with-libxml2),--with,--without)-libxml2
CONFIGURE_VARS += \
ac_cv_header_linux_netfilter_ipv4_h=yes \
ac_cv_epoll_works=yes
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib all
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
install
endef
define Package/squid/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/squid $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib/squid
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/squid/* $(1)/usr/lib/squid/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/squid.config $(1)/etc/config/squid
$(INSTALL_DIR) $(1)/etc/squid
$(CP) $(PKG_INSTALL_DIR)/etc/squid/* $(1)/etc/squid/
$(INSTALL_CONF) ./files/squid.conf $(1)/etc/squid/
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) ./files/squid.init $(1)/etc/init.d/squid
$(INSTALL_DIR) $(1)/usr/share/squid/icons/
$(CP) $(PKG_INSTALL_DIR)/usr/share/squid/icons/* $(1)/usr/share/squid/icons/
$(CP) $(PKG_INSTALL_DIR)/usr/share/squid/mib.txt $(1)/usr/share/squid/
$(INSTALL_DIR) $(1)/usr/share/squid/errors/templates/
$(CP) $(PKG_INSTALL_DIR)/usr/share/squid/errors/templates/* $(1)/usr/share/squid/errors/templates/
endef
define Package/squid-mod-cachemgr/install
$(INSTALL_DIR) $(1)/www/cgi-bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/squid/cachemgr.cgi $(1)/www/cgi-bin/
endef
$(eval $(call BuildPackage,squid))
$(eval $(call BuildPackage,squid-mod-cachemgr))
|