[packages/apache-mod_pagespeed] cleanup some source dirs not neccessary for build

glen glen at pld-linux.org
Mon Dec 15 12:47:26 CET 2014


commit 92bbc6442769c06173ffc63e734d49b65fb96fbd
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Dec 14 19:32:22 2014 +0200

    cleanup some source dirs not neccessary for build

 get-source.sh | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/get-source.sh b/get-source.sh
index 97db72f..7ce1a4d 100755
--- a/get-source.sh
+++ b/get-source.sh
@@ -13,6 +13,14 @@ version=
 spec=apache-mod_pagespeed.spec
 force=0
 
+# There are directories we want to strip, but that are unnecessarily required by the build-system
+# So we drop everything but the gyp/gypi files
+almost_strip_dirs() {
+	for dir in "$@"; do
+		find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
+	done
+}
+
 # abort on errors
 set -e
 # work in package dir
@@ -87,9 +95,20 @@ sed -i -re '/"url"/ s,"http[^"]+","'$svnurl'",' .gclient
 
 $gclient sync --nohooks -v
 
+cd src
+
+# clean sources, but preserve .gyp, .gypi
+almost_strip_dirs \
+	third_party/apr/ \
+	third_party/httpd/ \
+	third_party/httpd24/ \
+	third_party/instaweb/ \
+	third_party/openssl/ \
+
 # Populate the LASTCHANGE file template as we will not include VCS info in tarball
-(cd src && ./build/lastchange.sh . -o LASTCHANGE.in)
-cd ..
+./build/lastchange.sh . -o LASTCHANGE.in
+
+cd ../..
 
 XZ_OPT=-e9 \
 tar --transform="s:^$package/src:$release_dir:" \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/apache-mod_pagespeed.git/commitdiff/59548b66c21e48d0a9cce0f94fea7c755a987bb6



More information about the pld-cvs-commit mailing list