[liblinear] 64/123: Add support for get-orig-source

Christian Kastner chrisk-guest at moszumanska.debian.org
Tue Aug 26 03:42:10 UTC 2014


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

chrisk-guest pushed a commit to branch master
in repository liblinear.

commit 6c8cac265064c1cfd8a62a26c7c7f46d86a10bd2
Author: Christian Kastner <debian at kvr.at>
Date:   Sun Feb 27 17:47:40 2011 +0100

    Add support for get-orig-source
    
     * Remove pre-compiled Windows binaries
     * Remove BLAS implementation
---
 debian/rules | 42 +++++++++++++++++++++++++++++++++++++++---
 1 file changed, 39 insertions(+), 3 deletions(-)

diff --git a/debian/rules b/debian/rules
index 0135aa8..bb8671d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,10 +4,16 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+
+# Path to package source directory 
+PKGDIR := $(dir $(firstword $(MAKEFILE_LIST)))..
+
 # Get version numbers for SONAME from changelog
-DVER = $(shell dpkg-parsechangelog | grep '^Version')
-LVER = $(shell echo $(DVER) | sed -e 's/Version: \([0-9]*\)\..*/\1/')
-LSUBVER = $(shell echo $(DVER) | sed -e 's/Version: .*\.\([0-9]*\).*/\1/')
+DVER := $(shell cd $(PKGDIR) && dpkg-parsechangelog | grep '^Version')
+UPVER := $(shell echo $(DVER) | sed -rne 's/Version: ([^+]+).*/\1/p')
+LVER := $(shell echo $(UPVER) | sed -rne 's/([0-9]+)\..*/\1/p')
+LSUBVER := $(shell echo $(UPVER) | sed -rne 's/[0-9]+\.([0-9]+)/\1/p')
+# Export for upstream's Makefile
 export LVER
 export LSUBVER
 
@@ -39,3 +45,33 @@ override_dh_compress:
 
 override_dh_strip:
 	dh_strip --dbg-package=liblinear-dbg
+
+
+get-orig-source:
+	test -x /usr/bin/unzip || { echo "Package 'unzip' required"; exit 1; }
+	
+	uscan --noconf --force-download --download-current-version \
+		--check-dirname-level=0 --destdir=$(CURDIR) $(PKGDIR)
+	
+	#MKDIR GET-ORIG-SOURCE
+	
+	unzip liblinear-$(UPVER).zip
+	rm -f liblinear-$(UPVER).zip
+	
+	# Remove Windows binaries
+	rm -rf liblinear-$(UPVER)/windows/
+	
+	# Remove BLAS implementation with unknown license
+	rm -rf liblinear-$(UPVER)/blas/
+	sed -i -e 's| ../blas/blas.a||' liblinear-$(UPVER)/matlab/Makefile
+	sed -i -e 's| blas/blas.a||' liblinear-$(UPVER)/Makefile
+	sed -i -e '/blas/d' liblinear-$(UPVER)/matlab/Makefile
+	sed -i -e '/blas/d' liblinear-$(UPVER)/Makefile
+	
+	mv liblinear-$(UPVER) liblinear-$(UPVER).orig
+	GZIP="-9" tar --owner=root --group=root --mode=a+rX \
+			-czf liblinear_$(UPVER)+dfsg.orig.tar.gz \
+			liblinear-$(UPVER).orig
+	
+	rm -rf liblinear-$(UPVER).orig 
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/liblinear.git



More information about the debian-science-commits mailing list