[SCM] LHAPDF: Les Houches Accord PDF Interface branch, master, updated. upstream/5.8.7-2-g6775e75

Lifeng Sun lifongsun at gmail.com
Wed May 30 02:16:16 UTC 2012


The following commit has been merged in the master branch:
commit 6775e751927281222defb24fef5235cf8104f121
Author: Lifeng Sun <lifongsun at gmail.com>
Date:   Wed May 30 09:46:12 2012 +0800

    uscan supports repackaging source tarball.

diff --git a/debian/get-orig-source b/debian/get-orig-source
index 91e75c6..2e5ee95 100755
--- a/debian/get-orig-source
+++ b/debian/get-orig-source
@@ -2,28 +2,25 @@
 
 set -e
 
-[ $# == 1 ] || exit 1
+[ $# == 3 ] || exit 1
 
-ver="$1"
+ver="$2"
 pkg="lhapdf"
-
-cd ..
+url="http://www.hepforge.org/archive/lhapdf"
 
 # get official tarball
-[ -f "$pkg-$ver.tar.gz" ] && rm -f "$pkg-$ver.tar.gz"
-
-wget "http://www.hepforge.org/archive/lhapdf/$pkg-$ver.tar.gz"
+[ ! -f "../$pkg-$ver.tar.gz" ] && \
+        wget "$url/$pkg-$ver.tar.gz" -O ../$pkg-$ver.tar.gz
 
 [ -d "$pkg-$ver" ] && rm -rf "$pkg-$ver"
-
-tar xf "$pkg-$ver.tar.gz"
+tar xf "../$pkg-$ver.tar.gz"
 
 # get PDFsets
 mkdir -p "$pkg-$ver/PDFsets"
 cd "$pkg-$ver/PDFsets"
 
 for pdf in cteq5l.LHgrid cteq61.LHgrid cteq61.LHpdf MRST2004nlo.LHgrid; do
-	wget "http://www.hepforge.org/archive/lhapdf/pdfsets/$ver/$pdf"
+	wget "$url/pdfsets/$ver/$pdf"
 done
 
 cd ../..
@@ -36,7 +33,8 @@ rm -f "$pkg-$ver/pyext/lhapdf.py" "$pkg-$ver/pyext/lhapdf_wrap.cc" \
 [ -d "$pkg-$ver.orig" ] && rm -rf "$pkg-$ver.orig"
 
 mv "$pkg-$ver" "$pkg-$ver.orig"
-tar zcf "${pkg}_$ver.orig.tar.gz" "$pkg-$ver.orig"
+[ -e "../${pkg}_$ver.orig.tar.gz" ] && rm -f "../${pkg}_$ver.orig.tar.gz"
+tar zcf "../${pkg}_$ver.orig.tar.gz" "$pkg-$ver.orig"
 
 rm -rf "$pkg-$ver.orig"
 
diff --git a/debian/rules b/debian/rules
index 9787392..fe955df 100755
--- a/debian/rules
+++ b/debian/rules
@@ -57,7 +57,7 @@ UPVER=$(shell echo $(DEBVER) | sed -e 's/-[^-]*$$//' -e 's/^[^:]*://')
                
 ../$(PKGNAME)_$(UPVER).orig.tar.gz:
 	dh_testdir
-	./debian/get-orig-source $(UPVER)
+	./debian/get-orig-source --upstream-version $(UPVER) $@
 
 get-orig-source: ../$(PKGNAME)_$(UPVER).orig.tar.gz
 
diff --git a/debian/watch b/debian/watch
index 56731aa..4c82fd2 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
 version=3
 
-http://projects.hepforge.org/lhapdf/ .*lhapdf-(.*)\.tar\.gz
+http://projects.hepforge.org/lhapdf/ .*lhapdf-(.*)\.tar\.gz debian ./debian/get-orig-source

-- 
LHAPDF: Les Houches Accord PDF Interface



More information about the debian-science-commits mailing list