2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
15 PKG_MAINTAINER
:=Marko Ratkaj
<marko.ratkaj@sartura.hr
>
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
18 PKG_SOURCE_URL
:=http
://www3.us.squid-cache.org
/Versions
/v4
/ \
19 http
://www2.pl.squid-cache.org
/Versions
/v4
/ \
20 http
://www.squid-cache.org
/Versions
/v4
/
21 PKG_HASH
:=091da0d763307dcc0f5c784ab07ea0c5a093f6dfac60f17ff26e2a6d50f76a07
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/squid
/Default
31 SUBMENU
:=Web Servers
/Proxies
32 URL
:=http
://www.squid-cache.org
/
36 $(call Package
/squid
/Default
)
38 DEPENDS
:=+libpthread
+librt
+libltdl
+libstdcpp
+libatomic
+USE_GLIBC
:libbsd
39 DEPENDS
+= +SQUID_use-gnutls
:libgnutls
+!SQUID_use-gnutls
:libopenssl
40 DEPENDS
+= +SQUID_with-libcap
:libcap
41 DEPENDS
+= +SQUID_with-nettle
:libnettle
42 DEPENDS
+= +SQUID_with-expat
:libexpat
43 DEPENDS
+= +SQUID_with-libxml2
:libxml2
44 USERID
:=squid
=137:squid
=137
45 TITLE
:=full-featured Web proxy cache
48 define Package
/squid
/description
49 Squid is a caching proxy for the Web supporting HTTP
, HTTPS
, FTP
, and more.
50 It reduces bandwidth and improves response times by caching and reusing
51 frequently-requested web pages.
54 define Package
/squid
/config
55 source
"$(SOURCE)/Config.in"
58 define Package
/squid
/conffiles
62 define Package
/squid-mod-cachemgr
63 $(call Package
/squid
/Default
)
65 TITLE
:=Web based proxy manager and reporting tool
70 --datadir=/usr
/share
/squid \
71 --libexecdir
=/usr
/lib
/squid \
72 --sysconfdir
=/etc
/squid \
75 --enable-delay-pools \
76 --enable-kill-parent-hack \
78 --enable-cache-digests \
79 --enable-linux-netfilter \
81 --enable-x-accelerator-vary \
82 --disable-translation \
83 --disable-auto-locale \
89 --disable-external-acl-helpers \
90 --disable-arch-native \
91 --with-krb5-config
=no \
93 --without-netfilter-conntrack \
94 --disable-ident-lookups \
95 $(if
$(CONFIG_SQUID_auth-basic
),--enable
,--disable
)-auth-basic \
96 $(if
$(CONFIG_SQUID_auth-digest
),--enable
,--disable
)-auth-digest \
97 $(if
$(CONFIG_SQUID_auth-ntlm
),--enable
,--disable
)-auth-ntlm \
98 $(if
$(CONFIG_SQUID_auth-negotiate
),--enable
,--disable
)-auth-negotiate \
99 $(if
$(CONFIG_SQUID_enable-ipv6
),--enable
,--disable
)-dlmalloc \
100 $(if
$(CONFIG_SQUID_enable-ipv6
),--enable
,--disable
)-ipv6 \
101 $(if
$(CONFIG_SQUID_enable-ssl-crtd
),--enable-ssl-crtd
) \
102 $(if
$(CONFIG_SQUID_use-gnutls
),--with
,--without
)-gnutls \
103 $(if
$(CONFIG_SQUID_use-gnutls
),--without-openssl
) \
104 $(if
$(CONFIG_SQUID_use-gnutls
),,--with-openssl
="$(STAGING_DIR)/usr") \
105 $(if
$(CONFIG_SQUID_enable-icmp
),--enable
,--disable
)-icmp \
106 $(if
$(CONFIG_SQUID_enable-icap-client
),--enable
,--disable
)-icap-client \
107 $(if
$(CONFIG_SQUID_enable-snmp
),--enable
,--disable
)-snmp \
108 $(if
$(CONFIG_SQUID_with-libcap
),--with
,--without
)-libcap \
109 $(if
$(CONFIG_SQUID_with-nettle
),--with
,--without
)-nettle \
110 $(if
$(CONFIG_SQUID_with-expat
),--with
,--without
)-expat \
111 $(if
$(CONFIG_SQUID_with-libxml2
),--with
,--without
)-libxml2
114 ac_cv_header_linux_netfilter_ipv4_h
=yes \
115 ac_cv_epoll_works
=yes
118 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/lib
all
119 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
120 DESTDIR
="$(PKG_INSTALL_DIR)" \
124 define Package
/squid
/install
125 $(INSTALL_DIR
) $(1)/usr
/sbin
126 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/squid
$(1)/usr
/sbin
/
128 $(INSTALL_DIR
) $(1)/usr
/lib
/squid
129 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/squid
/* $(1)/usr
/lib
/squid
/
131 $(INSTALL_DIR
) $(1)/etc
/config
132 $(INSTALL_CONF
) .
/files
/squid.config
$(1)/etc
/config
/squid
134 $(INSTALL_DIR
) $(1)/etc
/squid
135 $(CP
) $(PKG_INSTALL_DIR
)/etc
/squid
/* $(1)/etc
/squid
/
136 $(INSTALL_CONF
) .
/files
/squid.conf
$(1)/etc
/squid
/
138 $(INSTALL_DIR
) $(1)/etc
/init.d
/
139 $(INSTALL_BIN
) .
/files
/squid.init
$(1)/etc
/init.d
/squid
141 $(INSTALL_DIR
) $(1)/usr
/share
/squid
/icons
/
142 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/squid
/icons
/* $(1)/usr
/share
/squid
/icons
/
143 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/squid
/mib.txt
$(1)/usr
/share
/squid
/
145 $(INSTALL_DIR
) $(1)/usr
/share
/squid
/errors
/templates
/
146 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/squid
/errors
/templates
/* $(1)/usr
/share
/squid
/errors
/templates
/
149 define Package
/squid-mod-cachemgr
/install
150 $(INSTALL_DIR
) $(1)/www
/cgi-bin
/
151 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/squid
/cachemgr.cgi
$(1)/www
/cgi-bin
/
154 $(eval
$(call BuildPackage
,squid
))
155 $(eval
$(call BuildPackage
,squid-mod-cachemgr
))