components/squid/Makefile
changeset 163 492ba3a66c6f
child 181 87e11e685b1f
equal deleted inserted replaced
162:4ece0535acb7 163:492ba3a66c6f
       
     1 #
       
     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 #
       
    23 # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
       
    24 #
       
    25 
       
    26 include ../../make-rules/shared-macros.mk
       
    27 
       
    28 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin:/usr/perl5/bin
       
    29 
       
    30 COMPONENT_NAME=		squid
       
    31 COMPONENT_VERSION=	2.7.STABLE9
       
    32 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    33 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
       
    34 COMPONENT_ARCHIVE_HASH=	sha1:6d90fe06468b662b2eefd7ffeb47b9a78f0a871d
       
    35 COMPONENT_ARCHIVE_URL=	http://www.squid-cache.org/Versions/v2/2.7/$(COMPONENT_ARCHIVE)
       
    36 
       
    37 include ../../make-rules/prep.mk
       
    38 include ../../make-rules/configure.mk
       
    39 include ../../make-rules/ips.mk
       
    40 
       
    41 IPS_COMPONENT_VERSION=	2.7.9
       
    42 
       
    43 CFLAGS += -I/usr/include/kerberosv5
       
    44 CFLAGS += -DSOLARIS_11
       
    45 CFLAGS += -D__BIG_ENDIAN__
       
    46 CFLAGS += $(CPP_LARGEFILES)
       
    47 CFLAGS += $(studio_FEATURES_EXTENSIONS)
       
    48 
       
    49 
       
    50 # Squid has own prefix
       
    51 CONFIGURE_PREFIX =	/usr/squid
       
    52 
       
    53 CONFIGURE_OPTIONS +=   CFLAGS="$(CFLAGS)"
       
    54 CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/libexec
       
    55 CONFIGURE_OPTIONS += --localstatedir=/var/squid
       
    56 CONFIGURE_OPTIONS += --sharedstatedir=/var/squid
       
    57 CONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/squid
       
    58 CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_PREFIX)/man
       
    59 CONFIGURE_OPTIONS += --enable-arp-acl
       
    60 CONFIGURE_OPTIONS += --enable-auth='basic,digest,negotiate,ntlm'
       
    61 CONFIGURE_OPTIONS += --enable-basic-auth-helpers='DB,NCSA,YP,LDAP,PAM,getpwnam,MSNT,POP3,multi-domain-NTLM,SMB,SASL'
       
    62 CONFIGURE_OPTIONS += --enable-cache-digests
       
    63 CONFIGURE_OPTIONS += --enable-carp
       
    64 CONFIGURE_OPTIONS += --enable-coss-aio-ops
       
    65 CONFIGURE_OPTIONS += --enable-delay-pools
       
    66 CONFIGURE_OPTIONS += --enable-digest-auth-helpers='ldap,password'
       
    67 CONFIGURE_OPTIONS += --enable-external-acl-helpers='ip_user,unix_group,ldap_group,wbinfo_group'
       
    68 CONFIGURE_OPTIONS += --enable-follow-x-forwarded-for
       
    69 CONFIGURE_OPTIONS += --enable-forward-log
       
    70 CONFIGURE_OPTIONS += --enable-forw-via-db
       
    71 CONFIGURE_OPTIONS += --enable-htcp
       
    72 CONFIGURE_OPTIONS += --enable-icmp
       
    73 CONFIGURE_OPTIONS += --enable-large-cache-files
       
    74 CONFIGURE_OPTIONS += --enable-multicast-miss
       
    75 CONFIGURE_OPTIONS += --enable-negotiate-auth-helpers='squid_kerb_auth'
       
    76 CONFIGURE_OPTIONS += --enable-ntlm-auth-helpers='SMB,fakeauth,no_check'
       
    77 CONFIGURE_OPTIONS += --enable-ntlm-fail-open
       
    78 CONFIGURE_OPTIONS += --enable-referer-log
       
    79 CONFIGURE_OPTIONS += --enable-removal-policies='heap,lru'
       
    80 CONFIGURE_OPTIONS += --enable-snmp
       
    81 CONFIGURE_OPTIONS += --enable-ssl
       
    82 CONFIGURE_OPTIONS += --enable-storeio='aufs,coss,diskd,ufs,null'
       
    83 CONFIGURE_OPTIONS += --enable-useragent-log
       
    84 CONFIGURE_OPTIONS += --enable-x-accelerator-vary
       
    85 CONFIGURE_OPTIONS += --with-aio
       
    86 CONFIGURE_OPTIONS += --with-aufs-threads=8
       
    87 CONFIGURE_OPTIONS += --with-large-files
       
    88 CONFIGURE_OPTIONS += --with-build-environment=POSIX_V6_ILP32_OFFBIG
       
    89 CONFIGURE_OPTIONS += --with-pthreads
       
    90 
       
    91 COMPONENT_POST_BUILD_ACTION= \
       
    92 		(cd $(@D) ; $(PERL) -pi \
       
    93                 -e 'print q{visible_hostname localhost} if $$. == 1;' \
       
    94                 -e 's/^\# +cache_effective_user.*/cache_effective_user webservd/g;' \
       
    95                 -e 's/^\# +dns_testnames.*/dns_testnames localhost/g' \
       
    96                		src/squid.conf.default )
       
    97 
       
    98 
       
    99 PKG_PROTO_DIRS +=       $(SOURCE_DIR)
       
   100 PKG_PROTO_DIRS +=       $(COMPONENT_DIR)
       
   101 
       
   102 
       
   103 include ../../make-rules/shared-targets.mk
       
   104 
       
   105 # common targets
       
   106 build:		$(BUILD_32) 
       
   107 
       
   108 install:	$(INSTALL_32) 
       
   109 		sed -f oracleman-stability $(BUILD_DIR_32)/doc/squid.8 \
       
   110 			> $(PROTOUSRDIR)/squid/man/man8/squid.8
       
   111 		sed -f oracleman-stability $(BUILD_DIR_32)/doc/cachemgr.cgi.8 \
       
   112 			> $(PROTOUSRDIR)/squid/man/man8/cachemgr.cgi.8
       
   113 		sed -f oracleman-stability $(SOURCE_DIR)/helpers/basic_auth/NCSA/ncsa_auth.8 \
       
   114 			> $(PROTOUSRDIR)/squid/man/man8/ncsa_auth.8
       
   115 		sed -f oracleman-stability $(SOURCE_DIR)/helpers/basic_auth/PAM/pam_auth.8 \
       
   116 			> $(PROTOUSRDIR)/squid/man/man8/pam_auth.8
       
   117 		sed -f oracleman-stability $(BUILD_DIR_32)/helpers/basic_auth/DB/squid_db_auth.8 \
       
   118 			> $(PROTOUSRDIR)/squid/man/man8/squid_db_auth.8
       
   119 		sed -f oracleman-stability $(SOURCE_DIR)/helpers/basic_auth/LDAP/squid_ldap_auth.8 \
       
   120 			> $(PROTOUSRDIR)/squid/man/man8/squid_ldap_auth.8
       
   121 		sed -f oracleman-stability $(SOURCE_DIR)/helpers/external_acl/ldap_group/squid_ldap_group.8 \
       
   122 			> $(PROTOUSRDIR)/squid/man/man8/squid_ldap_group.8
       
   123 		sed -f oracleman-stability $(SOURCE_DIR)/helpers/external_acl/unix_group/squid_unix_group.8 \
       
   124 			> $(PROTOUSRDIR)/squid/man/man8/squid_unix_group.8
       
   125 		
       
   126 test:
       
   127 	@echo "no tests available"
       
   128 
       
   129 
       
   130 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
       
   131 
       
   132 include ../../make-rules/depend.mk