Makefile revision 7277
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync#
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# CDDL HEADER START
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync#
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# The contents of this file are subject to the terms of the
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# Common Development and Distribution License (the "License").
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# You may not use this file except in compliance with the License.
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync#
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# or http://www.opensolaris.org/os/licensing.
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# See the License for the specific language governing permissions
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# and limitations under the License.
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync#
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# When distributing Covered Code, include this CDDL HEADER in each
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# If applicable, add the following below this CDDL HEADER, with the
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync#
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# CDDL HEADER END
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync#
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync#
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync#
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncBUILD_BITS= 64
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCOMPILER= gcc
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncinclude ../../make-rules/shared-macros.mk
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncPATH=$(USRBINDIR):$(GNUBIN):$(USRSBINDIR):$(USRDIR)/perl5/bin
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCOMPONENT_NAME= squid
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCOMPONENT_VERSION= 3.5.18
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCOMPONENT_PROJECT_URL= http://www.squid-cache.org/
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCOMPONENT_ARCHIVE_HASH= \
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync sha256:812ba5ec74ebdc1bea1b3013b636f9dfcb7a6f5271b2783961009c215879af82
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)Versions/v3/3.5/$(COMPONENT_ARCHIVE)
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsync
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsyncTPNO= 28337
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsync
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsync# Enable adiheap and adistack security extensions
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsyncADIHEAP_MODE = $(ADIHEAP_ENABLE)
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsyncADISTACK_MODE = $(ADISTACK_ENABLE)
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsync
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsyncTEST_TARGET= $(TEST_64)
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsyncinclude $(WS_MAKE_RULES)/common.mk
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsync
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCFLAGS += -I$(USRINCDIR)/kerberosv5
44a56c2ffd522c0ef282907c9b07641d06dc143avboxsyncCFLAGS += $(CPP_LARGEFILES)
44a56c2ffd522c0ef282907c9b07641d06dc143avboxsync# <getopt.h> changed between 11 & 12.
44a56c2ffd522c0ef282907c9b07641d06dc143avboxsyncifeq ($(OS_VERSION), 5.11)
44a56c2ffd522c0ef282907c9b07641d06dc143avboxsyncCXXFLAGS += -Wno-write-strings
44a56c2ffd522c0ef282907c9b07641d06dc143avboxsyncendif
44a56c2ffd522c0ef282907c9b07641d06dc143avboxsync
44a56c2ffd522c0ef282907c9b07641d06dc143avboxsyncCONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsync
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsync# Squid has own prefix
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_PREFIX = $(USRDIR)/squid
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/libexec
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --localstatedir=$(VARDIR)/squid
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --sharedstatedir=$(VARDIR)/squid
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/squid
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --mandir=$(CONFIGURE_PREFIX)/man
89c28c87cc69edce638703dbfa181d6d67daf17bvboxsyncCONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_PREFIX)/sbin
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-arp-acl
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsyncCONFIGURE_OPTIONS += --enable-auth-basic='DB,NCSA,NIS,LDAP,PAM,getpwnam,MSNT-multi-domain,POP3,SMB,SMB_LM,SASL'
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsyncCONFIGURE_OPTIONS += --enable-cache-digests
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-carp
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-coss-aio-ops
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-delay-pools
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-auth-digest='file,LDAP'
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-external-acl-helpers='file_userip,unix_group,LDAP_group,wbinfo_group'
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsyncCONFIGURE_OPTIONS += --enable-follow-x-forwarded-for
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-forward-log
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-forw-via-db
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-htcp
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-icmp
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-large-cache-files
cb6fa623dea342f8cdb056585d3237e0bffd970avboxsyncCONFIGURE_OPTIONS += --enable-multicast-miss
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-auth-negotiate='kerberos'
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsyncCONFIGURE_OPTIONS += --enable-auth-ntlm='smb_lm,fake'
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsyncCONFIGURE_OPTIONS += --enable-ntlm-fail-open
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsyncCONFIGURE_OPTIONS += --enable-removal-policies='heap,lru'
cb6fa623dea342f8cdb056585d3237e0bffd970avboxsyncCONFIGURE_OPTIONS += --enable-snmp
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --enable-ssl
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsyncCONFIGURE_OPTIONS += --enable-storeio='aufs,diskd,ufs'
cb6fa623dea342f8cdb056585d3237e0bffd970avboxsyncCONFIGURE_OPTIONS += --enable-x-accelerator-vary
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --with-aio
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsyncCONFIGURE_OPTIONS += --with-aufs-threads=8
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsyncCONFIGURE_OPTIONS += --with-build-environment=POSIX_V6_ILP32_OFFBIG
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --with-pthreads
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --without-nettle
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += --disable-arch-native
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCONFIGURE_OPTIONS += PERL=$(PERL)
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# Appends the following line to the end of the squid.conf configuration
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# file. This line is necessary for running squid for testing.
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# This starts up squid as user webservd.
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsyncCOMPONENT_POST_INSTALL_ACTION += \
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsync (cd $(PROTO_DIR)/etc/squid ; \
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync echo '\ncache_effective_user webservd' >> squid.conf)
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# Adjust '#!/usr/bin/perl'
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncPERL_SCRIPTS= $(PROTOUSRDIR)/squid/libexec/helper-mux.pl
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsync# To test manually follow along in the book
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsync# Squid Proxy Server 3.1 Beginner's Guide Page 34
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync#
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsync# Add this to the top of /etc/squid/squid.conf:
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsync# cache_dir ufs /var/squid/cache/ 500 16 256
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# acl my_machine src 192.0.2.21 # Replace with your desktop's IP address
4bd3e7685494afe7c303fc131c66e685023b6b4avboxsync# http_access allow my_machine
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync#
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# You will probably need to remove or comment out the following lines or Squid
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# will fail to start:
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# # acl manager proto cache_object
6337fd8860ce7d3ae9835f9bee38c15ecbabc86avboxsync#
6337fd8860ce7d3ae9835f9bee38c15ecbabc86avboxsync# Make sure apache is running.
6337fd8860ce7d3ae9835f9bee38c15ecbabc86avboxsync# # svcs apache22
6337fd8860ce7d3ae9835f9bee38c15ecbabc86avboxsync# Start squid:
6337fd8860ce7d3ae9835f9bee38c15ecbabc86avboxsync# # svcadm enable squid
6337fd8860ce7d3ae9835f9bee38c15ecbabc86avboxsync# On your desktop set your web browser to proxy through this squid:
6337fd8860ce7d3ae9835f9bee38c15ecbabc86avboxsync# Edit -> Preferences -> Advanced -> Network -> Settings
6337fd8860ce7d3ae9835f9bee38c15ecbabc86avboxsync# Check: Manual proxy configuration
6337fd8860ce7d3ae9835f9bee38c15ecbabc86avboxsync# HTTP Proxy: <squid servers IP address> Port: 3128
6337fd8860ce7d3ae9835f9bee38c15ecbabc86avboxsync# Save
6337fd8860ce7d3ae9835f9bee38c15ecbabc86avboxsync# Enter <squid server URL> in your web browser. You should be accessing squid
6337fd8860ce7d3ae9835f9bee38c15ecbabc86avboxsync# and seeing files stored in the http server on that machine.
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# Enter <squid server URL>:897 in your web browser and squid should complain.
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# Squid is working properly.
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# squid tests use cppunit. Currently this requires a version of cppunit
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync# installed that have been built with the GNU version 5.3 compilers.
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncCOMPONENT_TEST_TRANSFORMS += \
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync '-n ' \
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync '-e "/=====/p" ' \
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync '-e "/TOTAL/p" ' \
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync '-e "/SKIP/p" ' \
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync '-e "/PASS/p" ' \
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync '-e "/FAIL/p" ' \
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync '-e "/Can not open file/d" ' \
6bf3b95b543a9eacd1025b4c3c6409f9765099a8vboxsync '-e "/ERROR/p" '
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += library/libtool/libltdl
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += library/security/openssl
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += $(PERL_PKG)
6bf3b95b543a9eacd1025b4c3c6409f9765099a8vboxsyncREQUIRED_PACKAGES += security/kerberos-5
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncifeq ($(OS_VERSION),5.11)
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += service/security/kerberos-5
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncendif
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += shell/ksh93
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += system/core-os
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += system/library/math
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += system/library/security/crypto
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncifeq ($(OS_VERSION),5.11)
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += system/library/security/gss
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncendif
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += system/library/security/libsasl
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += system/library/security/libsasl2
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += system/network
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsyncREQUIRED_PACKAGES += system/network/ldap/openldap
354c88062085b9c03e4ea164f29c461b2ea842d6vboxsync