[pkg-java] r10346 - trunk/jarjar/debian
Niels Thykier
nthykier-guest at alioth.debian.org
Sun Sep 13 15:59:17 UTC 2009
Author: nthykier-guest
Date: 2009-09-13 15:59:17 +0000 (Sun, 13 Sep 2009)
New Revision: 10346
Modified:
trunk/jarjar/debian/changelog
trunk/jarjar/debian/rules
Log:
Created get-orig-source.
Modified: trunk/jarjar/debian/changelog
===================================================================
--- trunk/jarjar/debian/changelog 2009-09-12 20:49:59 UTC (rev 10345)
+++ trunk/jarjar/debian/changelog 2009-09-13 15:59:17 UTC (rev 10346)
@@ -14,6 +14,8 @@
* Bumped Debhelper to version 7.
* Added a README.source to briefly explain that files have been
excluded from the orignal upstream source.
+ * Created an get-orig-source rule to fetch and create the
+ orig.tar.gz.
-- Niels Thykier <niels at thykier.net> Sat, 12 Sep 2009 19:26:57 +0200
Modified: trunk/jarjar/debian/rules
===================================================================
--- trunk/jarjar/debian/rules 2009-09-12 20:49:59 UTC (rev 10345)
+++ trunk/jarjar/debian/rules 2009-09-13 15:59:17 UTC (rev 10346)
@@ -14,3 +14,14 @@
install/libjarjar-java::
install -m 644 -D dist/jarjar-*.jar debian//libjarjar-java/usr/share/java/jarjar-$(VERSION).jar
dh_link -plibjarjar-java /usr/share/java/jarjar-$(VERSION).jar /usr/share/java/jarjar.jar
+
+get-orig-source:
+ @dh_testdir || (echo "Due to the cdbs magic, this rule should not be run out of the build dir." ; \
+ exit 1)
+ __WORKDIR=`mktemp -d --tmpdir=.` ; \
+ (uscan --force-download --destdir="$$__WORKDIR" >/dev/null && cd "$$__WORKDIR" && \
+ __ZIP=`ls` && __NEW_VERSION=`echo $$__ZIP | sed "s/.*-\(.*\)\.zip/\1/g"` && unzip $$__ZIP >/dev/null 2>&1 && \
+ rm -f $$__ZIP && find . \( -name '*.jar' -o -name '*.class' \) -exec rm -f {} \; &&\
+ tar czf ../jarjar_$$__NEW_VERSION+dfsg.orig.tar.gz * && cd .. && rm -fr "$$__WORKDIR" && \
+ echo "Orig source: jarjar_$$__NEW_VERSION+dfsg.orig.tar.gz." && exit 0 \
+ ) || (rm -fr "$$__WORKDIR" ; exit 1)
More information about the pkg-java-commits
mailing list