[Pkg-zsh-commits] [zsh-syntax-highlighting] 02/06: d/changelog: Fix lintian warning 'debian-rules-parses-dpkg-parsechangelog'.
Daniel Shahaf
danielsh at apache.org
Tue Aug 1 00:35:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
danielsh-guest pushed a commit to branch debian/master
in repository zsh-syntax-highlighting.
commit 2972623b2548e289839fa74bee12f58fbed80d67
Author: Daniel Shahaf <d.s at daniel.shahaf.name>
Date: Mon Jul 31 22:19:08 2017 +0000
d/changelog: Fix lintian warning 'debian-rules-parses-dpkg-parsechangelog'.
debian/patches/set-version.patch now uses pkg-info.mk too; it is
provided by dpkg-dev which reverse depends on build-essential.
---
debian/patches/set-version.patch | 13 +++++++------
debian/rules | 9 +++++----
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/debian/patches/set-version.patch b/debian/patches/set-version.patch
index d36153a..3c40002 100644
--- a/debian/patches/set-version.patch
+++ b/debian/patches/set-version.patch
@@ -5,7 +5,7 @@ Description: Set $ZSH_HIGHLIGHT_VERSION to the package version
[1] git://anonscm.debian.org/collab-maint/zsh.git
Author: Daniel Shahaf <danielsh at apache.org>
Forwarded: not-needed
-Last-Update: 2015-10-28
+Last-Update: 2017-07-31
This patch implements setting .revision-hash to a valid gitrevisions(7)
expression identifying the source control revision of the packaging (and, by
@@ -17,11 +17,12 @@ rather than upstream's).
---
--- a/Makefile
+++ b/Makefile
-@@ -1,5 +1,13 @@
+@@ -1,5 +1,14 @@
NAME=zsh-syntax-highlighting
++include /usr/share/dpkg/pkg-info.mk
++
+DPKG_VENDOR=$(shell dpkg-vendor --query vendor | env LC_ALL=C tr A-Z a-z | env LC_ALL=C tr -d -c '[:alnum:]')
-+DCH_VERSION=$(shell dpkg-parsechangelog -SVersion)
+ifeq "$(shell dpkg-parsechangelog -SDistribution)" "UNRELEASED"
+DOTVERSION_SUFFIX="+unreleased"
+else
@@ -31,7 +32,7 @@ rather than upstream's).
INSTALL?=install -c
PREFIX?=/usr/local
SHARE_DIR?=$(DESTDIR)$(PREFIX)/share/$(NAME)
-@@ -17,11 +25,20 @@
+@@ -17,11 +26,20 @@
$(INSTALL) -d $(DOC_DIR)
cp .version zsh-syntax-highlighting.zsh $(SHARE_DIR)
cp COPYING.md README.md changelog.md $(DOC_DIR)
@@ -40,7 +41,7 @@ rather than upstream's).
- else \
- cat .revision-hash; \
- fi > $(SHARE_DIR)/.revision-hash
-+ printf "%s_%s%s\n" "$(DCH_VERSION)" "$(DPKG_VENDOR)" "$(DOTVERSION_SUFFIX)" \
++ printf "%s_%s%s\n" "$(DEB_VERSION)" "$(DPKG_VENDOR)" "$(DOTVERSION_SUFFIX)" \
+ > $(SHARE_DIR)/.version
+ifeq "$(shell dpkg-parsechangelog -SDistribution)" "UNRELEASED"
+# Unreleased means we're inside the packaging's git repository; assert that:
@@ -51,7 +52,7 @@ rather than upstream's).
+# but also means the code we are building has been tagged. That allows us
+# to set .revision-hash to a valid gitrevisions(7) expression: we set it to
+# "debian/0.3.0-1", the tag name of the release we are building.
-+ printf "%s/%s\n" "$(DPKG_VENDOR)" "$(DCH_VERSION)" \
++ printf "%s/%s\n" "$(DPKG_VENDOR)" "$(DEB_VERSION)" \
+ > $(SHARE_DIR)/.revision-hash
+endif
:
diff --git a/debian/rules b/debian/rules
index 4d6f8f3..f8e3ec6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,8 @@
NAME=zsh-syntax-highlighting
PREFIX=/usr
+include /usr/share/dpkg/pkg-info.mk
+
# Remove COPYING.md as duplicate of /usr/share/doc/.../copyright
override_dh_auto_install:
dh_auto_install -- PREFIX=$(PREFIX)
@@ -17,9 +19,8 @@ override_dh_installchangelogs:
# The upstream version may be '0.6.0-rc1', in which case the debian version is
# '0.6.0~rc1', and the debian tag 'debian/0.6.0_rc1-1' per DEP-14.
-_origtar: debian_version=$(shell dpkg-parsechangelog -SVersion | sed 's/-[^-]*$$//')
-_origtar: upstream_tag=$(shell dpkg-parsechangelog -SVersion | sed -e 's/-[^-]*$$//' -e 's/[~]/-/')
+_origtar: upstream_tag=$(shell printf %s $(DEB_VERSION_UPSTREAM) | sed -e 's/[~]/-/')
_origtar:
git tag --verify $(upstream_tag)
- git archive --format=tar --output=../zsh-syntax-highlighting_$(debian_version).orig.tar --prefix=zsh-syntax-highlighting-$(debian_version)/ $(upstream_tag)
- xz -7v ../zsh-syntax-highlighting_$(debian_version).orig.tar
+ git archive --format=tar --output=../zsh-syntax-highlighting_$(DEB_VERSION_UPSTREAM).orig.tar --prefix=zsh-syntax-highlighting-$(DEB_VERSION_UPSTREAM)/ $(upstream_tag)
+ xz -7v ../zsh-syntax-highlighting_$(DEB_VERSION_UPSTREAM).orig.tar
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-zsh/zsh-syntax-highlighting.git
More information about the Pkg-zsh-commits
mailing list