packages: closure-compiler/closure-compiler.spec, closure-compiler/get-sour...

glen glen at pld-linux.org
Thu Aug 25 16:29:42 CEST 2011


Author: glen                         Date: Thu Aug 25 14:29:42 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add script to build source package

---- Files affected:
packages/closure-compiler:
   closure-compiler.spec (1.6 -> 1.7) , get-source.sh (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/closure-compiler/closure-compiler.spec
diff -u packages/closure-compiler/closure-compiler.spec:1.6 packages/closure-compiler/closure-compiler.spec:1.7
--- packages/closure-compiler/closure-compiler.spec:1.6	Thu Aug 25 16:02:19 2011
+++ packages/closure-compiler/closure-compiler.spec	Thu Aug 25 16:29:37 2011
@@ -1,6 +1,6 @@
 # $Revision$, $Date$
 # TODO
-# - build from source
+# - build from source (get-source.sh fetches it)
 
 %include	/usr/lib/rpm/macros.java
 Summary:	Closure Compiler - JavaScript compressor
@@ -12,6 +12,7 @@
 Source0:	http://closure-compiler.googlecode.com/files/compiler-%{version}.tar.gz
 # Source0-md5:	815d453b7c51657241d11307231a4037
 Source1:	%{name}.sh
+Source2:	get-source.sh
 URL:		http://closure-compiler.appspot.com/
 BuildRequires:	rpm-javaprov
 BuildRequires:	rpmbuild(macros) >= 1.300
@@ -54,6 +55,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.7  2011/08/25 14:29:37  glen
+- add script to build source package
+
 Revision 1.6  2011/08/25 14:02:19  glen
 - up to 20110811
 

================================================================
Index: packages/closure-compiler/get-source.sh
diff -u /dev/null packages/closure-compiler/get-source.sh:1.1
--- /dev/null	Thu Aug 25 16:29:42 2011
+++ packages/closure-compiler/get-source.sh	Thu Aug 25 16:29:37 2011
@@ -0,0 +1,27 @@
+#!/bin/sh
+p=closure-compiler
+fn=compiler
+svn=http://$p.googlecode.com/svn/trunk
+dl=https://code.google.com/p/$p/downloads/list?can=3
+
+set -x
+
+html() {
+	if [ -z "$html" ]; then
+		html=$(lynx -width 1200 -dump -nolist "$dl")
+	fi
+	echo "$html"
+}
+
+rev=$(html | perl -nne '/'$fn'-latest.tar.gz.*Build at r(\d+)/and print $1')
+date=$(html | perl -ne '/'$fn'-(\d+).tar.gz.*Build at r'$rev'/and print $1')
+
+d=$p-$date
+if [ ! -d "$d" ]; then
+	svn export -q $svn@$rev $p-$date
+fi
+
+t=$d.tar.bz2
+if [ ! -f "$t" ]; then
+	tar -cjf $t --exclude-vcs $d
+fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/closure-compiler/closure-compiler.spec?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list