From 50f21ebccbd79c81f6af9681ee608d014fcefa8d Mon Sep 17 00:00:00 2001
From: Daniel Leidert <daniel.leidert@wgdd.de>
Date: Wed, 4 Mar 2020 19:02:48 +0100
Subject: [PATCH] Update packaging files, fix FTBFS, and add upstream metadata

  * d/control (Build-Depends): Add ruby-rspec (closes: #952022).
    (Depends): Require puppet >=5.
  * d/rules: Add override to install upstream CHANGELOG.md.
  * d/upstream/metadata: Add metadata.
---
 debian/changelog         | 4 ++++
 debian/control           | 8 +++-----
 debian/rules             | 3 +++
 debian/upstream/metadata | 9 +++++++++
 4 files changed, 19 insertions(+), 5 deletions(-)
 create mode 100644 debian/upstream/metadata

diff --git a/debian/changelog b/debian/changelog
index 3658474..9dfa66b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,10 @@
 ruby-puppet-syntax (2.6.1-2) UNRELEASED; urgency=medium
 
   * Team upload.
+  * d/control (Build-Depends): Add ruby-rspec (closes: #952022).
+    (Depends): Require puppet >=5.
+  * d/rules: Add override to install upstream CHANGELOG.md.
+  * d/upstream/metadata: Add metadata.
 
  -- Daniel Leidert <dleidert@debian.org>  Wed, 04 Mar 2020 18:54:53 +0100
 
diff --git a/debian/control b/debian/control
index 734fb45..792d8de 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,8 @@ Build-Depends: debhelper-compat (= 12),
                gem2deb (>= 1),
                puppet,
                rake,
-               ruby-rspec
+               ruby-rspec,
+               ruby-sync
 Standards-Version: 4.5.0
 Vcs-Git: https://salsa.debian.org/ruby-team/ruby-puppet-syntax.git
 Vcs-Browser: https://salsa.debian.org/ruby-team/ruby-puppet-syntax
@@ -21,10 +22,7 @@ Rules-Requires-Root: no
 Package: ruby-puppet-syntax
 Architecture: all
 XB-Ruby-Versions: ${ruby:Versions}
-Depends: puppet,
-         rake,
-         ${ruby:Depends},
-         ${misc:Depends},
+Depends: puppet (>= 5), rake, ${misc:Depends}, ${ruby:Depends}
 Description: Syntax checks for Puppet manifests, templates, and Hiera YAML
  Puppet lets you centrally manage every important aspect of your
  system using a cross-platform specification language that manages all
diff --git a/debian/rules b/debian/rules
index 2a2df20..b866c50 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,3 +5,6 @@ export GEM2DEB_TEST_RUNNER = --check-dependencies
 
 %:
 	dh $@ --buildsystem=ruby --with ruby
+
+override_dh_installchangelogs:
+	dh_installchangelogs CHANGELOG.md
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..3506084
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,9 @@
+---
+Archive: GitHub
+Bug-Database: https://github.com/voxpupuli/puppet-syntax/issues
+Bug-Submit: https://github.com/voxpupuli/puppet-syntax/issues
+Changelog: https://github.com/voxpupuli/puppet-syntax/tags
+Contact: https://github.com/voxpupuli/puppet-syntax/issues
+Name: puppet-syntax
+Repository: https://github.com/voxpupuli/puppet-syntax.git
+Repository-Browse: https://github.com/voxpupuli/puppet-syntax
-- 
GitLab