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