2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
58N/A
2N/A#
2N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
32N/A#
32N/A
127N/ACOMPILER = gcc
127N/A
145N/Ainclude ../../make-rules/shared-macros.mk
127N/A
127N/APATH=/usr/bin:/usr/gnu/bin:/usr/sbin:/usr/perl5/bin
127N/A
127N/ACOMPONENT_NAME= squid
177N/ACOMPONENT_VERSION= 3.5.5
177N/ACOMPONENT_PROJECT_URL= http://www.squid-cache.org/
177N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
145N/ACOMPONENT_ARCHIVE_HASH= \
26N/A sha256:23793da6b23871765188becae59a6f4b6c3672c256ba9be90743b46a3c7921cf
38N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)Versions/v3/3.5/$(COMPONENT_ARCHIVE)
38N/ACOMPONENT_BUGDB= utility/squid
29N/A
93N/ATPNO= 23264
29N/A
29N/Ainclude $(WS_MAKE_RULES)/prep.mk
26N/Ainclude $(WS_MAKE_RULES)/configure.mk
26N/Ainclude $(WS_MAKE_RULES)/ips.mk
29N/A
26N/ACC += $(CC_BITS)
2N/ACXX += $(CC_BITS)
38N/A
2N/ACFLAGS += -I/usr/include/kerberosv5
6N/ACFLAGS += $(CPP_LARGEFILES)
2N/A
58N/A# Squid has own prefix
2N/ACONFIGURE_PREFIX = /usr/squid
145N/A
145N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
34N/ACONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/libexec
34N/ACONFIGURE_OPTIONS += --localstatedir=/var/squid
34N/ACONFIGURE_OPTIONS += --sharedstatedir=/var/squid
49N/ACONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/squid
145N/ACONFIGURE_OPTIONS += --mandir=$(CONFIGURE_PREFIX)/man
2N/ACONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_PREFIX)/sbin
34N/ACONFIGURE_OPTIONS += --enable-arp-acl
34N/ACONFIGURE_OPTIONS += --enable-auth-basic='DB,NCSA,NIS,LDAP,PAM,getpwnam,MSNT-multi-domain,POP3,SMB,SMB_LM,SASL'
94N/ACONFIGURE_OPTIONS += --enable-cache-digests
94N/ACONFIGURE_OPTIONS += --enable-carp
156N/ACONFIGURE_OPTIONS += --enable-coss-aio-ops
156N/ACONFIGURE_OPTIONS += --enable-delay-pools
34N/ACONFIGURE_OPTIONS += --enable-auth-digest='file,LDAP'
59N/ACONFIGURE_OPTIONS += --enable-external-acl-helpers='file_userip,unix_group,LDAP_group,wbinfo_group'
186N/ACONFIGURE_OPTIONS += --enable-follow-x-forwarded-for
186N/ACONFIGURE_OPTIONS += --enable-forward-log
186N/ACONFIGURE_OPTIONS += --enable-forw-via-db
186N/ACONFIGURE_OPTIONS += --enable-htcp
72N/ACONFIGURE_OPTIONS += --enable-icmp
72N/ACONFIGURE_OPTIONS += --enable-large-cache-files
72N/ACONFIGURE_OPTIONS += --enable-multicast-miss
59N/ACONFIGURE_OPTIONS += --enable-auth-negotiate='kerberos'
2N/ACONFIGURE_OPTIONS += --enable-auth-ntlm='smb_lm,fake'
85N/ACONFIGURE_OPTIONS += --enable-ntlm-fail-open
61N/ACONFIGURE_OPTIONS += --enable-removal-policies='heap,lru'
61N/ACONFIGURE_OPTIONS += --enable-snmp
220N/ACONFIGURE_OPTIONS += --enable-ssl
61N/ACONFIGURE_OPTIONS += --enable-storeio='aufs,diskd,ufs'
61N/ACONFIGURE_OPTIONS += --enable-x-accelerator-vary
172N/ACONFIGURE_OPTIONS += --with-aio
61N/ACONFIGURE_OPTIONS += --with-aufs-threads=8
61N/ACONFIGURE_OPTIONS += --with-large-files
220N/ACONFIGURE_OPTIONS += --with-build-environment=POSIX_V6_ILP32_OFFBIG
220N/ACONFIGURE_OPTIONS += --with-pthreads
61N/ACONFIGURE_OPTIONS += --without-nettle
172N/A
61N/ACOMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
172N/A
61N/A# Appends the following line to the end of the squid.conf configuration
152N/A# file. This line is necessary for running squid for testing.
74N/A# This starts up squid as user webservd.
61N/ACOMPONENT_POST_INSTALL_ACTION += \
220N/A (cd $(PROTO_DIR)/etc/squid ; \
85N/A echo '\ncache_effective_user webservd' >> squid.conf)
172N/A
61N/AASLR_MODE = $(ASLR_ENABLE)
172N/A
61N/A# common targets
172N/Abuild: $(BUILD_32)
61N/A
61N/Ainstall: $(INSTALL_32)
220N/A
61N/A# configure says it needs cppunit to test with.
61N/A# After some work I can get cppunit to build but it quickly
172N/A# falls over during test so giving up.
61N/A# I don't think the test suite really tests squid's functionality anyways.
172N/A#
61N/A# To test manually follow along in the book
152N/A# Squid Proxy Server 3.1 Beginner's Guide Page 34
152N/A#
220N/A# Add this to the top of /etc/squid/squid.conf:
61N/A# cache_dir ufs /var/squid/cache/ 500 16 256
61N/A# acl my_machine src 192.0.2.21 # Replace with your desktop's IP address
43N/A# http_access allow my_machine
220N/A#
43N/A# You will probably need to remove or comment out the following lines or Squid
120N/A# will fail to start:
64N/A# # acl manager proto cache_object
64N/A#
64N/A# Make sure apache is running.
43N/A# # svcs apache22
43N/A# Start squid:
120N/A# # svcadm enable squid
64N/A# On your desktop set your web browser to proxy through this squid:
64N/A# Edit -> Preferences -> Advanced -> Network -> Settings
64N/A# Check: Manual proxy configuration
220N/A# HTTP Proxy: <squid servers IP address> Port: 3128
64N/A# Save
64N/A# Enter <squid server URL> in your web browser. You should be accessing squid
64N/A# and seeing files stored in the http server on that machine.
64N/A# Enter <squid server URL>:897 in your web browser and squid should complain.
64N/A# Squid is working properly.
64N/A
64N/Atest: $(NO_TESTS)
64N/A
64N/A
43N/AREQUIRED_PACKAGES += library/libtool/libltdl
16N/AREQUIRED_PACKAGES += library/security/openssl
16N/AREQUIRED_PACKAGES += runtime/perl-512
16N/AREQUIRED_PACKAGES += shell/ksh93
34N/AREQUIRED_PACKAGES += system/core-os
34N/AREQUIRED_PACKAGES += system/library
16N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
6N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
12N/AREQUIRED_PACKAGES += system/library/math
12N/AREQUIRED_PACKAGES += system/library/security/crypto
12N/AREQUIRED_PACKAGES += system/library/security/gss
12N/AREQUIRED_PACKAGES += system/library/security/libsasl
12N/AREQUIRED_PACKAGES += system/network
12N/AREQUIRED_PACKAGES += service/security/kerberos-5
12N/A