Makefile revision 3996
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# CDDL HEADER START
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
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#
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#
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#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# CDDL HEADER END
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
6398f22526303343193a18e514602f1af6fb29cbNikolai Kondrashov
6398f22526303343193a18e514602f1af6fb29cbNikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPILER = gcc3
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinclude ../../make-rules/shared-macros.mk
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovPATH=/usr/bin:/usr/gnu/bin:/usr/sbin:/usr/perl5/bin
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_NAME= squid
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_VERSION= 3.1.23
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_PROJECT_URL= http://www.squid-cache.org/
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_ARCHIVE_HASH= \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov sha256:ba5f6a7000a032f2315923c1b8d0b37458d33a7f59d603facecf9e8c12470b34
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)Versions/v3/3.1/$(COMPONENT_ARCHIVE)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_BUGDB= utility/squid
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovTPNO= 13323
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinclude $(WS_MAKE_RULES)/prep.mk
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinclude $(WS_MAKE_RULES)/configure.mk
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinclude $(WS_MAKE_RULES)/ips.mk
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCFLAGS += -I/usr/include/kerberosv5
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCFLAGS += $(CPP_LARGEFILES)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Squid has own prefix
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_PREFIX = /usr/squid
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
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-arp-acl
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-carp
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-coss-aio-ops
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-delay-pools
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-forward-log
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-forw-via-db
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-htcp
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-icmp
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-referer-log
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-removal-policies='heap,lru'
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-snmp
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-ssl
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-aio
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --with-aufs-threads=8
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --with-large-files
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --with-build-environment=POSIX_V6_ILP32_OFFBIG
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --with-pthreads
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_POST_BUILD_ACTION= \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov (cd $(COMPONENT_DIR) ; \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(CP) files/squid.conf.default $(@D)/src)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# common targets
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovbuild: $(BUILD_32)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinstall: $(INSTALL_32)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
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#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# To test manually follow along in the book
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Squid Proxy Server 3.1 Beginner's Guide Page 34
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
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#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Make sure apache is running.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# # svcs apache22
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Start squid:
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# Save
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 Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovtest: $(NO_TESTS)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += library/libtool/libltdl
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += library/security/openssl
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += runtime/perl-512
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += shell/ksh93
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += system/core-os
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += system/library
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += system/library/gcc-3-runtime
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += system/library/math
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += system/library/security/gss
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += system/library/security/libsasl
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovREQUIRED_PACKAGES += system/network
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov