--- libhtml-lint-perl-2.06+dfsg.orig/debian/control +++ libhtml-lint-perl-2.06+dfsg/debian/control @@ -0,0 +1,39 @@ +Source: libhtml-lint-perl +Section: perl +Priority: optional +Build-Depends: cdbs (>= 0.4.39), debhelper (>=7) +Build-Depends-Indep: devscripts (>= 2.10.7), perl (>= 5.6.0-16), libhtml-parser-perl (>= 3.20), libhtml-tagset-perl (>= 3.03), libtest-pod-perl (>= 0.95), libtest-pod-coverage-perl (>= 1.04), txt2man, dh-buildinfo +Maintainer: Debian Perl Group +Uploaders: Jonas Smedegaard , Antonio Radici +Standards-Version: 3.8.1 +Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libhtml-lint-perl/ +Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libhtml-lint-perl/ +Homepage: http://search.cpan.org/dist/HTML-Lint/ + +Package: libhtml-lint-perl +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends}, libhtml-parser-perl (>= 3.20), libhtml-tagset-perl (>= 3.03) +Suggests: weblint-perl +Description: checker of HTML errors in strings or files + HTML::Lint is a pure-Perl HTML parser and checker for syntactic legitmacy. + . + The "weblint" script - provided in the separate package "weblint-perl" - + is a wrapper around the HTML::Lint. + . + You can also look into Apache::Lint which is a mod_perl wrapper around + HTML::Lint. + . + Finally, for those of you doing automated testing with Test::More and + its brethren, Test::HTML::Lint lets you automate HTML checking. + +Package: weblint-perl +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends}, libhtml-lint-perl +Conflicts: weblint +Provides: weblint +Description: syntax and minimal style checker for HTML + weblint is a perl script which picks fluff off html pages, much in the same + way traditional lint picks fluff off C programs. + . + The script is a complete rewrite of Neil Bowers' original weblint script. + It currently supports HTML 4.0 (and only HTML 4.0). --- libhtml-lint-perl-2.06+dfsg.orig/debian/repack.sh +++ libhtml-lint-perl-2.06+dfsg/debian/repack.sh @@ -0,0 +1,49 @@ +#!/bin/sh +# Repackage upstream source to exclude non-distributable files +# should be called as "repack.sh --upstream-source +# (for example, via uscan) + +set -e +set -u + +VER="$2" +FILE="$3" +PKG=`dpkg-parsechangelog|grep ^Source:|sed 's/^Source: //'` + +REPACK_DIR="$PKG-$VER.orig" # DevRef § 6.7.8.2 + +echo -e "\nRepackaging $FILE\n" + +REPACKED_ORIG=`echo $FILE | sed 's/\.orig\./+dfsg.1.orig./'` + +DIR=`mktemp -d ./tmpRepackXXXXXX` +trap "rm -rf \"$DIR\"" QUIT INT EXIT + +# Create an extra directory to cope with rootless tarballs +UP_BASE="$DIR/unpack" +mkdir "$UP_BASE" +tar xzf "$FILE" -C "$UP_BASE" + +if [ `ls -1 "$UP_BASE" | wc -l` -eq 1 ]; then + # Tarball does contain a root directory + UP_BASE="$UP_BASE/`ls -1 "$UP_BASE"`" +fi + +## Remove stuff + +# remove this test, it contains an embedded webpage which cannot +# be redistributed +rm $UP_BASE/t/embed-extensions.t + +# and drop the reference to it from the MANIFEST +sed -i '\,t/embed-extensions.t, D' $UP_BASE/MANIFEST + +mv "$UP_BASE" "$DIR/$REPACK_DIR" + +# Using a pipe hides tar errors! +tar cfC "$DIR/repacked.tar" "$DIR" "$REPACK_DIR" +gzip -9 -n < "$DIR/repacked.tar" > "$DIR/repacked.tar.gz" + +mv "$DIR/repacked.tar.gz" "$REPACKED_ORIG" + +echo "*** $REPACKED_ORIG ready" --- libhtml-lint-perl-2.06+dfsg.orig/debian/README.cdbs-tweaks +++ libhtml-lint-perl-2.06+dfsg/debian/README.cdbs-tweaks @@ -0,0 +1,111 @@ +CDBS tweak +========== + +CDBS is great. In some corner cases, however, some parts of CDBS +sometimes needs a few tweaks to work optimally. + +This is a collection of such tweaks. The goal is for these tweaks to be +absorbed into upstream CDBS. We just haven't found time yet to discuss +them at the CDBS developers' mailinglist. And possible we do not all +agree that the tweaks are so great - therefore this "staging area". + +If you found this file below debian/ subdir in a source package, most +probably only a subset of the below mentioned tweaks are relevant and +have been shipped with the package. The repository of all these tweaks +is here: svn://svn.debian.org/build-common/people/js/overlay/ + +Web access: http://svn.debian.org/wsvn/build-common/people/js/overlay/ + + + +New buildinfo rule +------------------ + +See package description for "buildinfo" for more info. + + + +Improved support for multiple compilations +------------------------------------------ + +Create and clean builddir _after_ resolving per-package DEB_BUILDDIR. + +Honour per-package DEB_BUILDDIR in makefile and autotools classes. + +Support multiple build flavors in makefile and autotools classes. + + + +Various improvements to python-distutils class +---------------------------------------------- + +Use full path to Python interpreter (Python Policy section 1.3.2). + +Add CDBS_BUILD_DEPENDS to old policy method. + +Fix CDBS_BUILD_DEPENDS in new policy methods to only depend on debhelper +when actually used. + +Fix DEB_PYTHON_SIMPLE_PACKAGES sometimes installed twice (and only one +of them honouring DEB_PYTHON_COMPILE_VERSION). + +Unify install path using new DEB_PYTHON_DESTDIR. + +Quote install path. + + + +New python-autotools class +-------------------------- + +Handle autotools-based Python packaging. + + + +New python-sugar class +---------------------- + +Handle packaging of Sugar activities. + + + +New copyright-check rule +------------------------ + +Refuse to build if the source is found to contain different copyright +info than earlier builds. + + + +New kernelpatches rule +---------------------- + +Small wrapper around dh-kpatches, taking care of build-dependencies too. + + + +New routines for handling upstream tarball +------------------------------------------ + +Rules and variables to help downloading, validating and repackaging +upstream tarball. + +Implements the rules print-version and get-orig-source commonly used +for group-maintained packages with Debian-specific patches maintained in +SVN or some other VCS, and automated fetching virgin upstream tarball +(possibly massaged after download e.g. to strip non-DFSG material). + + + +Support for custom BTS info +--------------------------- + +Include BTS control info found in debian/*.bts files, or alternatively +redirect bug reports to the email address defined in DEB_BTS_EMAIL. + + + +New dict class +-------------- + +Rules for packaging ispell, aspell, myspell and wordlist dictionaries. --- libhtml-lint-perl-2.06+dfsg.orig/debian/rules +++ libhtml-lint-perl-2.06+dfsg/debian/rules @@ -0,0 +1,39 @@ +#!/usr/bin/make -f +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2003-2008 Jonas Smedegaard + +# See debian/README.cdbs-tweaks for info on local overrides +include debian/cdbs/1/rules/upstream-tarball.mk +include debian/cdbs/1/rules/copyright-check.mk +include debian/cdbs/1/rules/buildinfo.mk +include /usr/share/cdbs/1/rules/debhelper.mk +# Put perlmodule.mk after debhelper.mk to dh_clean temp files not in MANIFEST +include /usr/share/cdbs/1/class/perlmodule.mk + +DEB_UPSTREAM_PACKAGE = HTML-Lint +DEB_UPSTREAM_URL = http://www.cpan.org/modules/by-module/HTML +DEB_UPSTREAM_TARBALL_MD5 = 13e14932f7b63db5e5dc54f608148c34 + +DEB_INSTALL_MANPAGES_weblint-perl := debian/weblint.1 + +common-build-indep:: + txt2man -p debian/weblint.txt > debian/weblint.1 + +common-binary-post-install-indep:: + mv debian/libhtml-lint-perl/usr/bin debian/weblint-perl/usr + +clean:: + rm -f debian/weblint.1 + +# Needed both by upstream build process and at runtime +#TODO: Automatically include these to debian/control Depends: line +dependencies = libhtml-parser-perl (>= 3.20), libhtml-tagset-perl (>= 3.03) + +# Needed by upstream build process +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), $(dependencies), libtest-pod-perl (>= 0.95), libtest-pod-coverage-perl (>= 1.04) + +# Needed by pur packaging routines +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), txt2man + +# Fix double cdbs build-dependencies +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.39)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\)) *,* */, /g' -e 's/^ *, *//' -e 's/ *, *$$//') --- libhtml-lint-perl-2.06+dfsg.orig/debian/watch +++ libhtml-lint-perl-2.06+dfsg/debian/watch @@ -0,0 +1,6 @@ +# Run the "uscan" command to check for upstream updates and more. +version=3 +opts="dversionmangle=s/\+dfsg//" \ +http://search.cpan.org/dist/HTML-Lint/ \ +.*/HTML-Lint-v?(\d[\d.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ \ +debian sh debian/repack.sh --- libhtml-lint-perl-2.06+dfsg.orig/debian/changelog +++ libhtml-lint-perl-2.06+dfsg/debian/changelog @@ -0,0 +1,177 @@ +libhtml-lint-perl (2.06+dfsg-1) unstable; urgency=low + + [ Antonio Radici ] + * New upstream release + * debian/compat bumped to 7 + * debian/control: + + adding me to the Uploaders + + debhelper compatibility bumped to 7 + + Standards-Version to 3.8.1 + + moved all deps except debhelper and cdbs to B-D-I + + Homepage: s/::/-/ + + short description for libhtml-lint-perl is now a noun phrase + + short description for weblint-perl: s/A // + + long description for weblint-perl: s/This/weblint/ + * debian/copyright: + + switched to the new format + + added the copyright note for repack.sh + * debian/watch: + + removed "debian svn-upgrade" + + added repack.sh to remove a testfile which contains a webpage we + cannot redistribute + + [ gregor herrmann ] + * debian/watch: use dist-based URL. + * debian/control: Changed: Switched Vcs-Browser field to ViewSVN + (source stanza). + + [ Nathan Handler ] + * debian/watch: Update to ignore development releases. + + -- Antonio Radici Sun, 14 Jun 2009 20:28:10 +0100 + +libhtml-lint-perl (2.04-2) unstable; urgency=medium + + * Update tarball md5sum. + * Remove bogus noise from 2.04-1 changelog. + * Set urgency=medium as 2.04-1 included a FTBFS bugfix (similar to + bug#487066). + + -- Jonas Smedegaard Sat, 28 Jun 2008 20:10:55 +0200 + +libhtml-lint-perl (2.04-1) unstable; urgency=low + + * New upstream release. + * Update local cdbs tweaks: + + Various updates to copyright-check.mk, most importantly relaxing + to only warn by default. + + Drop wget options broken with recent versions of wget in + update-tarball.mk. + + Cosmetic updates to README.cdbs-tweaks. + * Update debian/copyright-hints. + * Bump debhelper compatibility level to 6. + * Semi-auto-update debian/control to update build-dependencies: + DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean + + -- Jonas Smedegaard Sat, 28 Jun 2008 19:22:37 +0200 + +libhtml-lint-perl (2.02-3) unstable; urgency=medium + + [ Jonas Smedegaard ] + * Separate build-only dependencies from build-and-runtime-dependencies in + debian/rules build-dependency resolving. + + [ gregor herrmann ] + * Add "-p" to txt2man invocation in debian/rules to get name, section, + etc. into the generated manpage; otherwise dh_installman errors out with + "Could not determine section for debian/weblint.1" (closes: #479921). + * Set urgency to medium because of the FTBFS bug. + + -- gregor herrmann Wed, 07 May 2008 19:17:21 +0200 + +libhtml-lint-perl (2.02-2) unstable; urgency=low + + * Pass over maintenance of the package to the Perl group: Change Maintainer, + and add myself to Uploaders. + * Change debian/watch to use svn-upgrade (not uupdate). + * Move Homepage to own field (from pseudo-field in long description). + * Add Vcs-* fields. + * Bump up standards-version to 3.7.3 (no changes needed). + * Bump dephelper compatibility level to 5. + * Fix build-depends-indep -> build-depends. + * Update local cdbs tweaks: + + Add new snippet update-tarball, implementing get-orig-source and more. + + Major improvements to copyright-check, including new versioned + build-dependency on devscripts. Update debian/copyright_hints. + + Drop auto-update.mk. Set DEB_AUTO_UPDATE_DEBIAN_CONTROL directly + instead when needed. + + Fix buildinfo.mk invoking dh-buildinfo only once. + + Add debian/README.cdbs-tweaks documenting local tweaks. + * Fix double cdbs build-dependencies in debian/rules. + * Semi-auto-update debian/control to apply changes contained in the above: + DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean + + -- Jonas Smedegaard Thu, 21 Feb 2008 03:57:42 +0100 + +libhtml-lint-perl (2.02-1) unstable; urgency=low + + * New upstream release. Closes: bug#338217 (thanks to Florian Ernst + ). + * Update local cdbs snippet buildinfo.mk to fix namespace. + * Add and enable new local cdbs snippets copyright-check.mk and + auto-update.mk. + * Semi-auto-update debian/control. + * Simplify debian/watch (qa.debian.org gets confused by multiple + parantheses). + * Build-depend on libtest-pod-coverage-perl to complete all tests. + + -- Jonas Smedegaard Thu, 16 Feb 2006 10:48:50 +0100 + +libhtml-lint-perl (2.0-1) unstable; urgency=low + + * New upstream release. Closes: bug#329555 (thanks to Florian Ragwitz + ). + * Improve watch file (bump up to version 3, allow more suffixes and + add comment hinting at its use). + * Use cdbs debian/rules auto-update when DEB_BUILD_OPTIONS contains + "update". + * Auto-update debian/rules (and strip bogus build-essential + dependency). + * Bump up standards-version to 3.6.2 (no changes needed). + + -- Jonas Smedegaard Thu, 22 Sep 2005 12:48:44 +0200 + +libhtml-lint-perl (1.30-1) unstable; urgency=low + + * New upstream release. + * Use local cdbs snippet for dh-buildinfo. + + -- Jonas Smedegaard Sat, 26 Mar 2005 07:16:39 +0100 + +libhtml-lint-perl (1.28-1) unstable; urgency=low + + * New upstream release. + * Update debian/copyright: + + Update copyright year to 2003 + + Cosmetic changes (syntactic sugar). + * Correct debian/watch. + * Build-depend on libtest-pod-perl to complete more tests (since + build-recommends is not supported...). + + -- Jonas Smedegaard Sun, 28 Mar 2004 18:16:25 +0200 + +libhtml-lint-perl (1.24-1) unstable; urgency=low + + * New upstream release. + * Fix watch file. + * Drop local cdbs hacks (they are included officially now). + * Wait moving files till they are actually installed (closes: + Bug#208377). + * Standards version 3.6.1 (no changes needed). + + -- Jonas Smedegaard Sat, 13 Sep 2003 15:50:49 +0200 + +libhtml-lint-perl (1.22-1) unstable; urgency=low + + * New upstream release. + * Switch to packaging using cdbs. + * Standards version 3.6.0 (no changes needed). + * Include (and build-depend on) dh_buildinfo. + * Fix debian/copyright to include URL to upstream source, and not + duplicate info in debian/changelog. + + -- Jonas Smedegaard Thu, 24 Jul 2003 16:04:04 +0200 + +libhtml-lint-perl (1.21-2) unstable; urgency=low + + * Build-depend (in addition to depend) on libhtml-parser-perl and + libhtml-tags-perl (closes: Bug#190777). + + -- Jonas Smedegaard Fri, 25 Apr 2003 22:19:18 +0200 + +libhtml-lint-perl (1.21-1) unstable; urgency=low + + * Initial Release. + * Have package weblint-perl replace and provide old weblint. + + -- Jonas Smedegaard Sun, 13 Apr 2003 17:44:22 +0200 --- libhtml-lint-perl-2.06+dfsg.orig/debian/copyright_hints +++ libhtml-lint-perl-2.06+dfsg/debian/copyright_hints @@ -0,0 +1,38 @@ +*No copyright* UNKNOWN []: Changes + MANIFEST + META.yml + Makefile.PL + README + bin/weblint + lib/HTML/Lint.pm + lib/HTML/Lint/Error.pm + lib/HTML/Lint/HTML4.pm + lib/Test/HTML/Lint.pm + t/00-load.t + t/01-coverage.t + t/02-versions.t + t/10-test-html-lint.t + t/11-test-html-lint-overload.t + t/20-error-types-export.t + t/20-error-types-skip.t + t/20-error-types.t + t/30-test-builder.t + t/40-where.t + t/50-multiple-files.t + t/LintTest.pl + t/attr-repeated.t + t/attr-unknown.t + t/doc-tag-required.t + t/elem-empty-but-closed.t + t/elem-img-alt-missing.t + t/elem-img-sizes-missing.t + t/elem-nonrepeatable.t + t/elem-unclosed.t + t/elem-unknown.t + t/elem-unopened.t + t/embed-extensions.t + t/pod-coverage.t + t/pod.t + t/random-nobr.t + t/text-use-entity.t + t/xhtml-html.t --- libhtml-lint-perl-2.06+dfsg.orig/debian/compat +++ libhtml-lint-perl-2.06+dfsg/debian/compat @@ -0,0 +1 @@ +7 --- libhtml-lint-perl-2.06+dfsg.orig/debian/control.in +++ libhtml-lint-perl-2.06+dfsg/debian/control.in @@ -0,0 +1,38 @@ +Source: libhtml-lint-perl +Section: perl +Priority: optional +Build-Depends: @cdbs@ +Maintainer: Debian Perl Group +Uploaders: Jonas Smedegaard +Standards-Version: 3.7.3 +Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libhtml-lint-perl/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-lint-perl/ +Homepage: http://search.cpan.org/dist/HTML::Lint/ + +Package: libhtml-lint-perl +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends}, libhtml-parser-perl (>= 3.20), libhtml-tagset-perl (>= 3.03) +Suggests: weblint-perl +Description: Check for HTML errors in a string or file + HTML::Lint is a pure-Perl HTML parser and checker for syntactic legitmacy. + . + The "weblint" script - provided in the separate package "weblint-perl" - + is a wrapper around the HTML::Lint. + . + You can also look into Apache::Lint which is a mod_perl wrapper around + HTML::Lint. + . + Finally, for those of you doing automated testing with Test::More and + its brethren, Test::HTML::Lint lets you automate HTML checking. + +Package: weblint-perl +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends}, libhtml-lint-perl +Conflicts: weblint +Provides: weblint +Description: A syntax and minimal style checker for HTML + This is a perl script which picks fluff off html pages, much in the same + way traditional lint picks fluff off C programs. + . + The script is a complete rewrite of Neil Bowers' original weblint script. + It currently supports HTML 4.0 (and only HTML 4.0). --- libhtml-lint-perl-2.06+dfsg.orig/debian/weblint.txt +++ libhtml-lint-perl-2.06+dfsg/debian/weblint.txt @@ -0,0 +1,27 @@ +NAME + weblint - pick fluff off web pages (HTML) + +SYNOPSIS + weblint [option...] ... + +DESCRIPTION + weblint is a Perl script which picks fluff off HTML pages. + + Files and URLs to be checked are passed on the command-line. + +OPTIONS + --help This message + --context[=n] Show the offending line (and n surrounding lines) + + Error types: (default: all on) + --[no]structure Structural issues, like unclosed tag pairs + --[no]helper Helper issues, like missing HEIGHT & WIDTH + --[no]fluff Fluff that can be removed, like bad tag attributes + --only Turns off all other error types, as in --only --fluff + +EXAMPLE + % weblint foobar.html ./dodgy-files/ index.html http://example.com/ + +AUTHOR + This basic manpage was written by Jonas Smedegaard + for Debian GNU systems, but may be freely used elsewhere. --- libhtml-lint-perl-2.06+dfsg.orig/debian/copyright +++ libhtml-lint-perl-2.06+dfsg/debian/copyright @@ -0,0 +1,43 @@ +Format-Specification: + http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 +Upstream-Maintainer: Andy Lester +Upstream-Source: http://search.cpan.org/dist/HTML-Lint/ +Upstream-Name: HTML-Lint + +X-Repackaging-Reasoning: + Upstream sources are repackaged to remove a file which contains a webpage + that cannot be redistributed + + t/embed-extensions.t + Additionally, MANIFEST is trimmed from references to this file. + . + Repackaging is done via debian/repack.sh and can be replayed using "uscan -f" + + +Files: * +Copyright: 2003, Andy Lester +License-Alias: Perl +License: Artistic | GPL-1+ + +Files: debian/* +Copyright: + (c) 2003-2008, Jonas Smedegaard + (c) 2009, Antonio Radici +License: Artistic | GPL-1+ + +Files: debian/repack.sh +Copyright: 2008, Damyan Ivanov +License: Artistic | GPL-1+ + +License: Artistic + This program is free software; you can redistribute it and/or modify + it under the terms of the Artistic License, which comes with Perl. + On Debian GNU/Linux systems, the complete text of the Artistic License + can be found in `/usr/share/common-licenses/Artistic' + +License: GPL-1+ + 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 1, or (at your option) + any later version. + On Debian GNU/Linux systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL' --- libhtml-lint-perl-2.06+dfsg.orig/debian/cdbs/1/rules/copyright-check.mk +++ libhtml-lint-perl-2.06+dfsg/debian/cdbs/1/rules/copyright-check.mk @@ -0,0 +1,97 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2005-2008 Jonas Smedegaard +# Description: Check for changes to copyright notices in source +# +# 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 2, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_copyright-check +_cdbs_rules_copyright-check := 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), devscripts (>= 2.10.7) + +# Set to yes to fail on changed/new hints are found +#DEB_COPYRIGHT_CHECK_STRICT := yes + +# Single regular expression for files to include or ignore +DEB_COPYRIGHT_CHECK_REGEX = .* +DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(debian/.*|(.*/)?config\.(guess|sub|rpath)(\..*)?)$ + +pre-build:: debian/stamp-copyright-check + +debian/stamp-copyright-check: + @echo 'Scanning upstream source for new/changed copyright notices (except debian subdir!)...' + +# Perl in shell in make requires extra care: +# * Single-quoting ('...') protects against shell expansion +# * Double-dollar ($$) expands to plain dollar ($) in make + licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \ + | LC_ALL=C perl -e \ + '$$n=0; while (<>) {'\ + ' s/[^[:print:]]//g;'\ + ' if (/^([^:\s][^:]+):[\s]+(\S.*?)\s*$$/) {'\ + ' $$files[$$n]{name}=$$1;'\ + ' $$files[$$n]{license}=$$2;'\ + ' };'\ + ' if (/^\s*\[Copyright:\s*(\S.*?)\s*\]/) {'\ + ' $$files[$$n]{copyright}=$$1;'\ + ' };'\ + ' /^$$/ and $$n++;'\ + '};'\ + 'foreach $$file (@files) {'\ + ' $$file->{license} =~ s/\s*\(with incorrect FSF address\)//;'\ + ' $$file->{license} =~ s/\s+\(v([^)]+) or later\)/-$$1+/;'\ + ' $$file->{copyright} =~ s/(?<=(\b\d{4}))(?{$$y=$$^N})\s*[,-]\s*((??{$$y+1}))\b/-$$2/g;'\ + ' $$file->{copyright} =~ s/(?<=\b\d{4})\s*-\s*\d{4}(?=\s*-\s*(\d{4})\b)//g;'\ + ' $$pattern = "$$file->{license} [$$file->{copyright}]";'\ + ' push @{ $$patternfiles{"$$pattern"} }, $$file->{name};'\ + '};'\ + 'foreach $$pattern ( sort {'\ + ' @{$$patternfiles{$$b}} <=> @{$$patternfiles{$$a}}'\ + ' ||'\ + ' $$a cmp $$b'\ + ' } keys %patternfiles ) {'\ + ' print "$$pattern: ", join("\n\t", sort @{ $$patternfiles{$$pattern} }), "\n";'\ + '};'\ + > debian/copyright_newhints + @patterncount="`cat debian/copyright_newhints | sed 's/^[^:]*://' | LANG=C sort -u | grep . -c -`"; \ + echo "Found $$patterncount different copyright and licensing combinations." + @if [ ! -f debian/copyright_hints ]; then touch debian/copyright_hints; fi + @newstrings=`diff -u debian/copyright_hints debian/copyright_newhints | sed '1,2d' | egrep '^\+' - | sed 's/^\+//'`; \ + if [ -n "$$newstrings" ]; then \ + echo "$(if $(DEB_COPYRIGHT_CHECK_STRICT),ERROR,WARNING): The following new or changed copyright notices discovered:"; \ + echo; \ + echo "$$newstrings"; \ + echo; \ + echo "To fix the situation please do the following:"; \ + echo " 1) Investigate the above changes and update debian/copyright as needed"; \ + echo " 2) Replace debian/copyright_hints with debian/copyright_newhints"; \ + $(if $(DEB_COPYRIGHT_CHECK_STRICT),exit 1,:); \ + else \ + echo 'No new copyright notices found - assuming no news is good news...'; \ + rm -f debian/copyright_newhints; \ + fi + touch $@ + +clean:: + rm -f debian/stamp-copyright-check + +endif --- libhtml-lint-perl-2.06+dfsg.orig/debian/cdbs/1/rules/buildinfo.mk +++ libhtml-lint-perl-2.06+dfsg/debian/cdbs/1/rules/buildinfo.mk @@ -0,0 +1,40 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2004-2006 Jonas Smedegaard +# Description: Generate and include build information +# +# 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 2, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_buildinfo +_cdbs_rules_buildinfo = 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), dh-buildinfo + +common-install-arch common-install-indep:: debian/stamp-buildinfo + +debian/stamp-buildinfo: + dh_buildinfo + touch debian/stamp-buildinfo + +clean:: + rm -f debian/stamp-buildinfo + +endif --- libhtml-lint-perl-2.06+dfsg.orig/debian/cdbs/1/rules/upstream-tarball.mk +++ libhtml-lint-perl-2.06+dfsg/debian/cdbs/1/rules/upstream-tarball.mk @@ -0,0 +1,139 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2007-2008 Jonas Smedegaard +# Description: Convenience rules for dealing with upstream tarballs +# +# 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 2, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_upstream_tarball +_cdbs_rules_upstream_tarball := 1 + +include $(_cdbs_rules_path)/buildvars.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), cdbs (>= 0.4.39) + +# Prefix for upstream location of all upstream tarballs (mandatory!) +#DEB_UPSTREAM_URL = + +DEB_UPSTREAM_PACKAGE = $(DEB_SOURCE_PACKAGE) +DEB_UPSTREAM_TARBALL_VERSION = $(if $(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE)),$(DEB_UPSTREAM_VERSION:$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG)=),$(DEB_UPSTREAM_VERSION)) +DEB_UPSTREAM_TARBALL_EXTENSION = tar.gz +# Checksum to ensure integrity of downloadeds using get-orig-source (optional) +#DEB_UPSTREAM_TARBALL_MD5 = + +DEB_UPSTREAM_WORKDIR = ../tarballs + +# Perl regexp to change locally used string into that in upstream URL and srcdir +#DEB_UPSTREAM_TARBALL_VERSION_MANGLE +cdbs_upstream_tarball_version_mangled = $(if $(strip $(DEB_UPSTREAM_TARBALL_VERSION_MANGLE)),$(shell echo '$(DEB_UPSTREAM_TARBALL_VERSION)' | perl -pe '$(DEB_UPSTREAM_TARBALL_VERSION_MANGLE)'),$(DEB_UPSTREAM_TARBALL_VERSION)) + +# Base filename (without extension) as used in upstream URL +DEB_UPSTREAM_TARBALL_BASENAME = $(DEB_UPSTREAM_PACKAGE)-$(cdbs_upstream_tarball_version_mangled) + +# Base directory within tarball +DEB_UPSTREAM_TARBALL_SRCDIR = $(DEB_UPSTREAM_PACKAGE)-$(cdbs_upstream_tarball_version_mangled) + +# Space-delimited list of directories and files to strip (optional) +#DEB_UPSTREAM_REPACKAGE_EXCLUDE = CVS .cvsignore doc/rfc*.txt doc/draft*.txt +DEB_UPSTREAM_REPACKAGE_TAG = dfsg +DEB_UPSTREAM_REPACKAGE_DELIMITER = ~ + +cdbs_upstream_tarball = $(DEB_UPSTREAM_TARBALL_BASENAME).$(DEB_UPSTREAM_TARBALL_EXTENSION) +cdbs_upstream_local_tarball = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION).orig.$(if $(findstring $(DEB_UPSTREAM_TARBALL_EXTENSION),tgz),tar.gz,$(DEB_UPSTREAM_TARBALL_EXTENSION)) +cdbs_upstream_repackaged_basename = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION)$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG).orig +cdbs_upstream_uncompressed_tarball = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION).orig.tar + +# # These variables are deprecated +_cdbs_deprecated_vars += DEB_UPSTREAM_TARBALL DEB_UPSTREAM_LOCAL_TARBALL DEB_UPSTREAM_REPACKAGE_TARBALL +_cdbs_deprecated_vars += DEB_UPSTREAM_REPACKAGE_EXCLUDES +DEB_UPSTREAM_REPACKAGE_EXCLUDE += $(DEB_UPSTREAM_REPACKAGE_EXCLUDES) + +print-version: + @@echo "Debian version: $(DEB_VERSION)" + @@echo "Upstream version: $(DEB_UPSTREAM_TARBALL_VERSION)" + +get-orig-source: + @@dh_testdir + @@mkdir -p "$(DEB_UPSTREAM_WORKDIR)" + + @if [ ! -s "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ] ; then \ + if [ -f "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ] ; then \ + rm "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ; \ + fi ; \ + echo "Downloading $(cdbs_upstream_local_tarball) from $(DEB_UPSTREAM_URL)/$(cdbs_upstream_tarball) ..." ; \ + wget -nv -T10 -t3 -O "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" "$(DEB_UPSTREAM_URL)/$(cdbs_upstream_tarball)" ; \ + else \ + echo "Upstream source tarball have been already downloaded: $(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ; \ + fi + + @md5current=`md5sum "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" | sed -e 's/ .*//'`; \ + if [ -n "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \ + if [ "$$md5current" != "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \ + echo "Expecting upstream tarball md5sum $(DEB_UPSTREAM_TARBALL_MD5), but $$md5current found" ; \ + echo "Upstream tarball md5sum is NOT trusted! Possible upstream tarball forge!" ; \ + echo "Purging downloaded file. Try new download." ; \ + rm -f "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ; \ + false ; \ + else \ + echo "Upstream tarball is trusted!" ; \ + fi; \ + else \ + echo "Upstream tarball NOT trusted (current md5sum is $$md5current)!" ; \ + fi + +# TODO: Rewrite using make variables like cdbs_upstream_unpack_cmd and +# DEB_UPSTREAM_SUPPORTED_COMPRESSIONS (recent dpkg supports bz2) + @untar="tar -x -C"; \ + case "$(cdbs_upstream_local_tarball)" in \ + *.tar.gz) unpack="gunzip -c";; \ + *.tar.bz2) unpack="bunzip2 -c"; uncompress="bunzip2";; \ + *.tar.Z) unpack="uncompress -c"; uncompress="uncompress";; \ + *.zip) unpack="unzip -q"; uncompress="false"; untar="-d"; nopipe="true";; \ + *.tar) unpack="cat"; uncompress="true";; \ + *) echo "Unknown extension for upstream tarball $(cdbs_upstream_local_tarball)"; false;; \ + esac && \ + if [ -n "$(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE))" ] || [ "$$uncompress" = "false" ]; then \ + echo "Repackaging tarball ..." && \ + mkdir -p "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" && \ + if [ -n "$$nopipe" ]; then \ + $$unpack "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" \ + $$untar "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)); \ + else \ + $$unpack "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" \ + | $$untar "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)); \ + fi && \ + if [ "$(DEB_UPSTREAM_TARBALL_SRCDIR)" != "$(cdbs_upstream_repackaged_basename)" ]; then \ + mv -T "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)/$(DEB_UPSTREAM_TARBALL_SRCDIR)" "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)/$(cdbs_upstream_repackaged_basename)"; \ + fi && \ + if [ -n "$(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE))" ]; then \ + GZIP=-9 tar -b1 -czf "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_repackaged_basename).tar.gz" -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" "$(cdbs_upstream_repackaged_basename)"; \ + else \ + GZIP=-9 tar -b1 -czf "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_uncompressed_tarball).gz" -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" "$(cdbs_upstream_repackaged_basename)"; \ + fi && \ + echo "Cleaning up" && \ + rm -rf "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)"; \ + elif [ -n "$$uncompress" ]; then \ + echo "Recompressing tarball ..." && \ + $$uncompress "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)"; \ + gzip -9 "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_uncompressed_tarball)"; \ + fi + +DEB_PHONY_RULES += print-version get-orig-source + +endif