Makefile revision 3996
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# CDDL HEADER START
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# The contents of this file are subject to the terms of the
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Common Development and Distribution License (the "License").
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# You may not use this file except in compliance with the License.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# or http://www.opensolaris.org/os/licensing.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# See the License for the specific language governing permissions
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# and limitations under the License.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# When distributing Covered Code, include this CDDL HEADER in each
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# If applicable, add the following below this CDDL HEADER, with the
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# fields enclosed by brackets "[]" replaced with your own identifying
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# information: Portions Copyright [yyyy] [name of copyright owner]
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# CDDL HEADER END
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovPATH=/usr/bin:/usr/gnu/bin:/usr/sbin:/usr/perl5/bin
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_PROJECT_URL= http://www.squid-cache.org/
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov sha256:ba5f6a7000a032f2315923c1b8d0b37458d33a7f59d603facecf9e8c12470b34
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)Versions/v3/3.1/$(COMPONENT_ARCHIVE)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Squid has own prefix
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/libexec
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --localstatedir=/var/squid
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --sharedstatedir=/var/squid
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/squid
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --mandir=$(CONFIGURE_PREFIX)/man
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-auth='basic,digest,negotiate,ntlm'
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-basic-auth-helpers='DB,NCSA,YP,LDAP,PAM,getpwnam,MSNT,POP3,multi-domain-NTLM,SMB,SASL'
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-cache-digests
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-coss-aio-ops
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-digest-auth-helpers='ldap,password'
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-external-acl-helpers='ip_user,unix_group,ldap_group,wbinfo_group'
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-follow-x-forwarded-for
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-large-cache-files
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-multicast-miss
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-negotiate-auth-helpers='squid_kerb_auth'
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-ntlm-auth-helpers='smb_lm,fakeauth,no_check'
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-ntlm-fail-open
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-removal-policies='heap,lru'
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-storeio='aufs,diskd,ufs'
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-useragent-log
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-x-accelerator-vary
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --with-aufs-threads=8
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --with-build-environment=POSIX_V6_ILP32_OFFBIG
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(CP) files/squid.conf.default $(@D)/src)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# common targets
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# configure says it needs cppunit to test with.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# After some work I can get cppunit to build but it quickly
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# falls over during test so giving up.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# I don't think the test suite really tests squid's functionality anyways.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# To test manually follow along in the book
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Squid Proxy Server 3.1 Beginner's Guide Page 34
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Add this to the top of /etc/squid/squid.conf:
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# cache_dir ufs /var/squid/cache/ 500 16 256
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# acl my_machine src 192.0.2.21 # Replace with your desktop's IP address
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# http_access allow my_machine
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Make sure apache is running.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# # svcs apache22
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# # svcadm enable squid
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# On your desktop set your web browser to proxy through this squid:
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Edit -> Preferences -> Advanced -> Network -> Settings
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Check: Manual proxy configuration
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# HTTP Proxy: <squid servers IP address> Port: 3128
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Enter <squid server URL> in your web browser. You should be accessing squid
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# and seeing files stored in the http server on that machine.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Enter <squid server URL>:897 in your web browser and squid should complain.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Squid is working properly.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += library/libtool/libltdl
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += library/security/openssl
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += system/library/gcc-3-runtime
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += system/library/security/gss