[cod-tools] 05/08: Repackaging source to exclude non-DFSG-free STAR::Parser.
Andrius Merkys
merkys-guest at moszumanska.debian.org
Fri Dec 15 09:49:01 UTC 2017
This is an automated email from the git hooks/post-receive script.
merkys-guest pushed a commit to branch 2.0
in repository cod-tools.
commit 1c6a12c67f3e0d215ceb396969a32011bf3d0e1c
Author: Andrius Merkys <andrius.merkys at gmail.com>
Date: Fri Dec 15 10:21:02 2017 +0200
Repackaging source to exclude non-DFSG-free STAR::Parser.
---
debian/changelog | 2 +-
debian/repack | 23 +++++++++++++++++++++++
debian/watch | 3 ++-
3 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 4766594..bf2de37 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,7 @@
cod-tools (2.0-2) UNRELEASED; urgency=low
* debian/copyright: listing CIFTEST_2.1 and spglib.
- * Not installing scripts using STAR::Parser.
+ * debian/repack: repackaging source to exclude non-DFSG-free STAR::Parser.
-- Andrius Merkys <andrius.merkys at gmail.com> Fri, 15 Dec 2017 09:51:00 +0200
diff --git a/debian/repack b/debian/repack
new file mode 100755
index 0000000..fae93d1
--- /dev/null
+++ b/debian/repack
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+set -e
+
+UPSTREAM_VERSION=$2
+ORIG_TARBALL=$3
+
+REAL_TARBALL=`readlink -f ${ORIG_TARBALL}`
+
+WORKING_DIR=`dirname ${ORIG_TARBALL}`
+
+ORIG_TARBALL_DFSG=`echo ${ORIG_TARBALL} | sed -e "s/\(${UPSTREAM_VERSION}\)\(\.orig\)/\1+dfsg\2/g"`
+ORIG_TARBALL_DIR=`echo ${ORIG_TARBALL_DFSG} | sed -e "s/_\(${UPSTREAM_VERSION}\)/-\1/g" -e "s/\.tar\.gz//g"`
+ORIG_TARBALL_DIR_STRIP=`basename ${ORIG_TARBALL_DIR}`
+
+mkdir -p ${ORIG_TARBALL_DIR}
+tar --directory=${ORIG_TARBALL_DIR} --strip 1 -xzf ${REAL_TARBALL} || exit 1
+rm -f ${ORIG_TARBALL} ${REAL_TARBALL}
+
+# Delete STAR::Parser files:
+rm -rf ${ORIG_TARBALL_DIR}/src/lib/perl5/STAR/
+
+GZIP=-9 tar --remove-files --directory ${WORKING_DIR} -czf ${ORIG_TARBALL_DFSG} ${ORIG_TARBALL_DIR_STRIP} || exit 1
diff --git a/debian/watch b/debian/watch
index 8d7c01b..a4abac7 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,4 @@
version=4
-http://www.crystallography.net/cod/archives/(\d{4})/software/cod-tools/cod-tools-(\d+(?:\.\d+){0,2})\.(?:tbz2|tar\.gz)
+http://www.crystallography.net/cod/archives/(\d{4})/software/cod-tools/cod-tools-(\d+(?:\.\d+){0,2})\.(?:tbz2|tar\.gz) \
+ debian debian/repack
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cod-tools.git
More information about the debian-science-commits
mailing list