1 ################################################################################
5 ################################################################################
7 SQUID_VERSION_MAJOR
= 3.5
8 SQUID_VERSION
= $(SQUID_VERSION_MAJOR
).10
9 SQUID_SOURCE
= squid-
$(SQUID_VERSION
).
tar.xz
10 SQUID_SITE
= http
://www.squid-cache.org
/Versions
/v3
/$(SQUID_VERSION_MAJOR
)
11 SQUID_LICENSE
= GPLv2
+
12 SQUID_LICENSE_FILES
= COPYING
13 # For 0001-assume-get-certificate-ok.patch
14 SQUID_AUTORECONF
= YES
15 SQUID_DEPENDENCIES
= libcap host-libcap host-pkgconf \
16 $(if
$(BR2_PACKAGE_LIBNETFILTER_CONNTRACK
),libnetfilter_conntrack
)
18 ac_cv_epoll_works
=yes \
19 ac_cv_func_setresuid
=yes \
20 ac_cv_func_va_copy
=yes \
21 ac_cv_func___va_copy
=yes \
22 ac_cv_func_strnstr
=no \
23 ac_cv_have_squid
=yes \
24 BUILXCXX
="$(HOSTCXX)" \
25 BUILDCXXFLAGS
="$(HOST_CXXFLAGS)"
28 --enable-linux-netfilter \
29 --enable-removal-policies
="lru,heap" \
30 --with-filedescriptors
=1024 \
31 --disable-ident-lookups \
33 --enable-auth-basic
="fake getpwnam" \
34 --enable-auth-digest
="file" \
35 --enable-auth-negotiate
="wrapper" \
36 --enable-auth-ntlm
="fake" \
37 --disable-strict-error-checking \
38 --enable-external-acl-helpers
="file_userip" \
39 --with-logdir
=/var
/log
/squid
/ \
40 --with-pidfile
=/var
/run
/squid.pid \
41 --with-swapdir
=/var
/cache
/squid
/ \
42 --with-default-user
=squid
44 # Atomics in Squid use __sync_add_and_fetch_8, i.e a 64 bits atomic
45 # operation. This atomic intrinsic is only available natively on
46 # 64-bit architectures that have atomic operations. On 32-bit
47 # architectures, it would be provided by libatomic, but Buildroot
48 # typically doesn't provide it.
49 ifeq ($(BR2_ARCH_HAS_ATOMICS
)$(BR2_ARCH_IS_64
),yy
)
50 SQUID_CONF_ENV
+= squid_cv_gnu_atomics
=yes
52 SQUID_CONF_ENV
+= squid_cv_gnu_atomics
=no
55 # On uClibc librt needs libpthread
56 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS
)$(BR2_TOOLCHAIN_USES_UCLIBC
),yy
)
57 SQUID_CONF_ENV
+= ac_cv_search_shm_open
="-lrt -lpthread"
60 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
61 SQUID_CONF_OPTS
+= --with-openssl
62 SQUID_DEPENDENCIES
+= openssl
64 SQUID_CONF_OPTS
+= --without-openssl
67 ifeq ($(BR2_PACKAGE_GNUTLS
),y
)
68 SQUID_CONF_OPTS
+= --with-gnutls
69 SQUID_DEPENDENCIES
+= gnutls
71 SQUID_CONF_OPTS
+= --without-gnutls
74 define SQUID_CLEANUP_TARGET
75 rm -f
$(addprefix $(TARGET_DIR
)/usr
/bin
/, \
77 rm -f
$(addprefix $(TARGET_DIR
)/etc
/, \
78 cachemgr.conf mime.conf.default squid.conf.default
)
81 SQUID_POST_INSTALL_TARGET_HOOKS
+= SQUID_CLEANUP_TARGET
84 squid
-1 squid
-1 * - - - Squid proxy cache
87 define SQUID_INSTALL_INIT_SYSV
88 $(INSTALL
) -m
755 -D package
/squid
/S97squid \
89 $(TARGET_DIR
)/etc
/init.d
/S97squid
92 define SQUID_INSTALL_INIT_SYSTEMD
93 $(INSTALL
) -D
-m
0644 $(@D
)/tools
/systemd
/squid.service \
94 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/squid.service
95 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
96 ln
-sf ..
/..
/..
/..
//usr
/lib
/systemd
/system
/squid.service \
97 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/squid.service
100 $(eval
$(autotools-package
))