Author: tille Date: 2012-06-01 10:21:27 +0000 (Fri, 01 Jun 2012) New Revision: 11148
Modified: trunk/packages/imagej/trunk/debian/changelog trunk/packages/imagej/trunk/debian/get-orig-source trunk/packages/imagej/trunk/debian/watch Log: Let uscan call get-orig-source directly Modified: trunk/packages/imagej/trunk/debian/changelog =================================================================== --- trunk/packages/imagej/trunk/debian/changelog 2012-06-01 09:31:25 UTC (rev 11147) +++ trunk/packages/imagej/trunk/debian/changelog 2012-06-01 10:21:27 UTC (rev 11148) @@ -1,3 +1,12 @@ +imagej (1.46o-1) UNRELEASED; urgency=low + + * New upstream version + * debian/get-orig-source: Better handling when called via watch file + * debian/watch: call get-orig-source + * debian/upstream: citations + + -- Andreas Tille <[email protected]> Fri, 01 Jun 2012 12:17:40 +0200 + imagej (1.46a-1) unstable; urgency=low * New upstream version Modified: trunk/packages/imagej/trunk/debian/get-orig-source =================================================================== --- trunk/packages/imagej/trunk/debian/get-orig-source 2012-06-01 09:31:25 UTC (rev 11147) +++ trunk/packages/imagej/trunk/debian/get-orig-source 2012-06-01 10:21:27 UTC (rev 11148) @@ -2,27 +2,33 @@ # Upstream provides source in ZIP file so we have to repack anyway and # thus it seems reasonable to remove some binary cruft -NAME=imagej -# Obtain upstream version number from changelog file -# DVERSION=`grep "^${NAME} *(.\+)" debian/changelog | head -n 1 | sed "s/^${NAME} \+(\([^-]\+\)-[0-9]*) .*/\1/"` -# Find out latest upstream version -DVERSION=`uscan --verbose --force-download | \ - grep "Newest version on remote site is .* local version is .*" | \ - head -n 1 | \ - sed "s/Newest version on remote site is \([-0-9.]\+[a-z]*\),.*/\1/"` +set -x +NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'` +ORIGNAME=ij -UVERSION=ij`echo ${DVERSION} | sed 's/\.//'` +if ! echo $@ | grep -q upstream-version ; then + DVERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'` +else + DVERSION=`echo $@ | sed "s?^.*--upstream-version \([0-9.]\+[a-z]\) .*${ORIGNAME}.*-src\.zip?\1?"` + if echo "$DVERSION" | grep -q "upstream-version" ; then + echo "Unable to parse version number" + exit + fi +fi + +UVERSION=${ORIGNAME}`echo ${DVERSION} | sed 's/\.//'` UPSTREAMZIP=${UVERSION}-src.zip UPSTREAMDIR=source -mkdir -p ../tarballs -cd ../tarballs +cd .. +mkdir -p tarballs if [ ! -f "$UPSTREAMZIP" ] ; then wget -q http://imagej.nih.gov/ij/download/src/"$UPSTREAMZIP" fi -unzip "$UPSTREAMZIP" > /dev/null +cd tarballs +unzip -q ../"$UPSTREAMZIP" cd "$UPSTREAMDIR" # remove hidden binary files @@ -32,5 +38,5 @@ cd .. mv "$UPSTREAMDIR" "$NAME"-"$DVERSION" -GZIP="--best --no-name" tar -czf "$NAME"_"$DVERSION".orig.tar.gz "$NAME"-"$DVERSION" +GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -czf "$NAME"_"$DVERSION".orig.tar.gz "$NAME"-"$DVERSION" rm -rf "$NAME"-"$DVERSION" Modified: trunk/packages/imagej/trunk/debian/watch =================================================================== --- trunk/packages/imagej/trunk/debian/watch 2012-06-01 09:31:25 UTC (rev 11147) +++ trunk/packages/imagej/trunk/debian/watch 2012-06-01 10:21:27 UTC (rev 11148) @@ -2,4 +2,5 @@ version=3 opts="uversionmangle=s/(\d)+(\d\d)/$1.$2/" \ -http://imagej.nih.gov/ij/download/src/ij(\d+.)-src.zip +http://imagej.nih.gov/ij/download/src/ij(\d+.)-src.zip \ + debian debian/get-orig-source _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
