2013-06-06 07:53:30 +08:00
|
|
|
################################################################################
|
2009-12-23 20:30:45 +08:00
|
|
|
#
|
|
|
|
# squid
|
|
|
|
#
|
2013-06-06 07:53:30 +08:00
|
|
|
################################################################################
|
2009-12-23 20:30:45 +08:00
|
|
|
|
2020-08-29 17:51:19 +08:00
|
|
|
SQUID_VERSION = 4.13
|
2016-04-21 02:38:10 +08:00
|
|
|
SQUID_SOURCE = squid-$(SQUID_VERSION).tar.xz
|
2018-08-20 04:50:20 +08:00
|
|
|
SQUID_SITE = http://www.squid-cache.org/Versions/v4
|
2017-03-30 21:43:32 +08:00
|
|
|
SQUID_LICENSE = GPL-2.0+
|
2012-10-29 18:57:16 +08:00
|
|
|
SQUID_LICENSE_FILES = COPYING
|
2018-08-20 04:50:20 +08:00
|
|
|
SQUID_DEPENDENCIES = libcap host-libcap libxml2 host-pkgconf \
|
2012-10-29 18:57:16 +08:00
|
|
|
$(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack)
|
2014-12-24 15:54:24 +08:00
|
|
|
SQUID_CONF_ENV = \
|
|
|
|
ac_cv_epoll_works=yes \
|
|
|
|
ac_cv_func_setresuid=yes \
|
|
|
|
ac_cv_func_va_copy=yes \
|
|
|
|
ac_cv_func___va_copy=yes \
|
|
|
|
ac_cv_func_strnstr=no \
|
2015-01-08 09:09:27 +08:00
|
|
|
ac_cv_have_squid=yes \
|
2017-08-27 21:43:36 +08:00
|
|
|
BUILDCXX="$(HOSTCXX)" \
|
2015-01-28 04:30:54 +08:00
|
|
|
BUILDCXXFLAGS="$(HOST_CXXFLAGS)"
|
2014-12-24 15:54:24 +08:00
|
|
|
SQUID_CONF_OPTS = \
|
|
|
|
--enable-async-io=8 \
|
2018-10-09 19:49:34 +08:00
|
|
|
--enable-linux-netfilter \
|
2014-12-24 15:54:24 +08:00
|
|
|
--enable-removal-policies="lru,heap" \
|
|
|
|
--with-filedescriptors=1024 \
|
|
|
|
--disable-ident-lookups \
|
|
|
|
--enable-auth-basic="fake getpwnam" \
|
|
|
|
--enable-auth-digest="file" \
|
|
|
|
--enable-auth-negotiate="wrapper" \
|
|
|
|
--enable-auth-ntlm="fake" \
|
|
|
|
--disable-strict-error-checking \
|
|
|
|
--enable-external-acl-helpers="file_userip" \
|
|
|
|
--with-logdir=/var/log/squid/ \
|
|
|
|
--with-pidfile=/var/run/squid.pid \
|
|
|
|
--with-swapdir=/var/cache/squid/ \
|
2015-01-15 03:14:43 +08:00
|
|
|
--with-default-user=squid
|
2010-11-09 00:40:35 +08:00
|
|
|
|
2018-11-24 22:54:50 +08:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
|
|
|
SQUID_CONF_ENV += LIBS=-latomic
|
2015-03-29 22:33:31 +08:00
|
|
|
endif
|
|
|
|
|
2018-03-08 04:15:58 +08:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBKRB5),y)
|
|
|
|
SQUID_CONF_OPTS += --with-mit-krb5
|
|
|
|
SQUID_DEPENDENCIES += libkrb5
|
|
|
|
else
|
|
|
|
SQUID_CONF_OPTS += --without-mit-krb5
|
|
|
|
endif
|
|
|
|
|
2009-12-23 20:30:45 +08:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2015-07-06 16:02:04 +08:00
|
|
|
SQUID_CONF_OPTS += --with-openssl
|
2015-03-29 22:33:32 +08:00
|
|
|
SQUID_DEPENDENCIES += openssl
|
2015-07-06 23:53:35 +08:00
|
|
|
else
|
|
|
|
SQUID_CONF_OPTS += --without-openssl
|
2009-12-23 20:30:45 +08:00
|
|
|
endif
|
|
|
|
|
2015-07-06 16:02:05 +08:00
|
|
|
ifeq ($(BR2_PACKAGE_GNUTLS),y)
|
|
|
|
SQUID_CONF_OPTS += --with-gnutls
|
|
|
|
SQUID_DEPENDENCIES += gnutls
|
|
|
|
else
|
|
|
|
SQUID_CONF_OPTS += --without-gnutls
|
|
|
|
endif
|
|
|
|
|
2020-07-24 05:56:22 +08:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
|
|
|
SQUID_CONF_OPTS += --with-systemd
|
|
|
|
SQUID_DEPENDENCIES += systemd
|
|
|
|
else
|
|
|
|
SQUID_CONF_OPTS += --without-systemd
|
|
|
|
endif
|
|
|
|
|
2010-09-02 05:08:46 +08:00
|
|
|
define SQUID_CLEANUP_TARGET
|
2009-12-23 20:30:45 +08:00
|
|
|
rm -f $(addprefix $(TARGET_DIR)/usr/bin/, \
|
|
|
|
RunCache RunAccel)
|
|
|
|
rm -f $(addprefix $(TARGET_DIR)/etc/, \
|
|
|
|
cachemgr.conf mime.conf.default squid.conf.default)
|
2010-09-02 05:08:46 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET
|
|
|
|
|
2015-01-15 03:14:43 +08:00
|
|
|
define SQUID_USERS
|
|
|
|
squid -1 squid -1 * - - - Squid proxy cache
|
|
|
|
endef
|
|
|
|
|
2015-01-15 03:14:44 +08:00
|
|
|
define SQUID_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -m 755 -D package/squid/S97squid \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S97squid
|
|
|
|
endef
|
|
|
|
|
2015-05-23 18:07:42 +08:00
|
|
|
define SQUID_INSTALL_INIT_SYSTEMD
|
2015-08-06 17:06:32 +08:00
|
|
|
$(INSTALL) -D -m 0644 $(@D)/tools/systemd/squid.service \
|
2015-05-23 18:07:42 +08:00
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/squid.service
|
|
|
|
endef
|
|
|
|
|
2012-07-03 06:07:32 +08:00
|
|
|
$(eval $(autotools-package))
|