[csw-devel] SF.net SVN: gar:[15661] csw/mgar/pkg/squid/branches/squid3

wilbury at users.sourceforge.net wilbury at users.sourceforge.net
Mon Sep 19 16:08:48 CEST 2011


Revision: 15661
          http://gar.svn.sourceforge.net/gar/?rev=15661&view=rev
Author:   wilbury
Date:     2011-09-19 14:08:48 +0000 (Mon, 19 Sep 2011)
Log Message:
-----------
Use /opt/csw/bin/bash and /opt/csw/bin/ggrep.

Added Paths:
-----------
    csw/mgar/pkg/squid/branches/squid3/Makefile
    csw/mgar/pkg/squid/branches/squid3/checksums
    csw/mgar/pkg/squid/branches/squid3/files/
    csw/mgar/pkg/squid/branches/squid3/files/0000-Use-opt-csw-bin-bash-for-bootstrap.sh.patch
    csw/mgar/pkg/squid/branches/squid3/files/0001-Use-opt-csw-bin-ggrep-instead-of-egrep.patch
    csw/mgar/pkg/squid/branches/squid3/files/cswsquid

Added: csw/mgar/pkg/squid/branches/squid3/Makefile
===================================================================
--- csw/mgar/pkg/squid/branches/squid3/Makefile	                        (rev 0)
+++ csw/mgar/pkg/squid/branches/squid3/Makefile	2011-09-19 14:08:48 UTC (rev 15661)
@@ -0,0 +1,89 @@
+# Squid 3
+# $Id$
+#
+NAME = squid
+VERSION = 3.1
+CATEGORIES = server
+RELEASE = 15
+DISTVERSION = $(VERSION).$(RELEASE)
+DISTNAME = $(NAME)-$(DISTVERSION)
+RELVER = $(shell echo $(VERSION) |gsed 's/\(^[0-9]\).*\.[0-9]*/\1/')
+
+DESCRIPTION = High performance Web proxy cache
+define BLURB
+  Squid is a high performance Web proxy cache that can be arranged
+  hierarchically for an improvement in response times and a reduction in
+  bandwith usage. Squid runs on all popular Unix and Windows platforms.
+endef
+
+PACKAGES = CSWsquid
+CATALOGNAME_CSWsquid = squid
+RUNTIME_DEP_PKGS_CSWsquid = CSWoldaprt CSWosslrt CSWsasl
+PACKAGING_PLATFORMS =  solaris9-sparc solaris9-i386
+INITSMF = /etc/opt/csw/init.d/csw$(NAME)
+PRESERVECONF = /etc/opt/csw/$(NAME)/cachemgr.conf
+PRESERVECONF = /etc/opt/csw/$(NAME)/squid.conf
+PRESERVECONF = /etc/opt/csw/$(NAME)/mime.conf
+
+MIGRATE_SOURCE_DIR = /opt/csw/etc
+MIGRATE_DEST_DIR = /etc/opt/csw/$(NAME)
+MIGRATE_FILES  = cachemgr.conf
+MIGRATE_FILES += mime.conf
+MIGRATE_FILES += squid.conf
+
+MASTER_SITES = http://www.squid-cache.org/Versions/v$(RELVER)/$(VERSION)/
+DISTFILES = $(DISTNAME).tar.bz2
+DISTFILES += cswsquid
+
+PATCHFILES =  0000-Use-opt-csw-bin-bash-for-bootstrap.sh.patch
+PATCHFILES += 0001-Use-opt-csw-bin-ggrep-instead-of-egrep.patch
+
+CONFIGURE_ARGS  = $(DIRPATHS)
+CONFIGURE_ARGS += --sysconfdir=/etc/opt/csw/$(NAME)
+CONFIGURE_ARGS += --datadir=$(datadir)/$(NAME)
+CONFIGURE_ARGS += --localstatedir=/var/opt/csw/$(NAME)
+CONFIGURE_ARGS += --enable-arp-acl
+CONFIGURE_ARGS += --enable-auth=basic
+CONFIGURE_ARGS += --enable-basic-auth-helpers=LDAP,SMB,YP,PAM,SASL,NCSA
+CONFIGURE_ARGS += --enable-cache-digests
+CONFIGURE_ARGS += --enable-carp
+CONFIGURE_ARGS += --enable-delay-pools
+CONFIGURE_ARGS += --enable-forw-via-db
+CONFIGURE_ARGS += --enable-htcp
+CONFIGURE_ARGS += --enable-large-cache-files
+CONFIGURE_ARGS += --enable-referer-log
+CONFIGURE_ARGS += --enable-removal-policies=heap,lru
+CONFIGURE_ARGS += --enable-select
+CONFIGURE_ARGS += --enable-snmp
+CONFIGURE_ARGS += --enable-ssl
+CONFIGURE_ARGS += --enable-useragent-log
+CONFIGURE_ARGS += --disable-ident-lookups
+CONFIGURE_ARGS += --disable-icmp
+CONFIGURE_ARGS += --with-dl
+CONFIGURE_ARGS += --with-large-files
+CONFIGURE_ARGS += --with-openssl=$(prefix)
+
+TEST_TARGET = check
+BUILD64=1
+
+PROTOTYPE_MODIFIERS      = varuser
+PROTOTYPE_FILES_varuser  = /var/opt/csw/squid/cache
+PROTOTYPE_FILES_varuser += /var/opt/csw/squid/logs
+PROTOTYPE_USER_varuser   = squid
+PROTOTYPE_GROUP_varuser  = squid
+
+include gar/category.mk
+
+SPKG_REVSTAMP := $(SPKG_REVSTAMP)_$(RELEASE)
+
+pre-configure-modulated:
+	cd $(WORKSRC) && $(BUILD_ENV) ./bootstrap.sh
+	@$(MAKECOOKIE)
+
+post-install-modulated:
+	ginstall -d $(DESTDIR)/etc/opt/csw/init.d
+	ginstall -d $(DESTDIR)/var/opt/csw/$(NAME)/logs
+	ginstall -d $(DESTDIR)/var/opt/csw/$(NAME)/cache
+	ginstall -m 755 $(DOWNLOADDIR)/cswsquid $(DESTDIR)/etc/opt/csw/init.d/cswsquid
+	@$(MAKECOOKIE)
+

Added: csw/mgar/pkg/squid/branches/squid3/checksums
===================================================================
--- csw/mgar/pkg/squid/branches/squid3/checksums	                        (rev 0)
+++ csw/mgar/pkg/squid/branches/squid3/checksums	2011-09-19 14:08:48 UTC (rev 15661)
@@ -0,0 +1 @@
+73d47363ddccc400bc0fb2f814c63a92  squid-3.1.15.tar.bz2

Added: csw/mgar/pkg/squid/branches/squid3/files/0000-Use-opt-csw-bin-bash-for-bootstrap.sh.patch
===================================================================
--- csw/mgar/pkg/squid/branches/squid3/files/0000-Use-opt-csw-bin-bash-for-bootstrap.sh.patch	                        (rev 0)
+++ csw/mgar/pkg/squid/branches/squid3/files/0000-Use-opt-csw-bin-bash-for-bootstrap.sh.patch	2011-09-19 14:08:48 UTC (rev 15661)
@@ -0,0 +1,22 @@
+From 9577cd3a6ec5cf5075419ebc99425236d2a61d3e Mon Sep 17 00:00:00 2001
+From: builder user <builder at opencsw.org>
+Date: Mon, 19 Sep 2011 15:53:13 +0200
+Subject: [PATCH 0/1] Use /opt/csw/bin/bash for bootstrap.sh
+
+---
+ bootstrap.sh |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/bootstrap.sh b/bootstrap.sh
+index b41b147..e079783 100755
+--- a/bootstrap.sh
++++ b/bootstrap.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/opt/csw/bin/bash
+ # Used to setup the configure.ac, autoheader and Makefile.in's if configure
+ # has not been generated. This script is only needed for developers when
+ # configure has not been run, or if a Makefile.am in a non-configured directory
+-- 
+1.7.6
+

Added: csw/mgar/pkg/squid/branches/squid3/files/0001-Use-opt-csw-bin-ggrep-instead-of-egrep.patch
===================================================================
--- csw/mgar/pkg/squid/branches/squid3/files/0001-Use-opt-csw-bin-ggrep-instead-of-egrep.patch	                        (rev 0)
+++ csw/mgar/pkg/squid/branches/squid3/files/0001-Use-opt-csw-bin-ggrep-instead-of-egrep.patch	2011-09-19 14:08:48 UTC (rev 15661)
@@ -0,0 +1,25 @@
+From df2a86bd6846c1e741d0731476185fdd30004c6d Mon Sep 17 00:00:00 2001
+From: builder user <builder at opencsw.org>
+Date: Mon, 19 Sep 2011 16:02:06 +0200
+Subject: [PATCH] Use /opt/csw/bin/ggrep instead of egrep.
+
+---
+ bootstrap.sh |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/bootstrap.sh b/bootstrap.sh
+index e079783..6152fbc 100755
+--- a/bootstrap.sh
++++ b/bootstrap.sh
+@@ -76,7 +76,7 @@ bootstrap_libtoolize() {
+ 
+     # TODO: when we have libtool2, tell libtoolize where to put its files
+     # instead of manualy moving files from ltdl to lib/libLtdl
+-    if egrep -q '^[[:space:]]*AC_LIBLTDL_' configure.ac
++    if /opt/csw/bin/ggrep -E -q '^[[:space:]]*AC_LIBLTDL_' configure.ac
+     then
+ 	ltdl="--ltdl"
+     else
+-- 
+1.7.6
+

Added: csw/mgar/pkg/squid/branches/squid3/files/cswsquid
===================================================================
--- csw/mgar/pkg/squid/branches/squid3/files/cswsquid	                        (rev 0)
+++ csw/mgar/pkg/squid/branches/squid3/files/cswsquid	2011-09-19 14:08:48 UTC (rev 15661)
@@ -0,0 +1,66 @@
+#!/sbin/sh
+# $Id#
+
+PATH=/usr/bin
+CSWPREFIX=/opt/csw
+CSWETC=/etc${PREFIX}
+CSWSBIN=${CSWPREFIX}/sbin
+SQUID_DAEMON=${CSWSBIN}/squid
+SQUID_CONF=${CSWETC}/squid/squid.conf
+SQUID_PIDFILE=/var${CSWPREFIX}/squid/logs/squid.pid
+
+if [ -f /lib/svc/share/smf_include.sh ]; then
+    . /lib/svc/share/smf_include.sh
+fi
+
+case "$1" in
+    'start')
+        if [ -x ${SQUID_DAEMON} -a -f ${SQUID_CONF} ]; then
+            if [ -f ${SQUID_PIDFILE} ]; then
+                echo 'squid server is already running'
+                    exit 0
+            else
+                echo 'starting squid server.'
+                ${SQUID_DAEMON} -D &
+                    exit 0
+            fi
+        else
+            echo '****  NOTICE  ****'
+            echo 'Problem starting squid server,'
+            echo 'Please make sure it is properly installed'
+            echo 'and properly configured.'
+            exit 1
+        fi
+        ;;
+    'stop')
+        if [ -x ${SQUID_DAEMON} -a -f ${SQUID_CONF} ]; then
+            if [ -f ${SQUID_PIDFILE} ]; then
+                ## stop gracefully
+                    echo 'stopping squid server... please wait for cleanup...'
+                ${SQUID_DAEMON} -k shutdown
+                rm -f /var/opt/csw/squid/logs/squid.pid
+                exit 0
+            else
+                ## Not running
+                echo 'squid server is already down'
+                rm -f /var/opt/csw/squid/logs/squid.pid
+                exit 0
+            fi
+        else
+            echo '****  NOTICE  ****'
+            echo 'Squid server not properly installed'
+            echo 'Forcing Down!'
+            pkill -9 squid
+            rm -f /var/opt/csw/squid/logs/squid.pid
+            exit 1
+            fi
+        ;;
+
+    *)
+        echo "Usage: $0 { start | stop }"
+        exit 1
+        ;;
+esac
+
+exit 0
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list