[Pkg-cli-apps-commits] [fsharp] 01/05: Actually delete unneeded binaries from +dfsg.orig.tar.gz

Jo Shields directhex at moszumanska.debian.org
Tue Oct 14 19:04:37 UTC 2014


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

directhex pushed a commit to branch master
in repository fsharp.

commit f28700d648993bdd317fa990b17a9ccfb38c0fb6
Author: Jo Shields <jo.shields at xamarin.com>
Date:   Mon Oct 13 18:27:56 2014 +0100

    Actually delete unneeded binaries from +dfsg.orig.tar.gz
---
 debian/rules | 35 +++++++++++++++++++++++++++++++++++
 debian/watch |  2 +-
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 9d076f9..ad165b2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,6 +16,15 @@
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
 
+MAKEFILE = $(firstword $(MAKEFILE_LIST))
+DEBIAN_DIR = $(dir $(MAKEFILE))
+SOURCE_DIR = $(DEBIAN_DIR)/..
+
+DEB_VERSION = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Version | cut -d" " -f2)
+DEB_SOURCE_NAME = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Source | cut -d" " -f2)
+VERSION = $(shell echo $(DEB_VERSION) | cut -d"-" -f1 | sed 's/+dfsg.*//')
+
+
 override_dh_fixperms:
 	dh_fixperms
 	# Fix permissions of non-executable cruft
@@ -27,5 +36,31 @@ override_dh_fixperms:
 override_dh_clideps:
 	dh_clideps --exclude-moduleref=mscoree.dll
 
+get-orig-source:
+	uscan \
+		--package $(DEB_SOURCE_NAME) \
+		--watchfile $(DEBIAN_DIR)/watch \
+		--upstream-version $(VERSION) \
+		--download-version $(VERSION) \
+		--destdir . \
+		--force-download \
+		--rename \
+		--repack
+	if [ -d $(DEB_SOURCE_NAME)-$(VERSION) ]; then \
+		echo "$(DEB_SOURCE_NAME)-$(VERSION) is in the way, bailing out!"; \
+		exit 1; \
+	fi
+	tar -xzf $(DEB_SOURCE_NAME)_$(VERSION).orig.tar.gz
+	rm $(DEB_SOURCE_NAME)_$(VERSION).orig.tar.gz
+	find $(DEB_SOURCE_NAME)-$(VERSION) -name "*.exe" | grep -v "bootstrap"
+	find $(DEB_SOURCE_NAME)-$(VERSION) -name "*.exe" | grep -v "bootstrap" | xargs rm -f
+	find $(DEB_SOURCE_NAME)-$(VERSION) -name "*.dll" | grep -v "bootstrap"
+	find $(DEB_SOURCE_NAME)-$(VERSION) -name "*.dll" | grep -v "bootstrap" | xargs rm -f
+	find $(DEB_SOURCE_NAME)-$(VERSION)/lib/bootstrap/signed
+	rm -rf $(DEB_SOURCE_NAME)-$(VERSION)/lib/bootstrap/signed
+	tar --mtime=@1255820400 -cf ./$(DEB_SOURCE_NAME)_$(VERSION)+dfsg2.orig.tar $(DEB_SOURCE_NAME)-$(VERSION)
+	gzip -9fn ./$(DEB_SOURCE_NAME)_$(VERSION)+dfsg2.orig.tar
+	rm -r $(DEB_SOURCE_NAME)-$(VERSION)
+
 %:
 	dh $@ --with=cli,autoreconf
diff --git a/debian/watch b/debian/watch
index b220de3..e1a1948 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,6 +1,6 @@
 # format version number, currently 3; this line is compulsory!
 version=3
 
-opts="dversionmangle=s/\+dfsg//,filenamemangle=s_.*/(\d[\d\.]*)\.tar\.gz_fsharp-$1.tar.gz_" \
+opts="dversionmangle=s/\+dfsg[\d]*//,filenamemangle=s_.*/(\d[\d\.]*)\.tar\.gz_fsharp-$1.tar.gz_" \
 https://github.com/fsharp/fsharp/tags .*/(\d[\d\.]*)\.tar\.gz
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-apps/packages/fsharp.git



More information about the Pkg-cli-apps-commits mailing list