[SCM] HepMC: Event Record for Monte Carlo Generators branch, master, updated. upstream/2.06.09-4-ge4e6ec3

Lifeng Sun lifongsun at gmail.com
Sat Jun 9 02:07:01 UTC 2012


The following commit has been merged in the master branch:
commit e4e6ec38facaa605a3b237c9a658f5cb8b20a503
Author: Lifeng Sun <lifongsun at gmail.com>
Date:   Sat Jun 9 10:06:52 2012 +0800

    Add get-orig-source rule.

diff --git a/debian/get-orig-source b/debian/get-orig-source
new file mode 100755
index 0000000..1e2c38b
--- /dev/null
+++ b/debian/get-orig-source
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -e
+
+[ $# == 3 ]
+
+url="http://lcgapp.cern.ch/project/simu/HepMC/download"
+ver="$2"
+
+pkgdir="hepmc-$ver.orig"
+pkg="hepmc_$ver.orig.tar.gz"
+
+uppkgdir="HepMC-$ver"
+uppkg="HepMC-$ver.tar.gz"
+
+[ ! -f "../$uppkg" ] && wget "$url/$uppkg" -O "../$uppkg"
+
+[ -d "$uppkgdir" ] && rm -rf "$uppkgdir"
+tar xf "../$uppkg"
+
+rm -rf "$uppkgdir/autom4te.cache"
+
+[ -d "$pkgdir" ] && rm -rf "$pkgdir"
+
+mv "$uppkgdir" "$pkgdir"
+rm -f "../$pkg"
+tar -zcf "../$pkg" "$pkgdir"
+
+rm -rf "$pkgdir"
diff --git a/debian/rules b/debian/rules
index 18a1713..c90680e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,14 +1,4 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-#
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-#
-# Modified to make a template file for a multi-binary package with separated
-# build-arch and build-indep targets  by Bill Allombert 2001
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -29,6 +19,20 @@ endif
 
 export CPPFLAGS CFLAGS CXXFLAGS LDFLAGS MAKEFLAGS
 
+# package name
+PKGNAME=$(strip $(shell head -n1 debian/changelog | cut -d' ' -f1))
+
+# current Debian package version
+DEBVER=$(strip $(shell head -n1 debian/changelog | cut -d' ' -f2 | tr -d '()'))
+
+# current upstream version (remove any epoch and Debian release number)
+UPVER=$(shell echo $(DEBVER) | sed -e 's/-[^-]*$$//' -e 's/^[^:]*://')
+
+../$(PKGNAME)_$(UPVER).orig.tar.gz:
+	./debian/get-orig-source --upstream-version $(UPVER) $@
+
+get-orig-source: ../$(PKGNAME)_$(UPVER).orig.tar.gz
+
 clean:
 	dh_testdir
 	dh_autoreconf_clean
@@ -69,4 +73,4 @@ binary-indep: build-indep
 
 binary: binary-arch binary-indep
 
-.PHONY: build build-arch build-indep binary binary-arch binary-indep
+.PHONY: build build-arch build-indep binary binary-arch binary-indep get-orig-source
diff --git a/debian/watch b/debian/watch
index 10569da..98bb4b2 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
 version=3
 
-http://lcgapp.cern.ch/project/simu/HepMC/download/index.html HepMC-([\d\.]+).tar.gz
+http://lcgapp.cern.ch/project/simu/HepMC/download/index.html HepMC-([\d\.]+).tar.gz debian ./debian/get-orig-source
 

-- 
HepMC: Event Record for Monte Carlo Generators



More information about the debian-science-commits mailing list