Andreas Tille pushed to branch master at Debian Med / community / package_template
Commits: 3ca51d11 by Andreas Tille at 2018-03-12T09:28:49+01:00 Add get-orig-source example featuring Files-Excluded removal of files - - - - - abd9e27c by Andreas Tille at 2018-03-12T09:29:31+01:00 Add README.test - - - - - 2 changed files: - + debian/README.test - + debian/get-orig-source_Files-Excluded Changes: ===================================== debian/README.test ===================================== --- /dev/null +++ b/debian/README.test @@ -0,0 +1,8 @@ +Notes on how this package can be tested. +──────────────────────────────────────── + +This package can be tested by running the provided test: + + sh run-unit-test + +in order to confirm its integrity. ===================================== debian/get-orig-source_Files-Excluded ===================================== --- /dev/null +++ b/debian/get-orig-source_Files-Excluded @@ -0,0 +1,32 @@ +#!/bin/sh -e + +COMPRESS=xz + +ONAME=#SOFTWARENAME# +GITHUBURL=https://github.com/#GITHUBTEAM#/${ONAME} + +NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'` +MVERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed -e 's/+dfsg//' -e 's/^\([0-9][0-9\.a-z]\+\)[+~][-0-9]\+$/\1/'` + +COPYRIGHT=$(pwd)/debian/copyright + +mkdir -p ../tarballs +cd ../tarballs +# need to clean up the tarballs dir first because upstream tarball might +# contain a directory with unpredictable name +rm -rf * +git clone --quiet $GITHUBURL +cd ${ONAME} +VERSION=${MVERSION}+`date -d @$(git show --format="%at" | head -n1) +%Y%m%d`+dfsg +# for esthetical reasons set file timestamps (if git-restore-mtime is installed) +git restore-mtime || true +cd .. +TARDIR=${NAME}-${VERSION} +mv ${ONAME} ${TARDIR} +rm -rf ${TARDIR}/.git +# 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/^\\//')" -delete ; done + +GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.${COMPRESS} "${TARDIR}" +rm -rf ${TARDIR} View it on GitLab: https://salsa.debian.org/med-team/community/package_template/compare/ec39ba5776687e6e6670239805f4a191c5925453...abd9e27cc17dd0bd9a6f1f71c86c14497fec263a --- View it on GitLab: https://salsa.debian.org/med-team/community/package_template/compare/ec39ba5776687e6e6670239805f4a191c5925453...abd9e27cc17dd0bd9a6f1f71c86c14497fec263a You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
