Modernize 'licensecheck' target
authorIOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org>
Wed, 30 Nov 2022 12:53:00 +0000 (13:53 +0100)
committerIOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org>
Wed, 30 Nov 2022 12:53:00 +0000 (13:53 +0100)
debian/rules

index e0b6766a234e96b96399eadb5dc30b69b3702bb3..c4baea0e64274b62d0fde4d6c5b0718a09ffdf80 100755 (executable)
@@ -16,13 +16,6 @@ include /usr/share/dpkg/architecture.mk
 
 DEBIAN_BUILD_ARTIFACTS = debian/artifacts
 
-DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
-       \.pc/.*|\.git/.*|debian/.*|.*\.gif|.*\.jpg|.*\.JPG|.*\.png|.*\.ico|.*\.icns|.*\.wav|.*\.caf|.*\.ogg|.*\.mp3|.*\.pdf|.*\.keystore|.*\.nib|.*/gradle-wrapper\.jar|.*\.zip
-
-
-#DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
-#^((.*\.jpg)|(.*\.JPG)|(.*\.gif)|(.*\.png)|(.*\.ico)|(.*\.icns)|(gradle-wrapper\.jar)|(.*\.mp3)|(.*\.caf)|(.*\.nib)|examples/InAppPurchase/Signing/InAppPurchase\.keystore|examples/(InAppPurchase/BinaryData/(Robot|Ed|Jules|JB|Fabian|Lukasz)[012]\.ogg|AUv3Synth|PlugInSamples/MultiOutSynth)/Source/BinaryData/singing\.ogg|examples/Demo/Resources/cello\.wav|examples/Demo/Resources/icons\.zip|modules/juce_audio_plugin_client/RTAS/juce_RTAS_WinResources\.rsr|examples/ComponentTutorialExample/Introduction to Components - Part 1\.pdf|debian/(changelog|copyright(|_hints|_newhints)))$
-
 # JUCE uses some c++11 features requiring atomic_store_8 and
 # atomic_load_8, so we need to link with libatomic on
 # armel, powerpc, powerpcspe, m68k, mips, mipsel, sh4, ...
@@ -106,3 +99,19 @@ licensecheck:
                > debian/copyright_newhints
        cmp debian/copyright_hints debian/copyright_newhints \
                && rm debian/copyright_newhints
+
+
+#DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
+#^((.*\.jpg)|(.*\.JPG)|(.*\.gif)|(.*\.png)|(.*\.ico)|(.*\.icns)|(gradle-wrapper\.jar)|(.*\.mp3)|(.*\.caf)|(.*\.nib)|examples/InAppPurchase/Signing/InAppPurchase\.keystore|examples/(InAppPurchase/BinaryData/(Robot|Ed|Jules|JB|Fabian|Lukasz)[012]\.ogg|AUv3Synth|PlugInSamples/MultiOutSynth)/Source/BinaryData/singing\.ogg|examples/Demo/Resources/cello\.wav|examples/Demo/Resources/icons\.zip|modules/juce_audio_plugin_client/RTAS/juce_RTAS_WinResources\.rsr|examples/ComponentTutorialExample/Introduction to Components - Part 1\.pdf|debian/(changelog|copyright(|_hints|_newhints)))$
+
+DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
+       debian/.*|.*\.gif|.*\.jpg|.*\.JPG|.*\.png|.*\.ico|.*\.icns|.*\.wav|.*\.caf|.*\.ogg|.*\.mp3|.*\.pdf|.*\.keystore|.*\.nib|.*/gradle-wrapper\.jar|.*\.zip
+# licensecheck v1
+.PHONY: licensecheck
+licensecheck:
+       licensecheck \
+               -i "^($(DEB_COPYRIGHT_CHECK_IGNORE_REGEX))$$" \
+               --check '.*' --recursive --deb-machine --lines 0 * \
+               > debian/copyright_newhints
+       cmp debian/copyright_hints debian/copyright_newhints \
+               && rm debian/copyright_newhints