[SCM] Elmer -- Open Source Finite Element Software for Multiphysical Problems branch, master, updated. debian/6.1.0.svn.5396.dfsg2-1-3-g067f20a

Boris Pek tehnick-8 at yandex.ru
Mon Sep 24 17:33:35 UTC 2012


The following commit has been merged in the master branch:
commit 2d7665fe0f9c13baeac43264812c8524b93386d0
Author: Boris Pek <tehnick-8 at yandex.ru>
Date:   Mon Sep 24 20:06:10 2012 +0300

    * Add script debian/elmerfem_get-orig-source.sh.
    * Add get-orig-source section in debian/rules.

diff --git a/debian/elmerfem_get-orig-source.sh b/debian/elmerfem_get-orig-source.sh
new file mode 100755
index 0000000..bda6612
--- /dev/null
+++ b/debian/elmerfem_get-orig-source.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+# Examples of using:
+# ./elmerfem_get-orig-source.sh
+# ./elmerfem_get-orig-source.sh 5.5.0.svn.4499.dfsg
+# ./elmerfem_get-orig-source.sh 6.1.0.svn.5396.dfsg2
+
+PACKAGE=elmerfem
+SRC_VERSION="${1}"
+SVN_REPO="https://elmerfem.svn.sourceforge.net/svnroot/elmerfem/trunk"
+
+if [ -z "${SRC_VERSION}" ]; then
+	echo "Package version is not specified, last revision from SVN repo will be used."
+	SVN_REVISION=$(svn log "${SVN_REPO}" | head -n2 |grep "r[0-9]\+" | sed -e "s/^r\([0-9]\+\).*$/\1/")
+	if [ -z "${SVN_REVISION}" ]; then
+	    echo "Failed to find last SVN revision."
+	    exit 1
+	fi
+    SRC_VERSION="6.1.0.svn.${SVN_REVISION}.dfsg"
+	echo "SVN_REVISION = ${SVN_REVISION}"
+	echo "SRC_VERSION  = ${SRC_VERSION}"
+else
+    SVN_REVISION=$(echo ${SRC_VERSION} | sed -e "s/^.*.svn.\([0-9]\+\).dfsg.*$/\1/")
+	if [ -z "${SVN_REVISION}" ]; then
+	    echo "Failed to get SVN revision from package version."
+	    exit 1
+	fi
+	echo "SVN_REVISION = ${SVN_REVISION}"
+	echo "SRC_VERSION  = ${SRC_VERSION}"
+fi
+
+TARBALL="${PACKAGE}_${SRC_VERSION}.orig.tar.gz"
+
+rm -rf "${PACKAGE}-${SRC_VERSION}" "${TARBALL}"
+svn export -r ${SVN_REVISION} "${SVN_REPO}" "${PACKAGE}-${SRC_VERSION}" || exit 1
+
+cd "${PACKAGE}-${SRC_VERSION}"
+rm -rf mathlibs umfpack elmergrid/src/metis post/src/fonts elmergrid/acx_metis.m4
+rm -rf */*.cache post/src/*/*.cache
+rm -rf ElmerGUI/Application/plugins/tetgen.h misc/tetgen_plugin/*
+cd ..
+
+GZIP='--best -n' tar -czf ${TARBALL} "${PACKAGE}-${SRC_VERSION}" || exit 1
+rm -rf "${PACKAGE}-${SRC_VERSION}"
+
+echo "${TARBALL} was created."
diff --git a/debian/rules b/debian/rules
index 2b82e3e..1925fdd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,8 @@
 # Made with the aid of debmake, by Christoph Lameter,
 # based on the sample debian/rules file for GNU hello by Ian Jackson.
 
+DEB_VER = $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-[0-9]*/\3/p')
+
 package=elmer
 
 # Support multiple makes at once
@@ -222,3 +224,6 @@ binary-arch:
 binary: binary-arch binary-indep
 
 .PHONY: build binary-indep binary-arch binary
+
+get-orig-source:
+	$(CURDIR)/debian/elmerfem_get-orig-source.sh $(DEB_VER)

-- 
Elmer -- Open Source Finite Element Software for Multiphysical Problems



More information about the debian-science-commits mailing list