Commit 9e3fd7ba authored by Mathieu Malaterre's avatar Mathieu Malaterre

Import Debian changes 1.2.4-1

jpegoptim (1.2.4-1) unstable; urgency=low

  * New release 1.2.4. Closes: #699448
  * Adopt package (see 699449#10). Thanks Sven for your past work !
  * Switch to dpkg-source 3.0 (quilt) format
  * Remove patches applied upstream
  * Bump Std-Vers to 3.9.4, no changes needed
  * Switch d/compat:9 to get hardening flags
  * Simplify d/rules (new dh syntax)
parents b78f31cf bc1dbaaf
jpegoptim
=========
Copyright (C) 1996-2002 Timo Kokkonen
Copyright (C) 1996-2011 Timo Kokkonen <tjko@iki.fi>
This program is free software; you can redistribute it
......
#########################################################################
# $Id: Makefile.in,v 1.6 2002/12/09 01:56:56 tjko Exp $
# $Id: Makefile.in,v 1.8 2011/03/31 05:37:04 tjko Exp $
#
# Makefile for jpegoptim
#
Version = 1.2.2
Version = 1.2.4
PKGNAME = jpegoptim
SHELL = /bin/sh
......@@ -32,7 +32,7 @@ mandir = $(prefix)/share/man
CC = @CC@
XCPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@ $(XCPPFLAGS) $(DEFS)
CFLAGS = @CFLAGS@ $(XCPPFLAGS) $(DEFS) -Wall
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
STRIP = strip
......@@ -79,7 +79,7 @@ printable.man:
groff -Tps -mandoc ./$(PKGNAME).1 >$(PKGNAME).ps
groff -Tascii -mandoc ./$(PKGNAME).1 | tee $(PKGNAME).prn | sed 's/.//g' >$(PKGNAME).txt
install.man:
install.man: install.dirs
$(INSTALL) -m 644 $(PKGNAME).1 $(INSTALL_ROOT)/$(mandir)/man1/$(PKGNAME).1
install.dirs:
......
Jpegoptim v1.2.3 Copyright (c) Timo Kokkonen, 1996,2002,2009.
Jpegoptim v1.2.4 Copyright (c) Timo Kokkonen, 1996-2011.
REQUIREMENTS
......@@ -17,8 +17,8 @@ INSTALLATION
tar file, make nesessary changes to the Makefile, and then
compile the program. You may wanna do something like this:
zcat jpegoptim-1.2.3.tar.gz | tar xf -
cd jpegoptim-1.2.3
zcat jpegoptim-1.2.4.tar.gz | tar xf -
cd jpegoptim-1.2.4
./configure
make
make strip
......@@ -26,6 +26,9 @@ INSTALLATION
HISTORY
v1.2.4 - new -T / --treshold option by Matteo Croce,
minor fixes (potential memory leaks),
merged some patches from Debian jpegoptim package (1.2.3-2)
v1.2.3 - IPTC marker support by Dustin Ward,
ICC profile support by Dwight Kelly,
minor fixes
......@@ -51,5 +54,5 @@ LATEST VERSION
Timo <tjko@iki.fi>
30-Sep-2009
29-Mar-2011
This diff is collapsed.
This package uses quilt to manage its patches. Please refer to
/usr/share/doc/quilt/README.source to see how this works.
jpegoptim (1.2.4-1) unstable; urgency=low
* New release 1.2.4. Closes: #699448
* Adopt package (see 699449#10). Thanks Sven for your past work !
* Switch to dpkg-source 3.0 (quilt) format
* Remove patches applied upstream
* Bump Std-Vers to 3.9.4, no changes needed
* Switch d/compat:9 to get hardening flags
* Simplify d/rules (new dh syntax)
-- Mathieu Malaterre <malat@debian.org> Sat, 16 Feb 2013 17:57:10 +0100
jpegoptim (1.2.3-2) unstable; urgency=low
* Don't build-depend on versioned libjpeg-dev packages
......
Source: jpegoptim
Section: graphics
Priority: optional
Maintainer: Sven Mueller <sven@debian.org>
Build-Depends: debhelper (>= 7.0.0), autotools-dev, libjpeg-dev, quilt (>=0.40)
Standards-Version: 3.8.4
Maintainer: Mathieu Malaterre <malat@debian.org>
Build-Depends: debhelper (>= 9), autotools-dev, libjpeg-dev
Standards-Version: 3.9.4
Package: jpegoptim
Architecture: any
......@@ -14,4 +14,3 @@ Description: utility to optimize jpeg files
lossless optimization, which is based on optimizing the Huffman
tables. So called, "lossy" optimization (compression) is done
by re-encoding the image using user specified image quality factor.
.
#! /bin/sh /usr/share/dpatch/dpatch-run
## 001-fix-64bit-issues.dpatch by Sven Mueller <sven@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad jpegoptim-1.2.2/Makefile.in /tmp/dpep.JAoruw/jpegoptim-1.2.2/Makefile.in
--- jpegoptim-1.2.2/Makefile.in 2002-12-09 02:56:56.000000000 +0100
+++ /tmp/dpep.JAoruw/jpegoptim-1.2.2/Makefile.in 2006-07-25 16:27:11.857447780 +0200
@@ -32,7 +32,7 @@
CC = @CC@
XCPPFLAGS = @CPPFLAGS@
-CFLAGS = @CFLAGS@ $(XCPPFLAGS) $(DEFS)
+CFLAGS = @CFLAGS@ $(XCPPFLAGS) $(DEFS) -Wall
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
STRIP = strip
#! /bin/sh /usr/share/dpatch/dpatch-run
## fileWSp3BS.dpatch by Sven Mueller <sven@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad jpegoptim-1.2.2/jpegoptim.1 /tmp/dpep.i6s1s9/jpegoptim-1.2.2/jpegoptim.1
--- jpegoptim-1.2.2/jpegoptim.1 2002-12-09 02:56:56.000000000 +0100
+++ /tmp/dpep.i6s1s9/jpegoptim-1.2.2/jpegoptim.1 2007-01-28 15:37:25.023045219 +0100
@@ -32,7 +32,9 @@
.TP 0.6i
.B -d<path>, --dest=<path>
Sets alternative destination directory where to save optimized files
-(default is to overwrite the originals).
+(default is to overwrite the originals). Please note that unchanged files
+won't be added to the destination directory. This means if the source
+file can't be compressed, no file will be created in the destination path.
.TP 0.6i
.B -f, --force
Force optimization, even if the result would be larger than the original
001-enable-warnings.patch
002-update-manpage.patch
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
# enable quilt usage
include /usr/share/quilt/quilt.make
configure: configure-stamp
configure-stamp: $(QUILT_STAMPFN)
dh_testdir
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub aux/config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess aux/config.guess
endif
-rm -f config.status
# Add here commands to configure the package.
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
build: build-stamp
build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
$(MAKE)
#docbook-to-man debian/jpegoptim.sgml > jpegoptim.1
touch build-stamp
clean: unpatch
dh_testdir
# dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
[ ! -f Makefile ] || $(MAKE) clean_all
-rm -f config.sub config.guess aux/config.sub aux/config.guess
dh_clean
install: build-stamp
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Add here commands to install the package into debian/jpegoptim.
override_dh_auto_install:
$(MAKE) install prefix=$(CURDIR)/debian/jpegoptim/usr
override_dh_clean:
dh_clean Makefile
dh_clean config.h
dh_clean config.log
dh_clean config.status
# Build architecture-independent files here.
binary-indep: build-stamp install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build-stamp install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
get-orig-source:
uscan --verbose --force-download --rename
# Example watch control file for uscan
# Rename this file to "watch" and then you can run the "uscan" command
# to check for upstream updates and more.
# See uscan(1) for format
# Compulsory line, this is a version 2 file
version=2
# Uncomment to examine a Webpage
# <Webpage URL> <string match>
version=3
http://www.kokkonen.net/tjko/projects.html src/jpegoptim-(.*)\.tar\.gz
# Uncomment to examine a Webserver directory
#http://www.example.com/pub/jpegoptim-(.*)\.tar\.gz
# Uncommment to examine a FTP server
#ftp://ftp.example.com/pub/jpegoptim-(.*)\.tar\.gz debian uupdate
......@@ -32,7 +32,9 @@ are the following:
.TP 0.6i
.B -d<path>, --dest=<path>
Sets alternative destination directory where to save optimized files
(default is to overwrite the originals).
(default is to overwrite the originals). Please note that unchanged files
won't be added to the destination directory. This means if the source
file can't be compressed, no file will be created in the destination path.
.TP 0.6i
.B -f, --force
Force optimization, even if the result would be larger than the original
......@@ -52,6 +54,9 @@ lossless optimization method.
.B -n, --noaction
Don't really optimize files, just print results.
.TP 0.6i
.B -T[0..100], --threshold=[0..100]
Keep the file unchanged if the compression gain is lower than the threshold (%).
.TP 0.6i
.B -o, --overwrite
Overwrite target file even if it exists (when using -d option).
.TP 0.6i
......
/*******************************************************************
* JPEGoptim
* Copyright (c) Timo Kokkonen, 1996,2002,2004.
* Copyright (c) Timo Kokkonen, 1996-2011.
*
* requires libjpeg.a (from JPEG Group's JPEG software
* release 6a or later...)
*
* $Id: jpegoptim.c,v 1.14 2009/09/30 07:16:58 tjko Exp $
* $Id: jpegoptim.c,v 1.19 2011/04/03 04:16:39 tjko Exp $
*/
#ifdef HAVE_CONFIG_H
......@@ -36,7 +36,7 @@
#include <libgen.h>
#endif
#define VERSIO "1.2.3"
#define VERSIO "1.2.4"
#ifdef BROKEN_METHODDEF
#undef METHODDEF
......@@ -66,7 +66,7 @@ struct jpeg_decompress_struct dinfo;
struct jpeg_compress_struct cinfo;
struct my_error_mgr jcerr,jderr;
const char *rcsid = "$Id: jpegoptim.c,v 1.14 2009/09/30 07:16:58 tjko Exp $";
const char *rcsid = "$Id: jpegoptim.c,v 1.19 2011/04/03 04:16:39 tjko Exp $";
struct option long_options[] = {
{"verbose",0,0,'v'},
......@@ -84,6 +84,7 @@ struct option long_options[] = {
{"strip-exif",0,0,'e'},
{"strip-iptc",0,0,'i'},
{"strip-icc",0,0,'P'},
{"threshold",1,0,'T'},
{0,0,0,0}
};
......@@ -102,6 +103,7 @@ int save_exif = 1;
int save_iptc = 1;
int save_com = 1;
int save_icc = 1;
int threshold = -1;
char *outfname = NULL;
FILE *infile = NULL, *outfile = NULL;
......@@ -138,7 +140,7 @@ void p_usage(void)
{
if (!quiet_mode) {
fprintf(stderr,"jpegoptim v" VERSIO
" Copyright (c) Timo Kokkonen, 1996-2009.\n");
" Copyright (c) Timo Kokkonen, 1996-2011.\n");
fprintf(stderr,
"Usage: jpegoptim [options] <filenames> \n\n"
......@@ -151,6 +153,8 @@ void p_usage(void)
" set maximum image quality factor (disables lossless\n"
" optimization mode, which is by default on)\n"
" -n, --noaction don't really optimize files, just print results\n"
" -T[0..100], --threshold\n"
" keep old file if the gain is below a threshold (%%)\n"
" -o, --overwrite overwrite target file even if it exists\n"
" -p, --preserve preserve file timestamps\n"
" -q, --quiet quiet mode\n"
......@@ -331,7 +335,7 @@ int main(int argc, char **argv)
/* parse command line parameters */
while(1) {
opt_index=0;
if ((c=getopt_long(argc,argv,"d:hm:ntqvfVpo",long_options,&opt_index))
if ((c=getopt_long(argc,argv,"d:hm:ntqvfVpoT:",long_options,&opt_index))
== -1)
break;
......@@ -345,9 +349,8 @@ int main(int argc, char **argv)
if (quality < 0) quality=0;
if (quality > 100) quality=100;
}
else if (!quiet_mode) {
else
fatal("invalid argument for -m, --max");
}
}
break;
case 'd':
......@@ -380,7 +383,7 @@ int main(int argc, char **argv)
break;
case 'V':
printf("jpegoptim v%s %s\n",VERSIO,HOST_TYPE);
printf("Copyright (c) Timo Kokkonen, 1996-2009.\n");
printf("Copyright (c) Timo Kokkonen, 1996-2011.\n");
exit(0);
break;
case 'o':
......@@ -407,6 +410,17 @@ int main(int argc, char **argv)
case 'P':
save_icc=0;
break;
case 'T':
{
int tmpvar;
if (sscanf(optarg,"%d",&tmpvar) == 1) {
threshold=tmpvar;
if (threshold < 0) threshold=0;
if (threshold > 100) threshold=100;
}
else fatal("invalid argument for -T, --threshold");
}
break;
default:
if (!quiet_mode)
......@@ -415,9 +429,11 @@ int main(int argc, char **argv)
}
if (verbose_mode && (quality>0))
if (verbose_mode && (quality>=0))
fprintf(stderr,"Image quality limit set to: %d\n",quality);
if (verbose_mode && (threshold>=0))
fprintf(stderr,"Compression treshold (%%) set to: %d\n",threshold);
/* loop to process the input files */
i=1;
......@@ -460,6 +476,10 @@ int main(int argc, char **argv)
if (setjmp(jderr.setjmp_buffer)) {
jpeg_abort_decompress(&dinfo);
fclose(infile);
if (buf) {
for (j=0;j<dinfo.output_height;j++) free(buf[j]);
free(buf); buf=NULL;
}
printf(" [ERROR]\n");
continue;
}
......@@ -544,8 +564,10 @@ int main(int argc, char **argv)
fprintf(stderr,"target file already exists!\n");
jpeg_abort_decompress(&dinfo);
fclose(infile);
for (j=0;j<dinfo.output_height;j++) free(buf[j]);
free(buf); buf=NULL;
if (buf) {
for (j=0;j<dinfo.output_height;j++) free(buf[j]);
free(buf); buf=NULL;
}
continue;
}
}
......@@ -565,8 +587,10 @@ int main(int argc, char **argv)
fclose(outfile);
if (infile) fclose(infile);
printf(" [Compress ERROR]\n");
for (j=0;j<dinfo.output_height;j++) free(buf[j]);
free(buf); buf=NULL;
if (buf) {
for (j=0;j<dinfo.output_height;j++) free(buf[j]);
free(buf); buf=NULL;
}
if (file_exists(outfname)) delete_file(outfname);
outfname=NULL;
continue;
......@@ -637,7 +661,7 @@ int main(int argc, char **argv)
average_count++;
average_rate+=(ratio<0 ? 0.0 : ratio);
if (outsize<insize || force) {
if ((outsize < insize && ratio >= threshold) || force) {
total_save+=(insize-outsize)/1024.0;
printf("optimized.\n");
if (noaction) continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment