Andrzej Szeszo
2013-06-04 453bf5a3004107204e1858532a38b3e703e32995
commit | author | age
2b3447 1 #
SS 2 # CDDL HEADER START
3 #
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
7 #
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21
22 #
47263a 23 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
2b3447 24 #
SS 25
26 include ../../make-rules/shared-macros.mk
27
28 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin:/usr/perl5/bin
29
15a7a4 30 COMPONENT_NAME=         squid
47263a 31 COMPONENT_VERSION=      3.1.23
5fc33e 32 COMPONENT_PROJECT_URL=  http://www.squid-cache.org/
15a7a4 33 COMPONENT_SRC=          $(COMPONENT_NAME)-$(COMPONENT_VERSION)
47263a 34 COMPONENT_ARCHIVE=      $(COMPONENT_SRC).tar.xz
35e110 35 COMPONENT_ARCHIVE_HASH= \
47263a 36     sha256:ba5f6a7000a032f2315923c1b8d0b37458d33a7f59d603facecf9e8c12470b34
60e6e0 37 COMPONENT_ARCHIVE_URL=  $(COMPONENT_PROJECT_URL)Versions/v3/3.1/$(COMPONENT_ARCHIVE)
3b89c9 38 COMPONENT_BUGDB=    utility/squid
2b3447 39
SS 40 include ../../make-rules/prep.mk
41 include ../../make-rules/configure.mk
42 include ../../make-rules/ips.mk
43
15a7a4 44 COMPILER = gcc
2b3447 45
SS 46 CFLAGS += -I/usr/include/kerberosv5
47 CFLAGS += $(CPP_LARGEFILES)
48
49 # Squid has own prefix
50 CONFIGURE_PREFIX =    /usr/squid
51
52 CONFIGURE_OPTIONS +=   CFLAGS="$(CFLAGS)"
53 CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/libexec
54 CONFIGURE_OPTIONS += --localstatedir=/var/squid
55 CONFIGURE_OPTIONS += --sharedstatedir=/var/squid
56 CONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/squid
57 CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_PREFIX)/man
58 CONFIGURE_OPTIONS += --enable-arp-acl
59 CONFIGURE_OPTIONS += --enable-auth='basic,digest,negotiate,ntlm'
60 CONFIGURE_OPTIONS += --enable-basic-auth-helpers='DB,NCSA,YP,LDAP,PAM,getpwnam,MSNT,POP3,multi-domain-NTLM,SMB,SASL'
61 CONFIGURE_OPTIONS += --enable-cache-digests
62 CONFIGURE_OPTIONS += --enable-carp
63 CONFIGURE_OPTIONS += --enable-coss-aio-ops
64 CONFIGURE_OPTIONS += --enable-delay-pools
65 CONFIGURE_OPTIONS += --enable-digest-auth-helpers='ldap,password'
66 CONFIGURE_OPTIONS += --enable-external-acl-helpers='ip_user,unix_group,ldap_group,wbinfo_group'
67 CONFIGURE_OPTIONS += --enable-follow-x-forwarded-for
68 CONFIGURE_OPTIONS += --enable-forward-log
69 CONFIGURE_OPTIONS += --enable-forw-via-db
70 CONFIGURE_OPTIONS += --enable-htcp
71 CONFIGURE_OPTIONS += --enable-icmp
72 CONFIGURE_OPTIONS += --enable-large-cache-files
73 CONFIGURE_OPTIONS += --enable-multicast-miss
74 CONFIGURE_OPTIONS += --enable-negotiate-auth-helpers='squid_kerb_auth'
15a7a4 75 CONFIGURE_OPTIONS += --enable-ntlm-auth-helpers='smb_lm,fakeauth,no_check'
2b3447 76 CONFIGURE_OPTIONS += --enable-ntlm-fail-open
SS 77 CONFIGURE_OPTIONS += --enable-referer-log
78 CONFIGURE_OPTIONS += --enable-removal-policies='heap,lru'
79 CONFIGURE_OPTIONS += --enable-snmp
80 CONFIGURE_OPTIONS += --enable-ssl
15a7a4 81 CONFIGURE_OPTIONS += --enable-storeio='aufs,diskd,ufs'
2b3447 82 CONFIGURE_OPTIONS += --enable-useragent-log
SS 83 CONFIGURE_OPTIONS += --enable-x-accelerator-vary
84 CONFIGURE_OPTIONS += --with-aio
85 CONFIGURE_OPTIONS += --with-aufs-threads=8
86 CONFIGURE_OPTIONS += --with-large-files
87 CONFIGURE_OPTIONS += --with-build-environment=POSIX_V6_ILP32_OFFBIG
88 CONFIGURE_OPTIONS += --with-pthreads
89
90 COMPONENT_POST_BUILD_ACTION= \
15a7a4 91                 (cd $(COMPONENT_DIR) ; \
47263a 92                  $(CP) files/squid.conf.default $(@D)/src)
2b3447 93
SS 94 # common targets
95 build:        $(BUILD_32) 
96
97 install:    $(INSTALL_32) 
47263a 98
CM 99 # configure says it needs cppunit to test with.
100 # After some work I can get cppunit to build but it quickly
101 # falls over during test so giving up.
102 # I don't think the test suite really tests squid's functionality anyways.
103 #
104 # To test manually follow along in the book
105 # Squid Proxy Server 3.1 Beginner's Guide Page 34
106 #
107 # Add this to the top of /etc/squid/squid.conf:
108 # cache_dir ufs /var/squid/cache/ 500 16 256
109 # acl my_machine src 192.0.2.21 # Replace with your desktop's IP address
110 # http_access allow my_machine
111 #
112 # Make sure apache is running.
113 #    # svcs apache22
114 # Start squid:
115 #    # svcadm enable squid
116 # On your desktop set your web browser to proxy through this squid:
117 # Edit -> Preferences -> Advanced -> Network -> Settings
118 #    Check: Manual proxy configuration
119 #    HTTP Proxy: <squid servers IP address>    Port: 3128
120 #   Save
121 # Enter <squid server URL> in your web browser.  You should be accessing squid
122 # and seeing files stored in the http server on that machine.
123 # Enter <squid server URL>:897 in your web browser and squid should complain.
124 # Squid is working properly.
125
4158c0 126 test:        $(NO_TESTS)
2b3447 127
SS 128 BUILD_PKG_DEPENDENCIES =    $(BUILD_TOOLS)
129
130 include ../../make-rules/depend.mk