r12023 - in /trunk/image-size: debian/changelog debian/control debian/patches/ debian/patches/imgsize-fixes debian/patches/series debian/rules debian/watch imgsize

myon at users.alioth.debian.org myon at users.alioth.debian.org
Fri Jan 4 22:02:34 UTC 2008


Author: myon
Date: Fri Jan  4 22:02:34 2008
New Revision: 12023

URL: http://svn.debian.org/wsvn/?sc=1&rev=12023
Log:
* Moving the package to the Debian Perl Group.
* Quiltize source.
* Clean up control and rules.

Added:
    trunk/image-size/debian/patches/
    trunk/image-size/debian/patches/imgsize-fixes
    trunk/image-size/debian/patches/series
Modified:
    trunk/image-size/debian/changelog
    trunk/image-size/debian/control
    trunk/image-size/debian/rules
    trunk/image-size/debian/watch
    trunk/image-size/imgsize

Modified: trunk/image-size/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/image-size/debian/changelog?rev=12023&op=diff
==============================================================================
--- trunk/image-size/debian/changelog (original)
+++ trunk/image-size/debian/changelog Fri Jan  4 22:02:34 2008
@@ -1,3 +1,11 @@
+image-size (3.1-3) unstable; urgency=low
+
+  * Moving the package to the Debian Perl Group.
+  * Quiltize source.
+  * Clean up control and rules.
+
+ -- Christoph Berg <myon at debian.org>  Fri, 04 Jan 2008 23:01:33 +0100
+
 image-size (3.1-2) unstable; urgency=low
 
   * New upstream release.

Modified: trunk/image-size/debian/control
URL: http://svn.debian.org/wsvn/trunk/image-size/debian/control?rev=12023&op=diff
==============================================================================
--- trunk/image-size/debian/control (original)
+++ trunk/image-size/debian/control Fri Jan  4 22:02:34 2008
@@ -1,10 +1,14 @@
 Source: image-size
 Section: perl
 Priority: optional
-Maintainer: Christoph Berg <myon at debian.org>
-Standards-Version: 3.7.2
-Build-Depends: debhelper (>> 4.1)
-Build-Depends-Indep: perl (>> 5.6.1), libmodule-build-perl, libcompress-zlib-perl
+Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
+Uploaders: Christoph Berg <myon at debian.org>
+Standards-Version: 3.7.3
+Build-Depends: debhelper (>> 4.1), quilt
+Build-Depends-Indep: perl, libmodule-build-perl, libcompress-zlib-perl
+Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/image-size/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/image-size/
+Homepage: http://search.cpan.org/~rjray/Image-Size/
 
 Package: libimage-size-perl
 Architecture: all

Added: trunk/image-size/debian/patches/imgsize-fixes
URL: http://svn.debian.org/wsvn/trunk/image-size/debian/patches/imgsize-fixes?rev=12023&op=file
==============================================================================
--- trunk/image-size/debian/patches/imgsize-fixes (added)
+++ trunk/image-size/debian/patches/imgsize-fixes Fri Jan  4 22:02:34 2008
@@ -1,0 +1,79 @@
+--- image-size-3.1.orig/imgsize
++++ image-size-3.1/imgsize
+@@ -21,7 +21,7 @@
+ =head1 OPTIONS
+ 
+ By default, the width and height are returned as attributes for an IMG tag
+-in HTML, essentially "C<WIDTH=40 HEIGHT=30>". The following options may be
++in HTML, essentially C<width="40" height="30">. The following options may be
+ used to return alternate formats (all report width first, then height):
+ 
+ =over
+@@ -72,7 +72,7 @@
+     if ($opt_h || (! @ARGV) || (($opt_a && $opt_r) || ($opt_a && $opt_f) ||
+                                 ($opt_r && $opt_f)));
+ 
+-$rtn = \&html_imgsize;
++$rtn = \&return_html;
+ $opt_a &&
+     ($rtn = \&return_attr);
+ $opt_r &&
+@@ -80,11 +80,13 @@
+ $opt_f &&
+     ($rtn = \&return_fmt);
+ 
++my $error = 0;
++
+ if (@ARGV > 1)
+ {
+     foreach (@ARGV)
+     {
+-        print STDOUT sprintf("$_: %s\n", &$rtn($_));
++        print STDOUT sprintf("%s: %s\n", $_, &$rtn($_));
+     }
+ }
+ else
+@@ -92,7 +94,7 @@
+     print STDOUT sprintf("%s\n", &$rtn($ARGV[0]));
+ }
+ 
+-exit;
++exit $error;
+ 
+ #
+ # Note the doubled calls here. This is just a quick, semi-clean attempt at
+@@ -100,24 +102,31 @@
+ # the Image::Size package.
+ #
+ 
++sub return_html
++{
++    my ($html) = html_imgsize($_[0]);
++
++    (defined $html) ? $html : ($error = 1 and "error");
++}
++
+ sub return_attr
+ {
+     my ($width, $height, $err) = imgsize($_[0]);
+ 
+     (defined $width) ?
+-        "(-width => $width, -height => $height)" : "error: $err";
++        "(-width => $width, -height => $height)" : ($error = 1 and "error: $err");
+ }
+ 
+ sub return_imgsize
+ {
+     my ($width, $height, $err) = imgsize($_[0]);
+ 
+-    (defined $width) ? "$width $height" : "error: $err";
++    (defined $width) ? "$width $height" : ($error = 1 and "error: $err");
+ }
+ 
+ sub return_fmt
+ {
+     my ($width, $height, $err) = imgsize($_[0]);
+ 
+-    (defined $width) ? sprintf($opt_f, $width, $height, $err) : "error: $err";
++    (defined $width) ? sprintf($opt_f, $width, $height, $err) : ($error = 1 and "error: $err");
+ }

Added: trunk/image-size/debian/patches/series
URL: http://svn.debian.org/wsvn/trunk/image-size/debian/patches/series?rev=12023&op=file
==============================================================================
--- trunk/image-size/debian/patches/series (added)
+++ trunk/image-size/debian/patches/series Fri Jan  4 22:02:34 2008
@@ -1,0 +1,1 @@
+imgsize-fixes

Modified: trunk/image-size/debian/rules
URL: http://svn.debian.org/wsvn/trunk/image-size/debian/rules?rev=12023&op=diff
==============================================================================
--- trunk/image-size/debian/rules (original)
+++ trunk/image-size/debian/rules Fri Jan  4 22:02:34 2008
@@ -1,37 +1,40 @@
-#! /usr/bin/make -f
+#!/usr/bin/make -f
+
+include /usr/share/quilt/quilt.make
 
 PERL	?= /usr/bin/perl
 
 package	:= $(firstword $(shell dh_listpackages))
 TMP	:= $(CURDIR)/debian/$(package)/
 
-build: build-stamp
-build-stamp:
+build build-indep: build-stamp
+build-stamp: $(QUILT_STAMPFN)
 	dh_testdir
 	$(PERL) Makefile.PL installdirs=vendor destdir=$(TMP)
 	$(MAKE)
+	$(MAKE) test
 	touch $@
 
-clean:
+build-arch:
+
+clean: unpatch
 	dh_testdir
-	-$(MAKE) distclean
+	[ ! -f Makefile ] || $(MAKE) distclean
 	rm -f build-stamp Makefile
 	dh_clean
 
-binary-indep: build
+binary binary-indep: build
 	dh_testdir
 	dh_testroot
 	dh_clean
 	dh_installdirs
-
-	$(MAKE) test
-
+	
 	$(MAKE) install
-
+	
 	dh_installdocs README
 	dh_installchangelogs ChangeLog
 	dh_installexamples ex/*
-
+	
 	dh_compress
 	dh_fixperms
 	dh_perl
@@ -42,6 +45,4 @@
 
 binary-arch:
 
-binary: binary-indep binary-arch
-
-.PHONY: binary binary-arch binary-indep clean build
+.PHONY: binary binary-arch binary-indep clean build build-arch build-indep

Modified: trunk/image-size/debian/watch
URL: http://svn.debian.org/wsvn/trunk/image-size/debian/watch?rev=12023&op=diff
==============================================================================
--- trunk/image-size/debian/watch (original)
+++ trunk/image-size/debian/watch Fri Jan  4 22:02:34 2008
@@ -1,2 +1,2 @@
-version=2
-http://www.cpan.org/modules/by-module/Image/Image-Size-(.*).tar.gz debian
+version=3
+http://www.cpan.org/modules/by-module/Image/Image-Size-(.*).tar.gz

Modified: trunk/image-size/imgsize
URL: http://svn.debian.org/wsvn/trunk/image-size/imgsize?rev=12023&op=diff
==============================================================================
--- trunk/image-size/imgsize (original)
+++ trunk/image-size/imgsize Fri Jan  4 22:02:34 2008
@@ -21,7 +21,7 @@
 =head1 OPTIONS
 
 By default, the width and height are returned as attributes for an IMG tag
-in HTML, essentially C<width="40" height="30">. The following options may be
+in HTML, essentially "C<WIDTH=40 HEIGHT=30>". The following options may be
 used to return alternate formats (all report width first, then height):
 
 =over
@@ -72,7 +72,7 @@
     if ($opt_h || (! @ARGV) || (($opt_a && $opt_r) || ($opt_a && $opt_f) ||
                                 ($opt_r && $opt_f)));
 
-$rtn = \&return_html;
+$rtn = \&html_imgsize;
 $opt_a &&
     ($rtn = \&return_attr);
 $opt_r &&
@@ -80,13 +80,11 @@
 $opt_f &&
     ($rtn = \&return_fmt);
 
-my $error = 0;
-
 if (@ARGV > 1)
 {
     foreach (@ARGV)
     {
-        print STDOUT sprintf("%s: %s\n", $_, &$rtn($_));
+        print STDOUT sprintf("$_: %s\n", &$rtn($_));
     }
 }
 else
@@ -94,7 +92,7 @@
     print STDOUT sprintf("%s\n", &$rtn($ARGV[0]));
 }
 
-exit $error;
+exit;
 
 #
 # Note the doubled calls here. This is just a quick, semi-clean attempt at
@@ -102,31 +100,24 @@
 # the Image::Size package.
 #
 
-sub return_html
-{
-    my ($html) = html_imgsize($_[0]);
-
-    (defined $html) ? $html : ($error = 1 and "error");
-}
-
 sub return_attr
 {
     my ($width, $height, $err) = imgsize($_[0]);
 
     (defined $width) ?
-        "(-width => $width, -height => $height)" : ($error = 1 and "error: $err");
+        "(-width => $width, -height => $height)" : "error: $err";
 }
 
 sub return_imgsize
 {
     my ($width, $height, $err) = imgsize($_[0]);
 
-    (defined $width) ? "$width $height" : ($error = 1 and "error: $err");
+    (defined $width) ? "$width $height" : "error: $err";
 }
 
 sub return_fmt
 {
     my ($width, $height, $err) = imgsize($_[0]);
 
-    (defined $width) ? sprintf($opt_f, $width, $height, $err) : ($error = 1 and "error: $err");
+    (defined $width) ? sprintf($opt_f, $width, $height, $err) : "error: $err";
 }




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