Makefile revision 5807
c366016ffe1788c6847d0a967a954713725cab5evboxsync#
c366016ffe1788c6847d0a967a954713725cab5evboxsync# CDDL HEADER START
c366016ffe1788c6847d0a967a954713725cab5evboxsync#
c366016ffe1788c6847d0a967a954713725cab5evboxsync# The contents of this file are subject to the terms of the
c366016ffe1788c6847d0a967a954713725cab5evboxsync# Common Development and Distribution License (the "License").
c366016ffe1788c6847d0a967a954713725cab5evboxsync# You may not use this file except in compliance with the License.
c366016ffe1788c6847d0a967a954713725cab5evboxsync#
c366016ffe1788c6847d0a967a954713725cab5evboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c366016ffe1788c6847d0a967a954713725cab5evboxsync# or http://www.opensolaris.org/os/licensing.
c366016ffe1788c6847d0a967a954713725cab5evboxsync# See the License for the specific language governing permissions
c366016ffe1788c6847d0a967a954713725cab5evboxsync# and limitations under the License.
c366016ffe1788c6847d0a967a954713725cab5evboxsync#
c366016ffe1788c6847d0a967a954713725cab5evboxsync# When distributing Covered Code, include this CDDL HEADER in each
c366016ffe1788c6847d0a967a954713725cab5evboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c366016ffe1788c6847d0a967a954713725cab5evboxsync# If applicable, add the following below this CDDL HEADER, with the
c366016ffe1788c6847d0a967a954713725cab5evboxsync# fields enclosed by brackets "[]" replaced with your own identifying
c366016ffe1788c6847d0a967a954713725cab5evboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
c366016ffe1788c6847d0a967a954713725cab5evboxsync#
c366016ffe1788c6847d0a967a954713725cab5evboxsync# CDDL HEADER END
c366016ffe1788c6847d0a967a954713725cab5evboxsync#
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsync#
c366016ffe1788c6847d0a967a954713725cab5evboxsync# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
c366016ffe1788c6847d0a967a954713725cab5evboxsync#
c366016ffe1788c6847d0a967a954713725cab5evboxsyncBUILD_BITS= 64
c366016ffe1788c6847d0a967a954713725cab5evboxsyncCOMPILER= gcc
c366016ffe1788c6847d0a967a954713725cab5evboxsyncinclude ../../make-rules/shared-macros.mk
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsyncPATH=$(USRBINDIR):$(GNUBIN):$(USRSBINDIR):$(USRDIR)/perl5/bin
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsyncCOMPONENT_NAME= squid
c366016ffe1788c6847d0a967a954713725cab5evboxsyncCOMPONENT_VERSION= 3.5.16
c366016ffe1788c6847d0a967a954713725cab5evboxsyncCOMPONENT_PROJECT_URL= http://www.squid-cache.org/
c366016ffe1788c6847d0a967a954713725cab5evboxsyncCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
c366016ffe1788c6847d0a967a954713725cab5evboxsyncCOMPONENT_ARCHIVE_HASH= \
c366016ffe1788c6847d0a967a954713725cab5evboxsync sha256:e73d821180eed8bed230f357c680c0b19f1efa51a24725e810f2b48a2079d385
c366016ffe1788c6847d0a967a954713725cab5evboxsyncCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)Versions/v3/3.5/$(COMPONENT_ARCHIVE)
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsyncTPNO= 27806
c366016ffe1788c6847d0a967a954713725cab5evboxsync
c366016ffe1788c6847d0a967a954713725cab5evboxsyncTEST_TARGET= $(TEST_64)
c366016ffe1788c6847d0a967a954713725cab5evboxsyncinclude $(WS_MAKE_RULES)/common.mk
c366016ffe1788c6847d0a967a954713725cab5evboxsync
36ebaddfec017eee7e82ee466c25de002cdc4231vboxsyncCFLAGS += -I$(USRINCDIR)/kerberosv5
c366016ffe1788c6847d0a967a954713725cab5evboxsyncCFLAGS += $(CPP_LARGEFILES)
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# Squid has own prefix
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_PREFIX = $(USRDIR)/squid
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/libexec
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --localstatedir=$(VARDIR)/squid
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --sharedstatedir=$(VARDIR)/squid
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/squid
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --mandir=$(CONFIGURE_PREFIX)/man
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_PREFIX)/sbin
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-arp-acl
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-auth-basic='DB,NCSA,NIS,LDAP,PAM,getpwnam,MSNT-multi-domain,POP3,SMB,SMB_LM,SASL'
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-cache-digests
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-carp
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-coss-aio-ops
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-delay-pools
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-auth-digest='file,LDAP'
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-external-acl-helpers='file_userip,unix_group,LDAP_group,wbinfo_group'
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-follow-x-forwarded-for
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-forward-log
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-forw-via-db
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-htcp
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-icmp
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-large-cache-files
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-multicast-miss
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-auth-negotiate='kerberos'
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --enable-auth-ntlm='smb_lm,fake'
a7aa94e0115a73841f34ebbfa00f63fa1904e51fvboxsyncCONFIGURE_OPTIONS += --enable-ntlm-fail-open
b6cc138b99f86c2d29ecfe32cecf9f68ba5e73afvboxsyncCONFIGURE_OPTIONS += --enable-removal-policies='heap,lru'
0e5731ab59b4ecead38375f26eeea698f00b19fdvboxsyncCONFIGURE_OPTIONS += --enable-snmp
0e5731ab59b4ecead38375f26eeea698f00b19fdvboxsyncCONFIGURE_OPTIONS += --enable-ssl
0e5731ab59b4ecead38375f26eeea698f00b19fdvboxsyncCONFIGURE_OPTIONS += --enable-storeio='aufs,diskd,ufs'
a7aa94e0115a73841f34ebbfa00f63fa1904e51fvboxsyncCONFIGURE_OPTIONS += --enable-x-accelerator-vary
a7aa94e0115a73841f34ebbfa00f63fa1904e51fvboxsyncCONFIGURE_OPTIONS += --with-aio
a7aa94e0115a73841f34ebbfa00f63fa1904e51fvboxsyncCONFIGURE_OPTIONS += --with-aufs-threads=8
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --with-build-environment=POSIX_V6_ILP32_OFFBIG
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --with-pthreads
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --without-nettle
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += --disable-arch-native
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCONFIGURE_OPTIONS += PERL=$(PERL)
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# Appends the following line to the end of the squid.conf configuration
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# file. This line is necessary for running squid for testing.
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# This starts up squid as user webservd.
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCOMPONENT_POST_INSTALL_ACTION += \
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync (cd $(PROTO_DIR)/etc/squid ; \
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync echo '\ncache_effective_user webservd' >> squid.conf)
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync
81abf6f533300bfe7c2109e9db1029b7a0274598vboxsync# Adjust '#!/usr/bin/perl'
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncPERL_SCRIPTS= $(PROTOUSRDIR)/squid/libexec/helper-mux.pl
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# To test manually follow along in the book
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# Squid Proxy Server 3.1 Beginner's Guide Page 34
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync#
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# Add this to the top of /etc/squid/squid.conf:
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# cache_dir ufs /var/squid/cache/ 500 16 256
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# acl my_machine src 192.0.2.21 # Replace with your desktop's IP address
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# http_access allow my_machine
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync#
c366016ffe1788c6847d0a967a954713725cab5evboxsync# You will probably need to remove or comment out the following lines or Squid
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# will fail to start:
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# # acl manager proto cache_object
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync#
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# Make sure apache is running.
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# # svcs apache22
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# Start squid:
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# # svcadm enable squid
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# On your desktop set your web browser to proxy through this squid:
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# Edit -> Preferences -> Advanced -> Network -> Settings
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# Check: Manual proxy configuration
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# HTTP Proxy: <squid servers IP address> Port: 3128
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# Save
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# Enter <squid server URL> in your web browser. You should be accessing squid
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# and seeing files stored in the http server on that machine.
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# Enter <squid server URL>:897 in your web browser and squid should complain.
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# Squid is working properly.
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# squid tests use cppunit. Currently this requires a version of cppunit
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync# installed that have been built with the GNU version 5.3 compilers.
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncCOMPONENT_TEST_TRANSFORMS += \
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync '-n ' \
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync '-e "/=====/p" ' \
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync '-e "/TOTAL/p" ' \
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync '-e "/SKIP/p" ' \
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync '-e "/PASS/p" ' \
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync '-e "/FAIL/p" ' \
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync '-e "/Can not open file/d" ' \
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync '-e "/ERROR/p" '
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += library/libtool/libltdl
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += library/security/openssl
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += $(PERL_PKG)
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += shell/ksh93
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += system/core-os
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += system/library/math
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += system/library/security/crypto
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += system/library/security/gss
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += system/library/security/libsasl
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += system/library/security/libsasl2
c936b605260fac01308e3f63b869f401321c52b3vboxsyncREQUIRED_PACKAGES += system/network
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsyncREQUIRED_PACKAGES += service/security/kerberos-5
ff1e21edf9a07974cb38c8f8ad7e8212b1335551vboxsync