Browse Source

upgrading package: squid 3.0.25 -> 3.1.1

Ralf S. Engelschall 15 years ago
parent
commit
5f70a6036e
2 changed files with 92 additions and 10 deletions
  1. 70 0
      squid/squid.patch
  2. 22 10
      squid/squid.spec

+ 70 - 0
squid/squid.patch

@@ -0,0 +1,70 @@
+Index: configure
+--- configure.orig	2009-11-23 04:11:00 +0100
++++ configure	2010-01-05 17:30:54 +0100
+@@ -24069,7 +24069,7 @@
+ #define USE_ECAP 1
+ _ACEOF
+ 
+-    ECAP_LIBS="ecap/libecap.la $ECAP_LIBS"
++    ECAP_LIBS="adaptation/ecap/libecap.la $ECAP_LIBS"
+     use_adaptation=yes
+ else
+ 
+Index: errors/Makefile.in
+--- errors/Makefile.in.orig	2009-11-23 04:10:30 +0100
++++ errors/Makefile.in	2010-01-05 17:32:19 +0100
+@@ -545,7 +545,7 @@
+ 	$(INSTALL_DATA) $(srcdir)/TRANSLATORS $(DESTDIR)$(DEFAULT_ERROR_DIR)/TRANSLATORS; \
+ 	$(INSTALL_DATA) $(srcdir)/COPYRIGHT $(DESTDIR)$(DEFAULT_ERROR_DIR)/COPYRIGHT; \
+ 	$(INSTALL_DATA) $(srcdir)/errorpage.css $(DESTDIR)$(DEFAULT_STYLESHEET).default; \
+-	$(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)$(DEFAULT_ERROR_DIR)" "$(srcdir)/aliases" || exit 1 ;
++	$(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)" "$(DEFAULT_ERROR_DIR)" "$(srcdir)/aliases" || exit 1 ;
+ 
+ uninstall-local:
+ 	for l in $(TRANSLATE_LANGUAGES) templates; do \
+@@ -572,7 +572,7 @@
+ 	rm -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/COPYRIGHT
+ 
+ upgrade: install
+-	$(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)$(DEFAULT_ERROR_DIR)" "$(srcdir)/alias-upgrade" || exit 1 ;
++	$(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)" "$(DEFAULT_ERROR_DIR)" "$(srcdir)/alias-upgrade" || exit 1 ;
+ 
+ # undocumented hack.  You can use this target to create multi-lingual
+ # error pages.  For example:
+Index: errors/alias-link.sh
+--- errors/alias-link.sh.orig	2009-11-23 04:09:53 +0100
++++ errors/alias-link.sh	2010-01-05 17:32:41 +0100
+@@ -8,8 +8,9 @@
+ 
+ LN="${1}"
+ RM="${2}"
+-DIR="${3}"
+-ALIASFILE="${4}"
++DESTDIR="${3}"
++DIR="${4}"
++ALIASFILE="${5}"
+ 
+ if ! test -f ${ALIASFILE} ; then
+ 	echo "FATAL: Alias file ${ALIASFILE} does not exist!"
+@@ -37,7 +38,7 @@
+ 	# split aliases based on whitespace and create a symlink for each
+ 	# Remove and replace any pre-existing content/link
+ 	for alia in ${aliases}; do
+-		${RM} -f -r ${DIR}/${alia} || exit 1
+-		${LN} -s ${base} ${DIR}/${alia} || exit 1
++		${RM} -f -r ${DESTDIR}${DIR}/${alia} || exit 1
++		${LN} -s ${DIR}/${base} ${DESTDIR}${DIR}/${alia} || exit 1
+ 	done
+ done
+Index: src/Makefile.in
+--- src/Makefile.in.orig	2009-11-23 04:10:37 +0100
++++ src/Makefile.in	2010-01-05 17:30:54 +0100
+@@ -1407,7 +1407,7 @@
+ LIBADD_DL = @LIBADD_DL@
+ LIBLTDL = @LIBLTDL@
+ LIBOBJS = @LIBOBJS@
+-LIBS = @LIBS@
++LIBS = @ECAP_LIBS@ @LIBS@
+ LIBSASL = @LIBSASL@
+ LIBTOOL = @LIBTOOL@
+ LIB_DB = @LIB_DB@

+ 22 - 10
squid/squid.spec

@@ -21,10 +21,12 @@
 ##  SUCH DAMAGE.
 ##
 
+#   FIXME: rse: with_ecap=yes still does not build
+
 #   package version
 %define       V_maj  3
-%define       V_min  0
-%define       V_rev  25
+%define       V_min  1
+%define       V_rev  1
 
 #   package information
 Name:         squid
@@ -37,7 +39,7 @@ Class:        BASE
 Group:        Web
 License:      GPL
 Version:      %{V_maj}.%{V_min}.%{V_rev}
-Release:      20100315
+Release:      20100330
 
 #   package options
 %option       with_fsl        yes
@@ -46,12 +48,14 @@ Release:      20100315
 %option       with_ntlm       no
 %option       with_largefile  no
 %option       with_icap       no
+%option       with_ecap       no
 %option       with_esi        no
 
 #   list of sources
-Source0:      http://www.squid-cache.org/Versions/v%{V_maj}/%{V_maj}.%{V_min}/squid-%{V_maj}.%{V_min}.STABLE%{V_rev}.tar.gz
+Source0:      http://www.squid-cache.org/Versions/v%{V_maj}/%{V_maj}.%{V_min}/squid-%{V_maj}.%{V_min}.%{V_rev}.tar.gz
 Source1:      rc.squid
 Source2:      fsl.squid
+Patch0:       squid.patch
 
 #   build information
 BuildPreReq:  OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes, perl
@@ -67,6 +71,10 @@ PreReq:       openssl
 %if "%{with_ntlm}" == "yes"
 PreReq:       samba
 %endif
+%if "%{with_ecap}" == "yes"
+PreReq:       libecap
+BuildPreReq:  libecap
+%endif
 
 %description
     Squid is a full-featured Web proxy which supports proxying and
@@ -76,13 +84,14 @@ PreReq:       samba
 
 %track
     prog squid = {
-        version   = %{V_maj}.%{V_min}.STABLE%{V_rev}
+        version   = %{V_maj}.%{V_min}.%{V_rev}
         url       = http://www.squid-cache.org/Versions/v%{V_maj}/%{V_maj}.%{V_min}/
-        regex     = squid-(%{V_maj}\.\d+\.STABLE\d+)\.tar\.gz
+        regex     = squid-(%{V_maj}\.\d+(?:\.\d+)+)\.tar\.gz
     }
 
 %prep
-    %setup -q -n squid-%{V_maj}.%{V_min}.STABLE%{V_rev}
+    %setup -q -n squid-%{V_maj}.%{V_min}.%{V_rev}
+    %patch -p0
 %if "%{with_ntlm}" == "yes"
     %{l_shtool} subst \
         -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;' \
@@ -97,9 +106,9 @@ PreReq:       samba
         -e 's;/cgi-bin/;/openpkg-cgi/;' \
         tools/cachemgr.cc
     CC="%{l_cc}" \
-    CFLAGS="%{l_cflags -O}" \
+    CFLAGS="%{l_cflags -O} -pthread" \
     CPPFLAGS="%{l_cppflags}" \
-    LDFLAGS="%{l_fsl_ldflags}" \
+    LDFLAGS="%{l_fsl_ldflags} -pthread" \
     LIBS="%{l_fsl_libs}" \
     ./configure \
         --prefix=%{l_prefix} \
@@ -127,6 +136,9 @@ PreReq:       samba
 %if "%{with_icap}" == "yes"
         --enable-icap-client \
 %endif
+%if "%{with_ecap}" == "yes"
+        --enable-ecap \
+%endif
 %if "%{with_esi}" == "yes"
         --enable-esi \
 %endif
@@ -134,7 +146,7 @@ PreReq:       samba
         --enable-digest-auth-helpers="password" \
         --enable-default-err-language=English \
         --enable-err-languages=English \
-        --enable-storeio="ufs diskd null" \
+        --enable-storeio="ufs diskd" \
         --enable-removal-policies="lru heap" \
         --enable-cache-digests \
         --enable-forw-via-db \