Makefile revision 3477
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt#
010a51c427bfb6ab658fc0056955a1a5b69810beTinderbox User# CDDL HEADER START
bef75d63d74f58abc0f834ed271526672777ba29Automatic Updater#
c6fb85f9500350e5ce58c9a24f5d264c8a8bd6f4Automatic Updater# The contents of this file are subject to the terms of the
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# Common Development and Distribution License (the "License").
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# You may not use this file except in compliance with the License.
bef75d63d74f58abc0f834ed271526672777ba29Automatic Updater#
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# or http://www.opensolaris.org/os/licensing.
bef75d63d74f58abc0f834ed271526672777ba29Automatic Updater# See the License for the specific language governing permissions
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# and limitations under the License.
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt#
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# If applicable, add the following below this CDDL HEADER, with the
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# information: Portions Copyright [yyyy] [name of copyright owner]
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt#
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# CDDL HEADER END
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt
dec590a3deb8e87380a8bd3a77d535dba3729bf6Tinderbox Userinclude ../../make-rules/shared-macros.mk
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserPATH=/usr/bin:/usr/gnu/bin:/usr/sbin:/usr/perl5/bin
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_NAME= squid
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_VERSION= 3.1.23
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_PROJECT_URL= http://www.squid-cache.org/
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan HuntCOMPONENT_ARCHIVE_HASH= \
fd0b768f4c23d22c89f8a156a632831583b7fb68Automatic Updater sha256:ba5f6a7000a032f2315923c1b8d0b37458d33a7f59d603facecf9e8c12470b34
fd0b768f4c23d22c89f8a156a632831583b7fb68Automatic UpdaterCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)Versions/v3/3.1/$(COMPONENT_ARCHIVE)
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan HuntCOMPONENT_BUGDB= utility/squid
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserTPNO= 13323
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinclude ../../make-rules/prep.mk
0ae35ecf053a29f61ad6b3659ac2445cf2c3f663Automatic Updaterinclude ../../make-rules/configure.mk
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinclude ../../make-rules/ips.mk
0ae35ecf053a29f61ad6b3659ac2445cf2c3f663Automatic Updater
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPILER = gcc
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCXX += $(CC_BITS)
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCFLAGS += -I/usr/include/kerberosv5
0ae35ecf053a29f61ad6b3659ac2445cf2c3f663Automatic UpdaterCFLAGS += $(CPP_LARGEFILES)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
0ae35ecf053a29f61ad6b3659ac2445cf2c3f663Automatic UpdaterCONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
0ae35ecf053a29f61ad6b3659ac2445cf2c3f663Automatic UpdaterCONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS.64 += LDFLAGS="$(LDFLAGS) -m64"
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan HuntCONFIGURE_OPTIONS.64 += LIBS="-m64"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt# Squid has own prefix
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_PREFIX = /usr/squid
6f1205897504b8f50b1785975482c995888dd630Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
6f1205897504b8f50b1785975482c995888dd630Tinderbox UserCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/libexec
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --localstatedir=/var/squid
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic UpdaterCONFIGURE_OPTIONS += --sharedstatedir=/var/squid
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserCONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/squid
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --mandir=$(CONFIGURE_PREFIX)/man
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserCONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_PREFIX)/sbin
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserCONFIGURE_OPTIONS += --enable-arp-acl
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --enable-auth='basic,digest,negotiate,ntlm'
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserCONFIGURE_OPTIONS += --enable-basic-auth-helpers='DB,NCSA,YP,LDAP,PAM,getpwnam,MSNT,POP3,multi-domain-NTLM,SMB,SASL'
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserCONFIGURE_OPTIONS += --enable-cache-digests
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserCONFIGURE_OPTIONS += --enable-carp
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserCONFIGURE_OPTIONS += --enable-coss-aio-ops
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserCONFIGURE_OPTIONS += --enable-delay-pools
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserCONFIGURE_OPTIONS += --enable-digest-auth-helpers='ldap,password'
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserCONFIGURE_OPTIONS += --enable-external-acl-helpers='ip_user,unix_group,ldap_group,wbinfo_group'
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --enable-follow-x-forwarded-for
0ae35ecf053a29f61ad6b3659ac2445cf2c3f663Automatic UpdaterCONFIGURE_OPTIONS += --enable-forward-log
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --enable-forw-via-db
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCONFIGURE_OPTIONS += --enable-htcp
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan HuntCONFIGURE_OPTIONS += --enable-icmp
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan HuntCONFIGURE_OPTIONS += --enable-large-cache-files
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --enable-multicast-miss
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic UpdaterCONFIGURE_OPTIONS += --enable-negotiate-auth-helpers='squid_kerb_auth'
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --enable-ntlm-auth-helpers='smb_lm,fakeauth,no_check'
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic UpdaterCONFIGURE_OPTIONS += --enable-ntlm-fail-open
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic UpdaterCONFIGURE_OPTIONS += --enable-referer-log
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --enable-removal-policies='heap,lru'
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan HuntCONFIGURE_OPTIONS += --enable-snmp
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --enable-ssl
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --enable-storeio='aufs,diskd,ufs'
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --enable-useragent-log
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --enable-x-accelerator-vary
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan HuntCONFIGURE_OPTIONS += --with-aio
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan HuntCONFIGURE_OPTIONS += --with-aufs-threads=8
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan HuntCONFIGURE_OPTIONS += --with-large-files
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --with-build-environment=POSIX_V6_ILP32_OFFBIG
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan HuntCONFIGURE_OPTIONS += --with-pthreads
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt
COMPONENT_POST_BUILD_ACTION= \
(cd $(COMPONENT_DIR) ; \
$(CP) files/squid.conf.default $(@D)/src)
ASLR_MODE = $(ASLR_ENABLE)
# common targets
configure: $(CONFIGURE_64)
build: $(BUILD_64)
install: $(INSTALL_64)
# configure says it needs cppunit to test with.
# After some work I can get cppunit to build but it quickly
# falls over during test so giving up.
# I don't think the test suite really tests squid's functionality anyways.
#
# To test manually follow along in the book
# Squid Proxy Server 3.1 Beginner's Guide Page 34
#
# Add this to the top of /etc/squid/squid.conf:
# cache_dir ufs /var/squid/cache/ 500 16 256
# acl my_machine src 192.0.2.21 # Replace with your desktop's IP address
# http_access allow my_machine
#
# Make sure apache is running.
# # svcs apache22
# Start squid:
# # svcadm enable squid
# On your desktop set your web browser to proxy through this squid:
# Edit -> Preferences -> Advanced -> Network -> Settings
# Check: Manual proxy configuration
# HTTP Proxy: <squid servers IP address> Port: 3128
# Save
# Enter <squid server URL> in your web browser. You should be accessing squid
# 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)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk