[packages/apache-mod_pagespeed] - smaller tarball by excluding deps from checkout present as system libs

draenog draenog at pld-linux.org
Sun Jul 8 00:50:47 CEST 2012


commit 17e08f8564d02c5469ceb5e7f80f813931e2f55b
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Sat Jul 7 19:56:16 2012 +0000

    - smaller tarball by excluding deps from checkout present as system libs
    
    Changed files:
        apache-mod_pagespeed.spec -> 1.15
        gclient.conf -> 1.1
        get-source.sh -> 1.7

 apache-mod_pagespeed.spec |  4 ++--
 gclient.conf              | 26 ++++++++++++++++++++++++++
 get-source.sh             | 25 ++++++++++++++++++++-----
 3 files changed, 48 insertions(+), 7 deletions(-)
---
diff --git a/apache-mod_pagespeed.spec b/apache-mod_pagespeed.spec
index 2b9792b..17d4e58 100644
--- a/apache-mod_pagespeed.spec
+++ b/apache-mod_pagespeed.spec
@@ -26,11 +26,11 @@
 Summary:	Apache module for rewriting web pages to reduce latency and bandwidth
 Name:		apache-mod_%{mod_name}
 Version:	0.10.22.4
-Release:	0.9
+Release:	0.10
 License:	Apache v2.0
 Group:		Networking/Daemons/HTTP
 Source0:	modpagespeed-%{version}.tar.bz2
-# Source0-md5:	9c9a8b091ee8d37253ee35878c3390e6
+# Source0-md5:	5a05827b25b66cdfb68bdce163f13e37
 Source1:	get-source.sh
 Patch0:		system-libs.patch
 Patch1:		gcc-headers.patch
diff --git a/gclient.conf b/gclient.conf
new file mode 100644
index 0000000..a1b34c2
--- /dev/null
+++ b/gclient.conf
@@ -0,0 +1,26 @@
+solutions = [
+  { "name"        : "src",
+    "url"         : "http://modpagespeed.googlecode.com/svn/tags/0.10.22.4/src",
+    "deps_file"   : "DEPS",
+    "managed"     : True,
+    "custom_deps" : {
+		"src/third_party/apr/src": None,
+		"src/third_party/aprutil/src": None,
+
+		"src/third_party/httpd/src/include": None,
+		"src/third_party/httpd/src/os": None,
+		"src/third_party/httpd24/src/include": None,
+		"src/third_party/httpd24/src/os": None,
+
+		"src/third_party/opencv/src/opencv/include": None,
+		"src/third_party/opencv/src/opencv/modules/core": None,
+		"src/third_party/opencv/src/opencv/modules/imgproc": None,
+		"src/third_party/opencv/src/opencv/modules/highgui": None,
+
+#		"src/third_party/zlib": None,
+#		"src/third_party/libjpeg": None,
+#		"src/third_party/serf/src": None,
+    },
+    "safesync_url": "",
+  },
+]
diff --git a/get-source.sh b/get-source.sh
index 8a22716..c900612 100644
--- a/get-source.sh
+++ b/get-source.sh
@@ -8,6 +8,7 @@ baseurl=http://modpagespeed.googlecode.com/svn
 # leave empty to use latest tag, or "trunk" for trunk
 version=
 spec=apache-mod_pagespeed.spec
+force=0
 
 # abort on errors
 set -e
@@ -15,6 +16,11 @@ set -e
 dir=$(dirname "$0")
 cd "$dir"
 
+if [[ "$1" = *force ]]; then
+	force=1
+	shift
+fi
+
 if [ "$1" ]; then
 	version=$1
 fi
@@ -35,7 +41,7 @@ else
 	tarball=$pkg-$version.tar.bz2
 fi
 
-if [ -f $tarball ]; then
+if [ -f $tarball -a $force != 1 ]; then
 	echo "Tarball $tarball already exists"
 	exit 0
 fi
@@ -56,13 +62,22 @@ test -d depot_tools || {
 	chmod a+x depot_tools/gclient depot_tools/update_depot_tools
 }
 
+topdir=${PWD:-($pwd)}
+gclient=$topdir/gclient.conf
 install -d $pkg
 cd $pkg
-# force update
-rm -f .gclient
 
-../depot_tools/gclient config $svnurl
-../depot_tools/gclient sync
+if [ ! -f .gclient ]; then
+	if [ ! -f $gclient ]; then
+		../depot_tools/gclient config $svnurl --gclientfile=$gclient
+	fi
+	cp $gclient .gclient
+fi
+
+# emulate gclient config, preserving our deps
+sed -i -re '/"url"/ s,"http[^"]+","'$svnurl'",' .gclient
+
+../depot_tools/gclient sync -v
 
 # Populate the LASTCHANGE file template as we will not include VCS info in tarball
 (cd src/build && svnversion > LASTCHANGE.in)


More information about the test mailing list