debian/0000755000000000000000000000000012215340136007163 5ustar debian/patches/0000755000000000000000000000000012215337765010630 5ustar debian/patches/1-manpage0000644000000000000000000000177712215337642012327 0ustar Author: Alexander Zangerl Subject: small type fix in manpage diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' igal2-2.1~/igal2.1 igal2-2.1/igal2.1 --- igal2-2.1~/igal2.1 2012-05-29 07:40:48.000000000 +1000 +++ igal2-2.1/igal2.1 2012-05-30 21:50:46.517697067 +1000 @@ -42,8 +42,8 @@ files and the .BR identify " command enables " igal2 to include IMG HEIGHT and WIDTH tags in the HTML it generates. -.BR If you would like to show the EXIF headers of the images -(option -e) Image::ExifTools is needed +If you would like to show the EXIF headers of the images +(option -e) Image::ExifTools is needed. .SH OPTIONS .TP @@ -123,7 +123,7 @@ .TP .BI -e Extract all EXIF tags from the images and display them on the image slides. -This option needs Image::ExifTool to be installed +This option needs Image::ExifTool to be installed. .TP .BI -f Force thumbnail regeneration. Also forces medium-slide regeneration if debian/patches/3-imlib0000644000000000000000000002341412215337765012013 0ustar Author: Alexander Zangerl Subject: replace imagemagick (and tons of forks) with image::imlib and ::size diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' igal2-2.1~/igal2 igal2-2.1/igal2 --- igal2-2.1~/igal2 2012-05-30 21:38:23.559841252 +1000 +++ igal2-2.1/igal2 2012-05-30 21:39:30.551221803 +1000 @@ -58,6 +58,8 @@ use FileHandle; use Getopt::Long; use POSIX qw(ceil floor); +use Image::Imlib2; +use Image::Size qw(:all); # Check if EXIF Tool library is installed $ExifTool = eval "use Image::ExifTool; 1" ? 1 : 0; @@ -316,16 +318,7 @@ print "Found $nfiles image files in directory $opt_d\n"; } -# find out if the imagemagick commands exist -$HAVEIM = (&exist("identify") and &exist("convert")) unless ($HAVEIM); -print "\nWARNING: The ImageMagick package (imagemagick.org) doesn't seem to be\ninstalled. Image dimensions will not be available in the generated HTML.\nOnly JPG images are supported... falling back onto cjpeg/djpeg/pnmscale.\n\n" unless ($HAVEIM); -# find out if the libjpeg commands exist -$HAVELJ = (&exist("cjpeg") and &exist("djpeg") &exist("pnmscale")) unless ($HAVELJ or ($njpg == 0) or $HAVEIM); -print "\nWARNING: at least one of the commands \"cjpeg\", \"djpeg\" and \"pnmscale\" is not\ninstalled. You can find these at rpmfind.net (inside libjpeg and libgr-progs)\nor you can download the source code from:\n http://www.ijg.org/ and\n http://netpbm.sourceforge.net/\n\n" unless ($HAVELJ or ($njpg == 0) or $HAVEIM); - -# give up if no image processing commands can be found -die "ERROR: the necessary image processing tools aren't installed on your system.\nPlease obtain them as specified above.\n\n" unless ($HAVEIM or $HAVELJ); # initialize the arrays that will hold image file sizes @xdim=(); @ydim=(); @isiz=(); @@ -353,51 +346,45 @@ $fullfile = "$opt_d/$file"; die "Can't open $fullfile\n" unless (-r $fullfile); $fullthumb = "$opt_d/$opt_dest$thumbprefix$file"; - if ((! -e $fullthumb) or $opt_f) { - if ($HAVEIM) { - $command = "convert $opt_con -scale x$opt_y \"$fullfile\" \"$fullthumb\""; - # opt_xy handling: determine dimensions and scale the bigger dimension - # Bug fixing code new since version 1.4.7 - if ($opt_xy) { - $temp = `identify -ping -format \"\%wx\%h %b\" \"$fullfile\"`; - $temp =~ m/(\d+)x(\d+)\s([\d\.]+[mkb]*)/i; - $width = $1; $height = $2; $temp = $3; - if ($width > $height) { - $dimension = "$opt_xy" . "x"; - } else { - $dimension = "x" . "$opt_xy"; - } - $command = "convert $opt_con -scale $dimension \"$fullfile\" \"$fullthumb\""; - } - } else { - if ($imgext[$i] =~ m/(gif|png)/i) { - print "\nIgnoring $file: get ImageMagick (imagemagick.org) to process GIF and PNG files.\n"; - $command = 0; - } else { - $com1 = "djpeg \"$fullfile\""; - $com3 = "cjpeg $opt_con -outfile \"$fullthumb\""; - $scale = "pnmscale -ysize $opt_y"; - $scale = "pnmscale -xysize $opt_xy $opt_xy" if ($opt_xy); - $command = $com1 . " | " . $scale . " | " . $com3; - } - } - system("$command") if ($command); - print "$thumbprefix$file " if ($command); + if ((! -e $fullthumb) or $opt_f) + { + my $img; + eval { $img=Image::Imlib2->load($fullfile); }; + if ($@) + { + print "problem converting $fullfile: $@\n"; + next; + } + my $width=$img->width; + my $height=$img->height; + + my @dims=(0,$opt_y); + # opt_xy handling: determine dimensions and scale + # the bigger dimension + # Bug fixing code new since version 1.4.7 + if ($opt_xy) + { + (@dims)=($width>$height?($opt_xy,0):(0,$opt_xy)); + } + my $thumb=$img->create_scaled_image(@dims); + $thumb->set_quality(95); + # until bug #595376 is addressed... + $thumb->image_set_format("jpeg"); + $thumb->save($fullthumb); + print "$thumbprefix$file " if ($command); } } print "... done!\n"; # determine image file sizes -if ($HAVEIM && !($opt_bigy)) { +if (!($opt_bigy)) { print "Determining image sizes "; foreach $file (@imgfiles) { $fullfile = "$opt_d/$file"; - $temp = `identify -ping -format \"\%wx\%h %b\" \"$fullfile\"`; - $temp =~ m/(\d+)x(\d+)\s([\d\.]+[mkb]*)/i; - push(@xdim,$1); push(@ydim,$2); $temp = $3; - # round nicely in kb if identify returned the size in bytes - $temp = sprintf ("%.1fk", $temp/1024) if ($temp =~ s/([\d\.]+)b*$/$1/i); - push(@isiz,$temp); + (my $width,$height)=imgsize($fullfile); + push @xdim,$width; + push @ydim,$height; + push(@isiz,sprintf("%.1fk",(-s $fullfile)/1024)); print "."; } print " done!\n"; @@ -405,41 +392,34 @@ # scale down slides if the --bigy option was given if ($opt_bigy and !($opt_s)) { - if ($HAVEIM) { - print "Scaling down big slides and determining new slide sizes: "; - @xdim=(); @ydim=(); @isiz=(); # reset image size arrays - } else { - print "Scaling down big slides: "; - } + print "Scaling down big slides and determining new slide sizes: "; + @xdim=(); @ydim=(); @isiz=(); # reset image size arrays for ($i = 0; $i < $nfiles; $i++) { $file = $imgfiles[$i]; $fullfile = "$opt_d/$file"; die "Can't open $fullfile\n" unless (-r $fullfile); $fullslide = "$opt_d/$opt_dest$slideprefix$file"; - if ((! -e $fullslide) or $opt_f) { - if ($HAVEIM) { - $command = "convert $opt_con -scale x$opt_bigy \"$fullfile\" \"$fullslide\""; - } else { - if ($imgext[$i] =~ m/(gif|png)/i) { - print "\nIgnoring $file: get ImageMagick (imagemagick.org) to process GIF and PNG files.\n"; - $command = 0; - } else { - $com1 = "djpeg \"$fullfile\""; - $com3 = "cjpeg $opt_con -outfile \"$fullslide\""; - $scale = "pnmscale -ysize $opt_bigy"; - $command = $com1 . " | " . $scale . " | " . $com3; - } - } - system("$command") if ($command); - print "$slideprefix$file " if ($command); + if ((! -e $fullslide) or $opt_f) + { + my $img=Image::Imlib2->load($fullfile); + my $width=$img->width; + my $height=$img->height; + + my $slide=$img->create_scaled_image(0,$opt_bigy); + $slide->set_quality(95); + $slide->save($fullslide); + print "$slideprefix$file "; + + push(@xdim,$slide->width); + push(@ydim,$slide->height); + push(@isiz,sprintf("%.1fk",(-s $fullslide)/1024)); } - if ($HAVEIM) { - $temp = `identify -ping -format \"\%wx\%h %b\" \"$fullslide\"`; - $temp =~ m/(\d+)x(\d+)\s([\d\.]+[mkb]*)/i; - push(@xdim,$1); push(@ydim,$2); $temp = $3; - # round nicely in kb if identify returned the size in bytes - $temp = sprintf ("%.1fk", $temp/1024) if ($temp =~ s/([\d\.]+)b*$/$1/i); - push(@isiz,$temp); + else + { + (my $width,$height)=imgsize($fullslide); + push @xdim,$width; + push @ydim,$height; + push(@isiz,sprintf("%.1fk",(-s $fullslide)/1024)); } } print "... done!\n"; @@ -528,18 +508,12 @@ $imgfile_i_encoded = URLencode($imgfiles[$i]); if ($opt_bigy) { $slide = URLencode($slideprefix . $imgfiles[$i]); - if ($HAVEIM) { - $workarea =~ s/(<.*)(.)(.*>)/$1$slide$2 width=$xdim[$i] height=$ydim[$i] alt=\"$title\" title=\"click to see full-size\"$3<\/a>/; - } else { - $workarea =~ s/(<.*)(.)(.*>)/$1$slide$2 alt=\"$title\" title=\"click to see full-size\"$3<\/a>/; - } + $workarea =~ s/(<.*)(.)(.*>)/$1$slide$2 width=$xdim[$i] height=$ydim[$i] alt=\"$title\" title=\"click to see full-size\"$3<\/a>/; + } else { - if ($HAVEIM) { + $workarea =~ s/(.)/$destback$imgfile_i_encoded$1 width=$xdim[$i] height=$ydim[$i] alt=\"$title\"/g; - } else { - $workarea =~ s//$destback$imgfile_i_encoded/g; - } - } + } # add in the image counter unless -x is specified if ($opt_x) { @@ -623,10 +597,15 @@ print "Found $opt_dest.$itile file ... using it.\n"; } # rescale the tiled image if the -t switch was called but -r wasn't -if (($HAVEIM) and (! $opt_r)) { - $tileh = `identify -ping -format \"\%wx\%h %b\" \"$opt_d\/$opt_dest.$itile\"`; - $tileh =~ s/\d+x(\d+)\s[\d\.]+./$1/; - system("mogrify -scale x$opt_t $opt_d/$opt_dest.$itile") if ($opt_t != $tileh); +if (!$opt_r) { + my (undef,$tileh)=imgsize("$opt_d/$opt_dest.$itile"); + if ($tileh != $opt_t) + { + my $img=Image::Imlib2->load("$opt_d/$opt_dest.$itile"); + my $resized=$img->create_scaled_image(0,$opt_t); + $resized->set_quality(95); + $resized->save("$opt_d/$opt_dest.$itile"); + } } if (! -e "$opt_d/$opt_dest.$indextemplate") { @@ -708,18 +687,16 @@ $altname = $captions[$fileindex]; $thumb = $opt_dest . $thumbprefix . $imgfiles[$fileindex]; $thumbEncoded = $opt_dest . URLencode($thumbprefix . $imgfiles[$fileindex]); - if ($HAVEIM) { - $temp = `identify -ping -format \"\%wx\%h\" \"$opt_d/$thumb\"`; - $temp =~ m/(\d+)x(\d+)/; $x=$1; $y=$2; - $output .= "\"$altname\""; - } else { - $output .= "\"$altname\""; - } + + my $size=html_imgsize("$opt_d/$thumb"); + $output .= "\"$altname\""; + $output .= "\n"; } $output .= "  \n \n"; $output .= "  \n" unless ($opt_r); - if (($opt_a or $opt_ad or $opt_as) and $HAVEIM) { + if ($opt_a or $opt_ad or $opt_as) { $output .= " \n  \n"; for ($j = 1; $j <= $columns; $j++) { $fileindex = ($page * $paginate) + (($i-1)*$opt_w+$j-1); # calculate which file is in use debian/patches/series0000644000000000000000000000003212215337727012036 0ustar 1-manpage 2-paths 3-imlib debian/patches/2-paths0000644000000000000000000000601012215337735012023 0ustar Author: Alexander Zangerl Subject: adjust paths for debian --- a/Makefile +++ b/Makefile @@ -4,10 +4,10 @@ DESTDIR=/usr/local ############################################################################ BINDIR=$(DESTDIR)/bin -MANDIR=$(DESTDIR)/man/man1 -LIBDIR=$(DESTDIR)/lib/igal2 +MANDIR=$(DESTDIR)/share/man/man1 +LIBDIR=$(DESTDIR)/share/igal2 -OLDLIBDIR=$(DESTDIR)/lib/igal +OLDLIBDIR=$(DESTDIR)/share/igal clean:: rm -rf $(LIBDIR) @@ -24,9 +24,9 @@ old-clean:: install:: igal2 install -d $(BINDIR) install -m 0755 igal2 $(BINDIR) - ln -si $(BINDIR)/igal2 $(BINDIR)/igal - install -m 0755 utilities/igal2.sh $(BINDIR) +# ln -si $(BINDIR)/igal2 $(BINDIR)/igal +# install -m 0755 utilities/igal2.sh $(BINDIR) install -d $(MANDIR) install -m 0644 igal2.1 $(MANDIR) install -d $(LIBDIR) - install -m 0644 README ChangeLog COPYING indextemplate2.html slidetemplate2.html tile.png igal2.css directoryline2.html $(LIBDIR) + install -m 0644 indextemplate2.html slidetemplate2.html tile.png igal2.css directoryline2.html $(LIBDIR) --- a/igal2 +++ b/igal2 @@ -1,11 +1,9 @@ -: magical incantation finds Perl as long as it's in the user's path -eval 'exec perl -wS $0 ${1+"$@"}' - if 0; +#!/usr/bin/perl ############################################################################ # Please change this accordingly if you change the DESTDIR in the tarball # distribution Makefile or the --prefix of the RPM installation -$LIBDIR = "/usr/local/lib/igal2"; +$LIBDIR = "/usr/share/igal2"; # for example if you make DESTDIR=/usr then $LIBDIR="/usr/lib/igal2" ############################################################################ # --- a/igal2.1 +++ b/igal2.1 @@ -28,7 +28,7 @@ also checks for the existence of a .I "$HOME/.igal2" directory where users can store their own templates, overriding the site-wide -.IR "/usr/local/lib/igal2" . +.IR "/usr/share/igal2" . .BR igal2 " needs " Perl to run and it also relies on a few other programs that come standard @@ -267,23 +267,23 @@ Note: igal2 will not work recursively, i found directories. .SH FILES -.I /usr/local/lib/igal2/indextemplate2.html +.I /usr/share/igal2/indextemplate2.html .RS The default index template file. .RE -.I /usr/local/lib/igal2/slidetemplate2.html +.I /usr/share/igal2/slidetemplate2.html .RS The default file used to generate slides. .RE -.I /usr/local/lib/igal2/igal2.css +.I /usr/share/igal2/igal2.css .RS The default style sheet template. .RE -.I /usr/local/lib/igal2/tile.png +.I /usr/share/igal2/tile.png .RS The tiled image used for the "film reel" effect. .RE -.I /usr/local/lib/igal2/directoryline2.html +.I /usr/share/igal2/directoryline2.html .RS The default file used to generate directory links in index.html. If this file is changed, the index.html has to be regenerated by running @@ -300,7 +300,7 @@ also checks for the existence of a .I "$HOME/.igal2" directory where users can store their own templates, overriding the site-wide -.IR "/usr/local/lib/igal2" . +.IR "/usr/share/igal2" . .SH EXAMPLES Run .B igal2 debian/changelog0000644000000000000000000000314712215337542011051 0ustar igal2 (2.1-2) unstable; urgency=low * changed to 3.0 quilt source format (closes: #671643) * lifted standards version -- Alexander Zangerl Mon, 16 Sep 2013 00:08:01 +1000 igal2 (2.1-1) unstable; urgency=low * New upstream release * added watch file -- Alexander Zangerl Wed, 30 May 2012 21:34:10 +1000 igal2 (2.0-6) unstable; urgency=low * lifted standards version, updated dependencies * added option -e (show exif info) (suggested by Daniel Weuthen) -- Alexander Zangerl Sun, 27 May 2012 18:42:38 +1000 igal2 (2.0-5) unstable; urgency=low * lifted standards version * temp. workaround for #595376 in imlib2 perl module: fails to write gifs, so we force thumbnails to be jpegs. -- Alexander Zangerl Sun, 10 Apr 2011 00:28:21 +1000 igal2 (2.0-4) unstable; urgency=low * removed imagemagick dependency, replaced with imlib2 and image::size. -- Alexander Zangerl Thu, 06 May 2010 21:03:27 +1000 igal2 (2.0-3) unstable; urgency=low * added code for handling animated gifs properly. -- Alexander Zangerl Sun, 16 Aug 2009 14:29:10 +1000 igal2 (2.0-2) unstable; urgency=low * Updated control, now replaces igal properly and fully. -- Alexander Zangerl Mon, 1 Dec 2008 11:41:19 +1000 igal2 (2.0-1) unstable; urgency=low * New upstream release. * igal2 supersedes the old v1.4 igal, which I now declare an ex-parrot: upstream is gone and its codebase is brittle and hard to maintain. -- Alexander Zangerl Fri, 28 Nov 2008 11:07:44 +1000 debian/control0000644000000000000000000000131312215337434010573 0ustar Source: igal2 Section: web Priority: optional Maintainer: Alexander Zangerl Build-Depends: debhelper (>= 8.0.0) Standards-Version: 3.9.4 Package: igal2 Architecture: all Depends: libimage-size-perl, libimage-imlib2-perl, libimage-exiftool-perl, ${perl:Depends}, ${misc:Depends} Replaces: igal Provides: igal Conflicts: igal Homepage: http://igal.trexler.at/ Description: online image gallery generator iGal2 is a Perl-based program that can generate an entire online picture show (HTML slides, thumbnails and index page included) with just one command line invocation. . iGal2 is a major rewrite of iGal (which is no longer maintained) and introduces various new features and capabilities. debian/copyright0000644000000000000000000000150411761403177011130 0ustar This package was debianized by Alexander Zangerl on 28 Nov 2008. It was downloaded from: http://igal.trexler.at/ iGal2 is copyright 2000 Eric Pop and Wolfgang Trexler 2003 . 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 of the License, 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. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. debian/compat0000644000000000000000000000000211761403177010373 0ustar 8 debian/watch0000644000000000000000000000006511761403236010223 0ustar version=3 http://igal.trexler.at/igal2-(.*)\.tar.gz debian/igal2.docs0000644000000000000000000000000711761403177011042 0ustar README debian/rules0000755000000000000000000000131412215340043010237 0ustar #!/usr/bin/make -f # GNU copyright 1997 to 1999 by Joey Hess. PACKAGE=$(shell dh_listpackages) TMP=$(CURDIR)/debian/$(PACKAGE) build-arch: build build-indep: build build: build-stamp build-stamp: dh_testdir touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp dh_clean install: build dh_testdir dh_testroot dh_prep $(MAKE) install DESTDIR=$(TMP)/usr # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installdocs -n dh_installchangelogs ChangeLog dh_compress dh_fixperms dh_installdeb dh_perl dh_gencontrol dh_md5sums dh_builddeb binary-arch: binary: binary-indep .PHONY: build clean binary-indep binary install configure debian/source/0000755000000000000000000000000012215337343010471 5ustar debian/source/format0000644000000000000000000000001412215337343011677 0ustar 3.0 (quilt)