[libdevel-nytprof-perl] 05/08: Add repackaging framework to get rid of minified jQuery files.

gregor herrmann gregoa at debian.org
Mon Jun 2 19:50:51 UTC 2014


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libdevel-nytprof-perl.

commit 792b56e2ea1280514818aaca4e2d3d2deddf1b5a
Author: gregor herrmann <gregoa at debian.org>
Date:   Mon Jun 2 21:35:46 2014 +0200

    Add repackaging framework to get rid of minified jQuery files.
---
 debian/copyright    | 37 +++-------------------
 debian/repack.local |  3 ++
 debian/repack.stub  | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 debian/watch        |  6 +++-
 4 files changed, 104 insertions(+), 33 deletions(-)

diff --git a/debian/copyright b/debian/copyright
index fe8138f..1c73bc7 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,6 +2,7 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: Devel-NYTProf
 Upstream-Contact: Adam Kaplan <akaplan at cpan.org>, Tim Bunce <timb at cpan.org>
 Source: https://metacpan.org/release/Devel-NYTProf
+Comment: repackaged to remove minified jQuery files.
 
 Files: *
 Copyright: 2008-2012, Tim Bunce <timb at cpan.org>
@@ -15,10 +16,6 @@ Copyright: 2004-2009, Marcus Holland-Moritz <mhx-cpan at gmx.net>
  1999, Kenneth Albanowski <kjahds at kjahds.com> (Version 1.x)
 License: Artistic or GPL-1+
 
-Files: lib/Devel/NYTProf/js/jquery-min.js
-Copyright: 2008, John Resig (jquery.com)
-License: MIT or GPL-2
-
 Files: lib/Devel/NYTProf/js/jit/jit.js
 Copyright: 2008-2009, Nicolas Garcia Belmonte
 License: BSD-3
@@ -71,6 +68,10 @@ Copyright: 2008-2013, gregor herrmann <gregoa at debian.org>
  2010, Nicholas Bamber <nicholas at periapt.co.uk>
 License: Artistic or GPL-1+
 
+Files: debian/repack.stub
+Copyright: 2009, Ryan Niebur <ryan at debian.org>
+License: Artistic or 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.
@@ -87,34 +88,6 @@ License: GPL-1+
  On Debian systems, the complete text of the GNU General
  Public License can be found in `/usr/share/common-licenses/GPL-1'
 
-License: GPL-2
- 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; version 2.
- .
- On Debian systems, the complete text of the GNU General Public
- License, version 2 can be found in `/usr/share/common-licenses/GPL-2'
-
-License: MIT
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
- .
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
- .  
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
 License: CDDL
  COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
  .
diff --git a/debian/repack.local b/debian/repack.local
new file mode 100644
index 0000000..53cb4d9
--- /dev/null
+++ b/debian/repack.local
@@ -0,0 +1,3 @@
+MANIFEST=1
+rm lib/Devel/NYTProf/js/jquery-min.js
+rm lib/Devel/NYTProf/js/jquery-tablesorter-min.js
diff --git a/debian/repack.stub b/debian/repack.stub
new file mode 100755
index 0000000..7e36f5f
--- /dev/null
+++ b/debian/repack.stub
@@ -0,0 +1,91 @@
+#!/bin/sh
+
+: <<=cut
+=pod
+
+=head1 NAME
+
+repack.stub - script to repack upstream tarballs from uscan
+
+=head1 INSTRUCTIONS
+
+put this in debian/repack.stub and add "debian sh debian/repack.stub" to
+the end of the line in debian/watch. you will also need to add a version
+mangle to debian/watch.
+
+then create a debian/repack.local. this is a shell script that is
+sourced under "set -e", so be careful to check returns codes.
+
+=head1 FUNCTIONS
+
+=over 4
+
+=item rm
+
+rm is replaced by a function that does some magic ("rm -rv" by default), but also changes MANIFEST if $MANIFEST is 1
+
+=item mv
+
+mv is replaced by a function that just does mv (by default), but also changes MANIFEST if $MANIFEST is 1
+
+=item requires_version
+
+requires_version is there for future usage for requiring certain versions of the script
+
+=back
+
+=head1 VARIABLES
+
+=over 4
+
+=item SUFFIX
+
+defaults to +dfsg
+
+what to append to the upstream version
+
+=item RM_OPTS
+
+defaults to -vrf
+
+options to pass to rm
+
+=item MANIFEST
+
+defaults to 0, set to 1 to turn on.
+
+this will manipulate MANIFEST files in CPAN tarballs.
+
+=item UP_BASE
+
+this is the directory where the upstream source is.
+
+=back
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2009, Ryan Niebur <ryan at debian.org>
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
+if [ -z "$REPACK_SH" ]; then
+    if [ -x /usr/share/pkg-perl-tools/repack.sh ]; then
+        REPACK_SH='/usr/share/pkg-perl-tools/repack.sh'
+    elif [ -f ../../scripts/repack.sh ]; then
+        REPACK_SH=../../scripts/repack.sh
+    fi
+    if [ -z "$REPACK_SH" ] && which repack.sh > /dev/null; then
+        REPACK_SH=$(which repack.sh)
+    fi
+fi
+
+if [ ! -f "$REPACK_SH" ]; then
+    echo "Couldn't find a repack.sh. please put it in your PATH, put it at ../../scripts/repack.sh, or put it somewhere else and set the REPACK_SH variable"
+    echo "You can get it from http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/pkg-perl-tools.git;a=blob_plain;f=scripts/repack.sh;hb=HEAD"
+    exit 1
+fi
+
+exec "$REPACK_SH" "$@"
diff --git a/debian/watch b/debian/watch
index 23b3e96..e7773c2 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,6 @@
 version=3
-https://metacpan.org/release/Devel-NYTProf   .*/Devel-NYTProf-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$
+opts=dversionmangle=s/\+dfsg$// \
+	https://metacpan.org/release/Devel-NYTProf   .*/Devel-NYTProf-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ \
+	debian sh debian/repack.stub
+
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdevel-nytprof-perl.git



More information about the Pkg-perl-cvs-commits mailing list