Control: tags 832128 + patch
On Tue, 28 Mar 2017 at 09:35:27 +0100, Simon McVittie wrote:
> On Fri, 22 Jul 2016 at 16:33:02 +0100, Edward Allcutt wrote:
> > The current package contains symlinks such as
> > /usr/games/fs2_open -> fs2_open_3.7.2+repack-1+b1
> > where the target doesn't exist.
>
> This was tagged pending last July, but I don't see any work-in-progress
> in pkg-games git, so I'm testing my own version of a fix for this.
Sorry, I had missed that this game is not under pkg-games maintenance but
instead in the maintainer's home directory; but the same applies, there
doesn't seem to be a patch available to the public. Re-testing the "team
upload" that I was about to make as an NMU instead; please see attached.
I'll NMU to DELAYED/2 when I've tested the new version unless you say
otherwise.
(I would suggest moving this to pkg-games if that is consistent with your
maintenance practices.)
Regards,
S
>From 960697e804ea20ce6b28a3e4e1cd65563cbc6b66 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Tue, 28 Mar 2017 09:23:49 +0100
Subject: [PATCH] Determine upstream version in a way that works for NMUs and
binNMUs
* Non-maintainer upload.
* Determine upstream version in a way that works for NMUs and binNMUs
(Closes: #832128)
* Make sure the package fails to build from source if the
/usr/games/fs2_open symlink would be dangling
---
debian/changelog | 10 ++++++++++
debian/rules | 5 +++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 8b2f62c..2ac3509 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+freespace2 (3.7.2+repack-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Determine upstream version in a way that works for NMUs and binNMUs
+ (Closes: #832128)
+ * Make sure the package fails to build from source if the
+ /usr/games/fs2_open symlink would be dangling
+
+ -- Simon McVittie <[email protected]> Tue, 28 Mar 2017 10:32:01 +0100
+
freespace2 (3.7.2+repack-1) unstable; urgency=low
* New upstream release [April 2015].
diff --git a/debian/rules b/debian/rules
index fa03e9b..2d911a3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,8 +6,7 @@
DPATH = $(abspath $(dir $(MAKEFILE_LIST)))
PKG := $(word 2,$(shell dpkg-parsechangelog -l$(DPATH)/changelog | grep ^Source))
-VER ?= $(word 2,$(shell dpkg-parsechangelog -l$(DPATH)/changelog | grep ^Version | perl -pe 's/(?:\+\w+)?-[0-9.]+\Z//'))
-#VER ?= $(shell dpkg-parsechangelog -l$(DPATH)/changelog | perl -ne 'print $$1 if m{Version:\s*([\d\.]+)}')
+VER ?= $(shell dpkg-parsechangelog -l$(DPATH)/changelog | perl -ne 'print $$1 if m{^Version:\s*(?:[0-9]*:)?([\d\.]+)(?:[+\w]*)(?:-.*)\Z}')
$(info VER=$(VER))
# parallel build by default on linux
@@ -48,6 +47,8 @@ override_dh_auto_install:
dh_auto_install --parallel
override_dh_link:
+ test -e debian/$(PKG)/usr/games/fs2_open_$(VER)
+ test -e debian/$(PKG)/usr/games/fs2_open_$(VER)_DEBUG
dh_link \
/usr/games/fs2_open_$(VER) /usr/games/fs2_open \
/usr/games/fs2_open_$(VER)_DEBUG /usr/games/fs2_open_DEBUG \
--
2.11.0