[med-svn] [Git][med-team/brig][master] Use Files-Excluded to strip upstream archive
Andreas Tille
gitlab at salsa.debian.org
Thu Jul 5 14:57:37 BST 2018
Andreas Tille pushed to branch master at Debian Med / brig
Commits:
78a2df56 by Andreas Tille at 2018-07-05T15:56:34+02:00
Use Files-Excluded to strip upstream archive
- - - - -
3 changed files:
- debian/changelog
- debian/copyright
- debian/get-orig-source
Changes:
=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,14 @@
brig (0.95+dfsg-2) UNRELEASED; urgency=low
+ [ Steffen Moeller ]
* debian/upstream/metadata:
- yamllint cleanliness
- addded references to registries
- -- Steffen Moeller <moeller at debian.org> Sat, 18 Nov 2017 20:58:42 +0100
+ [ Andreas Tille ]
+ * debian/get-orig-source: Use Files-Excluded to strip upstream archive
+
+ -- Andreas Tille <tille at debian.org> Thu, 05 Jul 2018 15:56:00 +0200
brig (0.95+dfsg-1) unstable; urgency=low
=====================================
debian/copyright
=====================================
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,9 +1,7 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: BRIG
Source: http://sourceforge.net/projects/brig/files
-Files-Excluded: */*.jar
- */.DS_Store
- *.pdf
+Files-Excluded: */*.jar */.DS_Store */*.pdf */errorlog.xml */cgview
Files: *
Copyright: 2010-2012 Nabil Alikhan
=====================================
debian/get-orig-source
=====================================
--- a/debian/get-orig-source
+++ b/debian/get-orig-source
@@ -12,14 +12,15 @@
COMPRESS=xz
NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
+COPYRIGHT=$(pwd)/debian/copyright
set -x
echo args = $@
if ! echo $@ | grep -q upstream-version ; then
- VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'`
+ VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed -e 's/+dfsg[0-9]*//' -e 's/\([0-9\.]\+\)-[0-9]\+$/\1/'`
uscan --force-download
else
- VERSION=`echo $@ | sed "s?^.*--upstream-version \([0-9.]\+\) .*BRIG.*-dist.*?\1?"`
+ VERSION=`echo $@ | sed -e 's/+dfsg[0-9]*//' -e "s?^.*--upstream-version \([0-9.]\+\)-[0-9]\+- .*BRIG.*-dist.*?\1?"`
if echo "$VERSION" | grep -q "upstream-version" ; then
echo "Unable to parse version number"
exit
@@ -41,11 +42,9 @@ LC_ALL=C svn --quiet export ${SVNURI} ${NAME}-code
unzip -q ../BRIG-${VERSION}-dist.zip
mv BRIG-${VERSION}-dist ${TARDIR}
cd ${TARDIR}
-find . -name "*.jar" -delete
-find . -name ".DS_Store" -delete
-find . -name "*.pdf" -delete
-rm -rf errorlog.xml
-rm -rf cgview
+# Remove according to "Files-Excluded"
+# Its a bit tricky since '*' needs to be escaped ...
+for excl in $(grep "^Files-Excluded" ${COPYRIGHT} | sed -e 's/^Files-Excluded: */ /' -e 's/ \*/ \\*/g') ; do find . -path "$(echo $excl | sed 's/^\\//')" | xargs rm -rf ; done
# copy Java source from SVN
mv ../${NAME}-code/BRIG/src .
# Cherry pick from SVN content - no idea what principle upstream followed when creating download archive
View it on GitLab: https://salsa.debian.org/med-team/brig/commit/78a2df56a4218c138b79fc64127f1097888dfaaf
--
View it on GitLab: https://salsa.debian.org/med-team/brig/commit/78a2df56a4218c138b79fc64127f1097888dfaaf
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20180705/9a2333bc/attachment-0001.html>
More information about the debian-med-commit
mailing list