[SCM] Abstraction layer over the JSON-RPC API provided by Zabbix branch, master, updated. debian/0.004+git20120629-1-11-g3fd43ce

Dmitry Smirnov onlyjob at member.fsf.org
Fri Mar 29 05:55:04 UTC 2013


The following commit has been merged in the master branch:
commit 707d4cc5ac1aab15c27ef4de86410fec56d0d562
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date:   Fri Mar 29 15:50:12 2013 +1100

    get-orig-source/watch simplified to fetch orig.tar

diff --git a/debian/rules b/debian/rules
index 0f810d1..7d5edb5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,19 +7,10 @@
 %:
 	dh $@
 
-PACKAGE := libzabbix-api-perl
-VER := $(shell dpkg-parsechangelog | perl -ne 'print $$1 if m/Version:\s*([\d\.+git]+)/')
-UVER := $(shell echo $(VER) | perl -ne 'print $$1 if m/\+git(\d+)/')
-UVER_DATE := $(shell echo '$(UVER)' | perl -ne 'print $$1 if m/^(\d{8})/')
-UVER_TIME := $(shell echo '$(UVER)' | perl -ne 'print $$1 if m/^\d{8}(\d+)/')
-UVER_UDATE := $(shell date -u -d "$(UVER_DATE) $(UVER_TIME)" +%s)
+## get-orig-source
+PKD  = $(abspath $(dir $(MAKEFILE_LIST)))
+PKG  = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
+VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{Version:\s*([\d.]+)}')
+.PHONY: get-orig-source
 get-orig-source:
-	#uscan --noconf --force-download --repack --rename --download-current-version --verbose --destdir=.
-	@echo " Upstream version: $(UVER)\n Version: $(VER)\n UDATE: $(UVER_UDATE)"
-	git clone git://github.com/SFR-ZABBIX/Zabbix-API.git $(PACKAGE)-$(UVER)
-	cd $(PACKAGE)-$(UVER) \
-	&& git reset --hard $$(git rev-list --all -n 1 --before=$(UVER_UDATE)) \
-	&& git checkout master \
-	&& $(RM) -r .git .git* && cd .. && echo "Packing..." \
-	&& tar cJf $(PACKAGE)_$(VER).orig.tar.xz $(PACKAGE)-$(UVER)
-	$(RM) -r $(PACKAGE)-$(UVER)
+	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
diff --git a/debian/watch b/debian/watch
index aba3a5a..e14d30f 100644
--- a/debian/watch
+++ b/debian/watch
@@ -2,9 +2,4 @@
 
 version=3
 
-# At the moment orig.tar is slightly outdated on CPAN,
-# (but hopefully soon will catch up).
-# Meanwhile please use "debian/rules get-orig-version".
-
-opts=dversionmangle=s/\+git\d+// \
 https://metacpan.org/release/Zabbix-API/ .*/Zabbix-API-([0-9.]+)\.tar\.(?:gz|bz2|xz)

-- 
Abstraction layer over the JSON-RPC API provided by Zabbix



More information about the Pkg-perl-cvs-commits mailing list