[neon/qt/qtfeedback/Neon/release] debian: debian/{rules,watch}: Use uscan to obtain Git snapshot. Drop self-scripted (thanks to @onlyjob) get-orig-source target.

Mike Gabriel null at kde.org
Thu May 5 12:52:35 BST 2022


Git commit 996645e0b59051b18da69aa16016381ea8d64388 by Mike Gabriel.
Committed on 25/12/2021 at 21:24.
Pushed by jriddell into branch 'Neon/release'.

debian/{rules,watch}: Use uscan to obtain Git snapshot. Drop self-scripted (thanks to @onlyjob) get-orig-source target.

M  +8    -42   debian/rules
M  +4    -2    debian/watch

https://invent.kde.org/neon/qt/qtfeedback/commit/996645e0b59051b18da69aa16016381ea8d64388

diff --git a/debian/rules b/debian/rules
index a120c65..3b50b81 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,8 @@ export QT_SELECT := qt5
 
 include /usr/share/dpkg/architecture.mk
 
+QT_MODULE_VERSION = $(shell cat .qmake.conf | grep MODULE_VERSION | sed -re 's/MODULE_VERSION\s*=\s*([^\s]+)\s*/\1/')
+
 %:
 	dh $@ --with pkgkde_symbolshelper
 
@@ -20,6 +22,10 @@ override_dh_auto_build:
 	dh_auto_build
 	make docs
 
+override_dh_auto_configure:
+	cd src/feedback/ && perl /usr/lib/qt5/bin/syncqt.pl -module QtFeedback -version $(QT_MODULE_VERSION) -outdir $(CURDIR) -builddir $(CURDIR) $(CURDIR) && cd - 1>/dev/null
+	dh_auto_configure
+
 override_dh_missing:
 	dh_missing --fail-missing
 
@@ -49,45 +55,5 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	cd tests ; xvfb-run -a make check QML2_IMPORT_PATH=../../../qml QT_PLUGIN_PATH=$(CURDIR)/plugins LD_LIBRARY_PATH=$(CURDIR)/lib
 endif
 
-include /usr/share/dpkg/pkg-info.mk
-
-PKD   = $(word 1,$(abspath $(dir $(MAKEFILE_LIST))))
-PKG   = $(DEB_SOURCE)
-UVER  = $(shell echo $(DEB_VERSION) | cut -d "-" -f1)
-DTYPE =
-VER  ?= $(subst $(DTYPE),,$(UVER))
-
-UURL = https://code.qt.io/qt/qtfeedback.git
-UREV = $(shell echo $(VER) | cut -d"." -f3)
-
-QT_MODULE_VERSION = $(shell cat .qmake.conf | grep MODULE_VERSION | sed -re 's/MODULE_VERSION\s*=\s*([^\s]+)\s*/\1/')
-
-## http://wiki.debian.org/onlyjob/get-orig-source
-.PHONY: get-orig-source
-get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
-	@
-
-$(PKG)_$(VER)$(DTYPE).orig.tar.xz: $(info I: GIT Revision=$(UREV))
-	$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
-	    @echo "# Downloading..."
-	git clone $(UURL) $(PKG)-$(VER) \
-	    || $(RM) -r $(PKG)-$(VER)
-	cd $(PKG)-$(VER) \
-	    && git checkout "$(UREV)" \
-	    && ( echo "# Generating ChangeLog..." \
-	        ; git --no-pager log --format="%ai %aN (%h) %n%n%x09*%w(68,0,10) %s%n" > ChangeLog \
-	        ; touch -d "$$(git log -1 --format='%ci')" ChangeLog) \
-	    && echo "# Setting times..." \
-	    && for F in $$(git ls-tree -r --name-only HEAD); do touch --no-dereference -d "$$(git log -1 --format="%ai" -- $$F)" "$$F"; done \
-	    && echo "# Cleaning-up..." \
-	    && $(RM) -r .git .git* \
-	    $(NULL)
-	@echo "# Runnint syncqt.pl (QT_MODULE_VERSION=$(QT_MODULE_VERSION))"
-	cd $(PKG)-$(VER) \
-	    && cd src/feedback/ && perl /usr/lib/qt5/bin/syncqt.pl -module QtFeedback -version $(QT_MODULE_VERSION) -outdir $(CURDIR)/$(PKG)-$(VER) -builddir $(CURDIR)/$(PKG)-$(VER) $(CURDIR)/$(PKG)-$(VER) && cd - 1>/dev/null \
-	    $(NULL)
-	@echo "# Packing..."
-	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
-	    | XZ_OPT="-6v" tar -caf "../$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
-	    && $(RM) -r "$(PKG)-$(VER)" \
-	    $(NULL)
+get-orig-source:
+	uscan --noconf --force-download --rename --download-current-version --destdir=..
diff --git a/debian/watch b/debian/watch
index 448a90a..03fa19f 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,4 @@
-version=3
-https://download.qt.io/official_releases/qt/([\d\.]*)/([\d\.]*)/submodules/qtfeedback-everywhere-src-([^-]*)\.tar\.xz
+version=4
+opts="mode=git, pgpmode=none,  pretty=5.0~git%cd.%h" \
+https://code.qt.io/qt/qtfeedback.git \
+HEAD



More information about the Neon-commits mailing list