[SCM] calf/master: Modernize copyright-check CDBS hints.

js at users.alioth.debian.org js at users.alioth.debian.org
Sat Jun 18 10:26:05 UTC 2016


The following commit has been merged in the master branch:
commit bf5e93a9fb2bdcbe4301ab602275f8b9ea9493ba
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Sat Jun 18 11:43:25 2016 +0200

    Modernize copyright-check CDBS hints.

diff --git a/debian/print-metadata.pl b/debian/print-metadata.pl
deleted file mode 100644
index 7bd3ba0..0000000
--- a/debian/print-metadata.pl
+++ /dev/null
@@ -1,67 +0,0 @@
-#! /usr/bin/perl
-
-# Copyright © 2014 Jonas Smedegaard <dr at jones.dk>
-# Description: Extract copyright/licensing metadata from binary files
-#
-# 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/>.
-
-use strict;
-use warnings;
-use IPC::System::Simple;
-use autodie qw(:all);
-use feature 'say';
-use Regexp::Assemble;
-use Image::ExifTool qw(:Public);
-
-BEGIN { $Image::ExifTool::configFile = '' }
-
-my $exifTool = new Image::ExifTool;
-
-my $dispatch = {
-	'.*\.(png|jpg|jpeg|gif|icc)' => sub {
-		my ( $infile, $outfile ) = @_;
-		my $info = $exifTool->ImageInfo($infile, '*Name*', '*Copyright*');
-		open(my $fh, ">>", $outfile);
-		foreach (sort keys %$info) {
-#			print $fh "$_: $$info{$_}\n";
-			my $tagdesc = $exifTool->GetDescription($_);
-			print $fh "$tagdesc: $$info{$_}\n";
-		}
-	},
-	'.*\.(ttf|otf)' => sub {
-		my ( $infile, $outfile ) = @_;
-		system 'sh', '-c',
-			"otfinfo -i '$infile' | egrep 'Copyright|Licens' > '$outfile'";
-	},
-};
-
-my $re = Regexp::Assemble->new( track => 1 )->add( keys %$dispatch );
-
-while( <> ) {
-	chomp;
-	if( $re->match($_) ) {
-		my $infile = $re->mvar(0);
-		my $outfile = "$infile.metadata_dump";
-		if ( -e $outfile ) {
-			say STDERR "ERROR: dumpfile exist: $outfile";
-			say STDERR "       remove or put aside and try again";
-			exit 1;
-		}
-		$dispatch->{ $re->matched }( $infile, $outfile );
-	}
-	else {
-		last if /q/;
-		print "\tignored\n";
-	}
-}
diff --git a/debian/rules b/debian/rules
index 36502ce..a169938 100755
--- a/debian/rules
+++ b/debian/rules
@@ -42,23 +42,7 @@ deps +=, libtool
 
 CDBS_BUILD_DEPENDS +=, $(deps)
 
-# extract metadata from images before copyright check
-CDBS_BUILD_DEPENDS +=, libimage-exiftool-perl, libregexp-assemble-perl
-CDBS_BUILD_DEPENDS +=, libipc-system-simple-perl, lcdf-typetools
-local_inspection_regex = png|jpg
-DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^((.*/)?[^/]+\.($(local_inspection_regex))|debian/(changelog|copyright(|_hints|_newhints)))$$
-debian/stamp-copyright-check: debian/stamp-extract-copyright
-debian/stamp-extract-copyright:
-	find * -type f -regextype posix-extended \
-		-regex '.*\.($(local_inspection_regex))' \
-		-print0 | perl -0 debian/print-metadata.pl
-	touch $@
-pre-build:: clean-extracted-copyright-during-build
-clean-extracted-copyright-during-build: debian/stamp-copyright-check
-	find -type f -name '*.metadata_dump' -delete
-clean::
-	find -type f -name '*.metadata_dump' -delete
-	rm -f debian/stamp-extract-copyright
+DEB_COPYRIGHT_EXTRACT_EXTS = png jpg
 
 # put aside upstream-shipped temp files during build but after copyright-check
 DEB_UPSTREAM_CRUFT_MOVE = calf.desktop configure INSTALL \

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list