[SCM] ardour/master: Modernize cdbs: Do copyright-check in maintainer script (not during build).

js at users.alioth.debian.org js at users.alioth.debian.org
Mon Jul 31 06:25:59 UTC 2017


The following commit has been merged in the master branch:
commit c48460d12c633074a6aae6b572d0d805b3433667
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Mon Jul 31 02:10:16 2017 -0400

    Modernize cdbs: Do copyright-check in maintainer script (not during build).

diff --git a/debian/README.source b/debian/README.source
index 684ef50..2146866 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -48,6 +48,9 @@ You are of course free to *not* run the script, if you prefer.
 
 copyright_newhints
 ------------------
-run this command to generade copyright_newhints file:
-licensecheck --check '.*' --recursive --copyright --deb-fmt --ignore '^(waf|(icons|gtk2_ardour)/icons/.*\.png|tools/osx_packaging/.*\.png|gtk_ardour/.*splash\.png|doc/ardour_meter_colors\.png|doc/layering/.*\.png|icons/made_with/ardour_made\.png|debian/(changelog|copyright(|_hints|_newhints)))' --lines 0 * | /usr/lib/cdbs/licensecheck2dep5 > debian/copyright_newhints
 
+Run this command to regenerate copyright_newhints file:
+
+    debian/copyright-check
+
+ -- Jonas Smedegaard <dr at jones.dk>  Mon, 31 Jul 2017 02:09:45 -0400
diff --git a/debian/copyright-check b/debian/copyright-check
new file mode 100755
index 0000000..d3afb82
--- /dev/null
+++ b/debian/copyright-check
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Copyright © 2016-2017  Jonas Smedegaard <dr at jones.dk>
+# Description: helper script to update copyright_hints
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+set -eu
+
+# extract metadata from images and fonts before copyright check
+export DEB_COPYRIGHT_EXTRACT_EXTS="png ttf"
+export DEB_COPYTIGHT_CHECK_IGNORE_EXTS="icns wav"
+
+make -f /usr/share/cdbs/1/rules/utils.mk pre-build || true
+make -f /usr/share/cdbs/1/rules/utils.mk clean DEB_COPYRIGHT_CHECK_STRICT=1
+
+# unconditionally merge changes - safe to do with git-tracked package
+[ ! -f debian/copyright_newhints ] || mv -f debian/copyright_newhints debian/copyright_hints
diff --git a/debian/rules b/debian/rules
index 5335fa4..58469c9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,19 +17,12 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
 -include /usr/share/cdbs/1/rules/upstream-tarball.mk
--include /usr/share/cdbs/1/rules/utils.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/makefile.mk
 
 DEB_CLEAN_EXCLUDE=debian/tmp
 DEB_DESTDIR = $(CURDIR)/debian/tmp/
 
-# Uncomment to generate copyright_newhints file.
-#DEB_MAINTAINER_MODE=yes dpkg-buildpackage -rfakeroot -Tclean
-
-# ignore oddly packaged bzip2 archive to not upset dpkg
-DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(waf|(icons|gtk2_ardour)/icons/.*\.png|tools/osx_packaging/.*\.png|gtk_ardour/.*splash\.png|doc/ardour_meter_colors\.png|doc/layering/.*\.png|icons/made_with/ardour_made\.png|debian/(changelog|copyright(|_hints|_newhints)))$
-
 # Set tag to full 40 char git tag for git snapshot release
 tag = $(DEB_UPSTREAM_TARBALL_VERSION)
 DEB_UPSTREAM_URL = https://github.com/Ardour/ardour/archive

-- 
ardour Debian packaging



More information about the pkg-multimedia-commits mailing list