[mojarra] 03/03: Drop orig.tar.sh. Rewrite and improve get-orig-source target instead.

Markus Koschany apo-guest at moszumanska.debian.org
Mon Aug 25 11:13:48 UTC 2014


This is an automated email from the git hooks/post-receive script.

apo-guest pushed a commit to branch master
in repository mojarra.

commit 746046f66b49d6506fb2d3be826119c29366c08d
Author: Markus Koschany <apo at gambaru.de>
Date:   Sat Aug 23 22:29:18 2014 +0200

    Drop orig.tar.sh. Rewrite and improve get-orig-source target instead.
---
 debian/orig-tar.excludes |  8 --------
 debian/orig-tar.sh       | 18 ------------------
 debian/rules             | 29 +++++++++++++++++++++--------
 3 files changed, 21 insertions(+), 34 deletions(-)

diff --git a/debian/orig-tar.excludes b/debian/orig-tar.excludes
deleted file mode 100644
index b5f8df3..0000000
--- a/debian/orig-tar.excludes
+++ /dev/null
@@ -1,8 +0,0 @@
-# remove bundled jars
-mojarra-2*/jsf-ri/systest-per-webapp/jar-ordering/web/WEB-INF/lib/*
-mojarra-2*/common/lib/*
-mojarra-2*/lib/*
-
-# remove autogenerated source code
-mojarra-2*/jsf-api/build/*
-mojarra-2*/jsf-ri/build/*
diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh
deleted file mode 100755
index 1a2ca3e..0000000
--- a/debian/orig-tar.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh 
-
-set -e
-
-# called by uscan with '--upstream-version' <version> <file>
-echo "version $2"
-package=`dpkg-parsechangelog | sed -n 's/^Source: //p'`
-version=$2
-tarball=$3
-TAR=${package}_${version}.orig.tar.gz
-DIR=${package}-${version}.orig
-
-unzip $tarball && mv "${package}-${version}-FCS-source" $DIR
-
-GZIP=--best tar --numeric --group 0 --owner 0 -c -v -z -f $TAR \
-    --anchored -X debian/orig-tar.excludes $DIR
-
-rm -rf $tarball $DIR
diff --git a/debian/rules b/debian/rules
index ded3ba9..c53e43e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,4 +1,9 @@
 #!/usr/bin/make -f
+PKD  = $(abspath $(dir $(MAKEFILE_LIST)))
+VER := $(shell dpkg-parsechangelog -l$(PKD)/changelog -SVersion | cut -d- -f1)
+UURL := https://svn.java.net/svn/mojarra~svn/tags/
+PKG := mojarra
+DTYPE := +dfsg
 
 export JAVA_HOME=/usr/lib/jvm/default-java
 
@@ -19,11 +24,19 @@ override_dh_auto_clean:
 override_dh_clean:
 	dh_clean -X.glassfish.orig
 
-get-orig-source:
-	cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \
-	uscan \
-		--verbose \
-		--no-symlink \
-		--destdir $(CURDIR)      \
-		--watchfile debian/watch \
-		--force-download
+## https://wiki.debian.org/onlyjob/get-orig-source
+get-orig-source: $(PKG)_$(VER).orig.tar.xz
+		@
+
+$(PKG)_$(VER).orig.tar.xz:
+	svn checkout --config-option config:miscellany:use-commit-times=yes \
+		$(UURL)$(VER) $(PKG)-$(VER) \
+		|| $(RM) -r $(PKG)-$(VER)
+		@echo "Clean-up..."
+		find $(PKG)-$(VER) -iname "*.jar" -delete -printf 'removed %p\n'
+		find $(PKG)-$(VER) -iname "*.class" -delete -printf 'removed %p\n'
+		find $(PKG)-$(VER) -depth -name ".svn" -exec $(RM) -r '{}' \;
+		@echo "Packing..."
+		find -L "$(PKG)-$(VER)" -xdev -type f -print \
+		| sort | XZ_OPT="-7v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
+		&& $(RM) -r "$(PKG)-$(VER)"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/mojarra.git



More information about the pkg-java-commits mailing list