Makefile revision 1703
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# CDDL HEADER START
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
16f816d3f3c32ae3351834253f52ddd0212bcbf3Timo Sirainen# The contents of this file are subject to the terms of the
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# Common Development and Distribution License (the "License").
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# You may not use this file except in compliance with the License.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# or http://www.opensolaris.org/os/licensing.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# See the License for the specific language governing permissions
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# and limitations under the License.
8ef80b0b9c73fb0a0188788b14b3e15084b7a452Timo Sirainen#
56561d472db25ebda35ae6afdc7f7deb75c323fcTimo Sirainen# When distributing Covered Code, include this CDDL HEADER in each
687794a61c9e3bf27c712b442b8fc8836c63ae44Timo Sirainen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo Sirainen# If applicable, add the following below this CDDL HEADER, with the
687794a61c9e3bf27c712b442b8fc8836c63ae44Timo Sirainen# fields enclosed by brackets "[]" replaced with your own identifying
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# information: Portions Copyright [yyyy] [name of copyright owner]
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# CDDL HEADER END
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
c979eeda1f46483d9c963e265786b701d7683d77Timo Sirainen#
5a58037ad75b88356d82240fab2bc604de03107eTimo Sirainen# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
0d70a702dec63d22535684fec6a7247c5f153208Timo Sirainen#
0d70a702dec63d22535684fec6a7247c5f153208Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Siraineninclude ../../make-rules/shared-macros.mk
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo SirainenPATH=/usr/bin:/usr/gnu/bin:/usr/sbin:/usr/perl5/bin
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo Sirainen
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo SirainenCOMPONENT_NAME= squid
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCOMPONENT_VERSION= 3.1.23
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo SirainenCOMPONENT_PROJECT_URL= http://www.squid-cache.org/
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo SirainenCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo SirainenCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCOMPONENT_ARCHIVE_HASH= \
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo Sirainen sha256:ba5f6a7000a032f2315923c1b8d0b37458d33a7f59d603facecf9e8c12470b34
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)Versions/v3/3.1/$(COMPONENT_ARCHIVE)
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCOMPONENT_BUGDB= utility/squid
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo Sirainen
8d80659e504ffb34bb0c6a633184fece35751b18Timo Siraineninclude ../../make-rules/prep.mk
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo Siraineninclude ../../make-rules/configure.mk
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo Siraineninclude ../../make-rules/ips.mk
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCOMPILER = gcc
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo Sirainen
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCFLAGS += -I/usr/include/kerberosv5
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCFLAGS += $(CPP_LARGEFILES)
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo Sirainen
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen# Squid has own prefix
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo SirainenCONFIGURE_PREFIX = /usr/squid
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/libexec
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo SirainenCONFIGURE_OPTIONS += --localstatedir=/var/squid
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --sharedstatedir=/var/squid
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/squid
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --mandir=$(CONFIGURE_PREFIX)/man
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-arp-acl
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-auth='basic,digest,negotiate,ntlm'
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-basic-auth-helpers='DB,NCSA,YP,LDAP,PAM,getpwnam,MSNT,POP3,multi-domain-NTLM,SMB,SASL'
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo SirainenCONFIGURE_OPTIONS += --enable-cache-digests
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-carp
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo SirainenCONFIGURE_OPTIONS += --enable-coss-aio-ops
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo SirainenCONFIGURE_OPTIONS += --enable-delay-pools
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-digest-auth-helpers='ldap,password'
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-external-acl-helpers='ip_user,unix_group,ldap_group,wbinfo_group'
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-follow-x-forwarded-for
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo SirainenCONFIGURE_OPTIONS += --enable-forward-log
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-forw-via-db
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo SirainenCONFIGURE_OPTIONS += --enable-htcp
94a8cb0ee1d85569ad1a2acacd92d3ce22f8a1cbTimo SirainenCONFIGURE_OPTIONS += --enable-icmp
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-large-cache-files
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-multicast-miss
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-negotiate-auth-helpers='squid_kerb_auth'
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-ntlm-auth-helpers='smb_lm,fakeauth,no_check'
8d80659e504ffb34bb0c6a633184fece35751b18Timo SirainenCONFIGURE_OPTIONS += --enable-ntlm-fail-open
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-referer-log
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-removal-policies='heap,lru'
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-snmp
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-ssl
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-storeio='aufs,diskd,ufs'
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-useragent-log
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --enable-x-accelerator-vary
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --with-aio
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --with-aufs-threads=8
8d80659e504ffb34bb0c6a633184fece35751b18Timo SirainenCONFIGURE_OPTIONS += --with-large-files
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --with-build-environment=POSIX_V6_ILP32_OFFBIG
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo SirainenCONFIGURE_OPTIONS += --with-pthreads
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo Sirainen
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo SirainenCOMPONENT_POST_BUILD_ACTION= \
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo Sirainen (cd $(COMPONENT_DIR) ; \
b032dc80e358f09893f09999f172ff12f5dbbb8eTimo Sirainen $(CP) files/squid.conf.default $(@D)/src)
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# common targets
a050ca9def13949dbaa67bd6574a41c4f397ae26Timo Sirainenbuild: $(BUILD_32)
8d131435ba4648c8821160ec38d508c97177c715Timo Sirainen
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Siraineninstall: $(INSTALL_32)
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# configure says it needs cppunit to test with.
a050ca9def13949dbaa67bd6574a41c4f397ae26Timo Sirainen# After some work I can get cppunit to build but it quickly
a050ca9def13949dbaa67bd6574a41c4f397ae26Timo Sirainen# falls over during test so giving up.
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# I don't think the test suite really tests squid's functionality anyways.
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen#
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# To test manually follow along in the book
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# Squid Proxy Server 3.1 Beginner's Guide Page 34
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen#
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# Add this to the top of /etc/squid/squid.conf:
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# cache_dir ufs /var/squid/cache/ 500 16 256
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# acl my_machine src 192.0.2.21 # Replace with your desktop's IP address
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# http_access allow my_machine
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen#
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# Make sure apache is running.
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# # svcs apache22
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# Start squid:
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# # svcadm enable squid
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# On your desktop set your web browser to proxy through this squid:
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# Edit -> Preferences -> Advanced -> Network -> Settings
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# Check: Manual proxy configuration
a050ca9def13949dbaa67bd6574a41c4f397ae26Timo Sirainen# HTTP Proxy: <squid servers IP address> Port: 3128
a050ca9def13949dbaa67bd6574a41c4f397ae26Timo Sirainen# Save
a050ca9def13949dbaa67bd6574a41c4f397ae26Timo Sirainen# Enter <squid server URL> in your web browser. You should be accessing squid
e3689d0f073341e844638f34e1e4d0b7bb053cc8Timo Sirainen# and seeing files stored in the http server on that machine.
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# Enter <squid server URL>:897 in your web browser and squid should complain.
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen# Squid is working properly.
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainentest: $(NO_TESTS)
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen
ae8817f05005f57bba32479a610b52d083e2b6ebTimo SirainenBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Siraineninclude ../../make-rules/depend.mk
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen