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