--- pxljr-1.1.orig/debian/docs +++ pxljr-1.1/debian/docs @@ -0,0 +1,3 @@ +FAQ +FAQ.html +gs-gamma.ps --- pxljr-1.1.orig/debian/copyright +++ pxljr-1.1/debian/copyright @@ -0,0 +1,25 @@ +This package was debianized by Till Kamppeter on +Sat, 13 Jan 2007. + +It was downloaded from http://sourceforge.net/projects/hp-pxl-jetready/ + +Upstream Authors: + Hin-Tak Leung + +Copyright: (C) 2006, Hin-Tak Leung + + This package 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 dated June, 1991. + + This package 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 package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- pxljr-1.1.orig/debian/control +++ pxljr-1.1/debian/control @@ -0,0 +1,18 @@ +Source: pxljr +Section: text +Priority: optional +Maintainer: Till Kamppeter +Build-Depends: debhelper (>= 5.0.0), cdbs, groff, dpatch, autoconf, automake, libtool, libijs-dev, libjpeg62-dev +Standards-Version: 3.7.2 + +Package: pxljr +Architecture: any +Depends: ${shlibs:Depends}, foomatic-filters (>= 4.0.0~bzr156), cups, cups-client +Description: Driver for HP's Color LaserJet 35xx/36xx color laser printers + HP's Color LaserJets 35xx and 36xx are supported by HP's HPIJS driver + (part of HPLIP), but HPIJS supports only the lowest quality level of + the three which are available under Windows. This driver which is not + developed at HP but by a independent developer supports all modes and + so provided the highest printout quality for these printers. + . + Home Page: http://sourceforge.net/projects/hp-pxl-jetready/ --- pxljr-1.1.orig/debian/README.Debian +++ pxljr-1.1/debian/README.Debian @@ -0,0 +1,12 @@ + +pxljr for Ubuntu Linux +---------------------- + +This is the pxljr printer driver for HP's JetReady color laser printers +(HP Color LaserJet 55xx/36xx). + +The PPD file coming with this package is hand-edited and based on the +Foomatic-generated PPD for the HP Color LaserJet 55xx/36xx used with +the HPIJS driver. + + -- Till Kamppeter , Sat, 13 Jan 2007 23:47:46 +0000 --- pxljr-1.1.orig/debian/rules +++ pxljr-1.1/debian/rules @@ -0,0 +1,89 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +patch: patch-stamp +patch-stamp: + dh_testdir + dpatch apply-all + touch patch-stamp + +configure: configure-stamp +configure-stamp: patch + dh_testdir + touch configure-stamp + ./autogen.sh --prefix=/usr + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + $(MAKE) CFLAGS="$(CFLAGS)" + touch build-stamp + +unpatch: + dh_testdir + dpatch deapply-all + rm -rf debian/patched + +clean:: unpatch + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp patch-stamp + -$(MAKE) clean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + # "make install" installs a lot of unnessecary stuff and it does + # not install th PPD file(s), so we install manually + #$(MAKE) DESTDIR=$(CURDIR)/debian/pxljr install + mkdir -p $(CURDIR)/debian/pxljr/usr/bin + install -m 755 ijs_pxljr $(CURDIR)/debian/pxljr/usr/bin/ + mkdir -p $(CURDIR)/debian/pxljr/usr/share/ppd/pxljr + install -m 644 *.ppd $(CURDIR)/debian/pxljr/usr/share/ppd/pxljr + # Generate PPD files for the HP LaserJet 3500 and 3600 + perl -p -e 's:3550(?!\"):3500:g' $(CURDIR)/debian/pxljr/usr/share/ppd/pxljr/HP-Color_LaserJet_3550-pxljr.ppd > $(CURDIR)/debian/pxljr/usr/share/ppd/pxljr/HP-Color_LaserJet_3500-pxljr.ppd + perl -p -e 's:3550(?!\"):3600:g' $(CURDIR)/debian/pxljr/usr/share/ppd/pxljr/HP-Color_LaserJet_3550-pxljr.ppd > $(CURDIR)/debian/pxljr/usr/share/ppd/pxljr/HP-Color_LaserJet_3600-pxljr.ppd + # Allow also PDF as input data format + perl -p -i -e 's,^\*cupsFilter:\s*\"application/vnd.cups-postscript\s+0\s+foomatic-rip\",*cupsFilter: "application/vnd.cups-postscript 100 foomatic-rip"\n*cupsFilter: "application/vnd.cups-pdf 0 foomatic-rip",' $(CURDIR)/debian/pxljr/usr/share/ppd/pxljr/*.ppd + # Make the page rendering by Ghostscript faster + perl -p -i -e 's,(\-sDEVICE=ijs),-dNOINTERPOLATE \1,' $(CURDIR)/debian/pxljr/usr/share/ppd/pxljr/*.ppd + # Install Apport hook + install -D -m 644 debian/local/apport-hook.py $(CURDIR)/debian/pxljr/usr/share/apport/package-hooks/source_pxljr.py + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installman + 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 configure --- pxljr-1.1.orig/debian/pxljr.postinst +++ pxljr-1.1/debian/pxljr.postinst @@ -0,0 +1,75 @@ +#!/bin/sh +# postinst script for pxljr +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +if [ "$1" = "configure" ]; then + # Do the following only if CUPS is running and the needed CUPS tools + # are available + if which lpstat > /dev/null 2>&1 && \ + which lpinfo > /dev/null 2>&1 && \ + which lpadmin > /dev/null 2>&1 && \ + LC_ALL=C lpstat -h /var/run/cups/cups.sock -r | grep -v not > /dev/null 2>&1; then + # Update the PPD files of all already installed print queues + driverregexp='lsb/usr/pxljr/' + gennicknameregexp='' + [ ! -z "$gennicknameregexp" ] && \ + gennicknameregexp="; $gennicknameregexp" + gennicknameregexp='s/\s*\(recommended\)//'"$gennicknameregexp" + tempfiles= + trap 'rm -f $tempfiles; exit 0' 0 HUP INT QUIT ILL ABRT PIPE TERM + tmpfile1=`mktemp -t updateppds.XXXXXX` + tempfiles="$tempfiles $tmpfile1" + lpinfo -h /var/run/cups/cups.sock -m | grep -E $driverregexp > $tmpfile1 + cd /etc/cups/ppd + for ppd in *.ppd; do + [ -r "$ppd" ] || continue + queue=${ppd%.ppd} + lpstat -h /var/run/cups/cups.sock -p "$queue" >/dev/null 2>&1 || continue + nickname=`grep '\*NickName:' "$ppd" | cut -d '"' -f 2 | perl -p -e 's/\n$//' | perl -p -e "$gennicknameregexp" | perl -p -e 's/(\W)/\\\\$1/g'` + lang=`grep '\*LanguageVersion:' "$ppd" | cut -d ' ' -f 2 | perl -e 'print lc(<>)' | perl -p -e 's/[\r\n]//gs'` + ppdfound="0" + englishppduri="" + tmpfile2=`mktemp -t updateppds.XXXXXX` + tempfiles="$tempfiles $tmpfile2" + cat $tmpfile1 | perl -p -e "$gennicknameregexp" | grep -E '^\S+\s+.*'"$nickname"'$' | cut -d ' ' -f 1 > $tmpfile2 + while read newppduri; do + [ "$ppdfound" = "0" ] && lpadmin -h /var/run/cups/cups.sock -p "$queue" -m $newppduri 2>/dev/null || continue + newlang=`grep '\*LanguageVersion:' "$ppd" | cut -d ' ' -f 2 | perl -e 'print lc(<>)' | perl -p -e 's/[\r\n]//gs'` + [ "$newlang" = "$lang" ] && ppdfound="1" + [ "$newlang" = "english" ] && englishppduri="$newppduri" + done < $tmpfile2 + [ "$ppdfound" = "0" ] && [ ! -z "$englishppduri" ] && lpadmin -h /var/run/cups/cups.sock -p "$queue" -m $englishppduri 2>/dev/null && ppdfound="1" + [ "$ppdfound" = "1" ] && echo PPD for printer $queue updated >&2 + done + fi +elif [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remove" ] || [ "$1" = "abort-deconfigure" ]; then + : +else + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 +fi + + +#DEBHELPER# +exit 0 --- pxljr-1.1.orig/debian/changelog +++ pxljr-1.1/debian/changelog @@ -0,0 +1,67 @@ +pxljr (1.1-0ubuntu8) oneiric; urgency=low + + * debian/rules: Added "-dNOINTERPOLATE" to the Ghostscript command lines in + the PPD files to make the page rendering by Ghostscript faster. + + -- Till Kamppeter Sun, 24 Jul 2011 19:25:23 +0200 + +pxljr (1.1-0ubuntu7) karmic; urgency=low + + * debian/pxljr.postinst: Fixed "lpstat -r" check for the + auto update of PPDs of existing queues. "lpstat -r" exits always with + status 0, we must check the actual output. Call lpstat, lpadmin, and + cupsctl with "-h /var/run/cups/cups.sock" to avoid querying remote + servers set up in /etc/cups/client.conf, and asking for passwords. + Thanks to Martin-Éric Racine for tracking this down and the solution! + See Debian bug #543468. Use signal names instead of numbers for trap. + Quiesces a lintian bashism warning. + + * debian/control: Added dependency on cups and cups-client, to assure + that automatic update of the PPDs of existing print queues. + + -- Till Kamppeter Fri, 18 Sep 2009 16:21:23 +0200 + +pxljr (1.1-0ubuntu6) jaunty; urgency=low + + * debian/pxljr.postinst: Silenced non-fatal error messages when + post-install script updates PPDs and there are PPDs not belonging to + a CUPS queue in /etc/cups/ppd/ (LP: #345866). + + * debian/local/apport-hook.py, debian/rules: Added apport hook (LP: #338442). + + -- Till Kamppeter Thu, 26 Mar 2009 16:37:50 +0100 + +pxljr (1.1-0ubuntu5) jaunty; urgency=low + + * debian/pxljr.postinst: Added automatic updating of the PPD files of the + already existing CUPS queues which use this driver. + + -- Till Kamppeter Wed, 18 Feb 2009 10:57:50 +0100 + +pxljr (1.1-0ubuntu4) jaunty; urgency=low + + * debian/patches/blank-color-squares.patch: Some solid colors got printed in + white in "Normal" and "Draft" quality modes (Easily visible on Ubuntu test + page, LP: #228635). + + -- Till Kamppeter Tue, 11 Nov 2008 19:31:50 +0100 + +pxljr (1.1-0ubuntu3) intrepid; urgency=low + + * debian/rules, debian/control: Add necessary stuff to support patches. + * debian/patches/duplex.patch: Make double-sided printing working. + + -- Till Kamppeter Tue, 23 Sep 2008 22:37:50 +0200 + +pxljr (1.1-0ubuntu2) intrepid; urgency=low + + * debian/rules: Add "*cupsFilter" line to accept PDF input data to the PPDs + * debian/control: Require foomatic-filters 4.x. + + -- Till Kamppeter Wed, 13 Aug 2008 16:20:50 +0200 + +pxljr (1.1-0ubuntu1) feisty; urgency=low + + * Initial Release. + + -- Till Kamppeter Sat, 13 Jan 2007 23:00:00 +0000 --- pxljr-1.1.orig/debian/compat +++ pxljr-1.1/debian/compat @@ -0,0 +1 @@ +5 --- pxljr-1.1.orig/debian/patches/blank-color-squares.patch +++ pxljr-1.1/debian/patches/blank-color-squares.patch @@ -0,0 +1,12 @@ +diff -Nur -x '*.orig' -x '*~' pxljr-1.1/jccolor.c pxljr-1.1.new/jccolor.c +--- pxljr-1.1/jccolor.c 2006-12-31 21:31:48.000000000 +0100 ++++ pxljr-1.1.new/jccolor.c 2008-11-11 19:26:21.000000000 +0100 +@@ -225,7 +225,7 @@ + + for (i = 0; i <= MAXJSAMPLE; i++) { + rgb_ycc_tab[i+JR_HALF_OFF] = FIX(0.50000) * i + ONE_HALF; +- rgb_ycc_tab[i+JR_MINUSHALF_OFF] = (-FIX(0.50000)) * i + CBCR_OFFSET ; /* -1 ? */ ++ rgb_ycc_tab[i+JR_MINUSHALF_OFF] = (-FIX(0.50000)) * i + CBCR_OFFSET - 1; + } + } + --- pxljr-1.1.orig/debian/patches/duplex.patch +++ pxljr-1.1/debian/patches/duplex.patch @@ -0,0 +1,112 @@ +diff -Nur -x '*.orig' -x '*~' pxljr-1.1/i_job_header.c pxljr-1.1.new/i_job_header.c +--- pxljr-1.1/i_job_header.c 2006-12-31 21:26:41.000000000 +0100 ++++ pxljr-1.1.new/i_job_header.c 2008-09-23 22:35:57.000000000 +0200 +@@ -67,7 +67,16 @@ + } + + ts += sprintf(ts, "@PJL SET COPIES=1\x00a"); +- ts += sprintf(ts, "@PJL SET DUPLEX=OFF\x00d\x00a"); /* this is broken in HPIJS */ ++ if (job_info->duplex) { ++ ts += sprintf(ts, "@PJL SET DUPLEX=ON\x00d\x00a"); ++ if (job_info->tumble) { ++ ts += sprintf(ts, "@PJL SET BINDING=SHORTEDGE\x00d\x00a"); ++ } else { ++ ts += sprintf(ts, "@PJL SET BINDING=LONGEDGE\x00d\x00a"); ++ } ++ } else { ++ ts += sprintf(ts, "@PJL SET DUPLEX=OFF\x00d\x00a"); ++ } + ts += sprintf(ts, "@PJL SET RESOLUTION=600\x00a"); + ts += sprintf(ts, "@PJL SET TIMEOUT=90\x00a"); + ts += sprintf(ts, "@PJL ENTER LANGUAGE=PCLXL\x00a"); +diff -Nur -x '*.orig' -x '*~' pxljr-1.1/i_job_info.h pxljr-1.1.new/i_job_info.h +--- pxljr-1.1/i_job_info.h 2006-12-31 21:31:33.000000000 +0100 ++++ pxljr-1.1.new/i_job_info.h 2008-09-23 22:35:57.000000000 +0200 +@@ -50,6 +50,8 @@ + int pixel_v; + int papertype; + int copies; ++ int duplex; ++ int tumble; + struct jpeg_compress_struct *cinfo; + struct jpeg_error_mgr *jerr; + unsigned char *compressedbuffer; +diff -Nur -x '*.orig' -x '*~' pxljr-1.1/i_main.c pxljr-1.1.new/i_main.c +--- pxljr-1.1/i_main.c 2006-12-31 21:25:36.000000000 +0100 ++++ pxljr-1.1.new/i_main.c 2008-09-23 22:35:57.000000000 +0200 +@@ -87,7 +87,7 @@ + char *val_buf, + int val_size) + { +- const char *param_list = "OutputFile,OutputFD,DeviceManufacturer,DeviceModel,PageImageFormat,Dpi,Width,Height,BitsPerSample,ByteSex,ColorSpace,NumChan,PaperSize,PrintableArea,PrintableTopLeft,TopLeft,Quality,Quality:Quality,PaperType,Copies"; ++ const char *param_list = "OutputFile,OutputFD,DeviceManufacturer,DeviceModel,PageImageFormat,Dpi,Width,Height,BitsPerSample,ByteSex,ColorSpace,NumChan,PaperSize,PrintableArea,PrintableTopLeft,TopLeft,PS:Duplex,PS:Tumble,Quality,Quality:Quality,PaperType,Copies"; + int size = strlen (param_list); + + if (size > val_size) +@@ -116,6 +116,10 @@ + val = "hp color LaserJet 3500,hp color LaserJet 3550"; + else if (!strcmp (key, "PageImageFormat")) + val = "Raster"; ++ else if (!strcmp (key, "PS:Duplex")) ++ val = "true,false"; ++ else if (!strcmp (key, "PS:Tumble")) ++ val = "true,false"; + + if (val == NULL) + return IJS_EUNKPARAM; +@@ -294,6 +298,10 @@ + val = "Raster"; + else if (!strcmp (key, "Dpi")) + val = "600x600"; ++ else if (!strcmp (key, "PS:Duplex")) ++ val = "false"; ++ else if (!strcmp (key, "PS:Tumble")) ++ val = "false"; + + if (val == NULL) + return IJS_EUNKPARAM; +@@ -539,7 +547,43 @@ + } + } + +- /* Copies */ ++ /* Duplex */ ++ s = find_param(pl, "PS:Duplex"); ++ if (s == NULL) ++ { ++ fprintf(stderr, "Duplex not set, using default Off (0)\n"); ++ job_info->duplex = 0; ++ } ++ else ++ if (strncmp(s, "true", 4) == 0) ++ job_info->duplex = 1; ++ else if (strncmp(s, "false", 5) == 0) ++ job_info->duplex = 0; ++ else ++ { ++ fprintf(stderr, "Unknown Duplex value %s, aborting!\n", s); ++ return 1; ++ } ++ ++ /* Tumble */ ++ s = find_param(pl, "PS:Tumble"); ++ if (s == NULL) ++ { ++ fprintf(stderr, "Tumble not set, using default Off (0)\n"); ++ job_info->tumble = 0; ++ } ++ else ++ if (strncmp(s, "true", 4) == 0) ++ job_info->tumble = 1; ++ else if (strncmp(s, "false", 5) == 0) ++ job_info->tumble = 0; ++ else ++ { ++ fprintf(stderr, "Unknown Tumble value %s, aborting!\n", s); ++ return 1; ++ } ++ ++ /* Quality */ + s = find_param(pl, "Quality:Quality"); + if (s == NULL) + { --- pxljr-1.1.orig/debian/local/apport-hook.py +++ pxljr-1.1/debian/local/apport-hook.py @@ -0,0 +1,11 @@ +'''apport package hook for pxljr + +(c) 2009 Canonical Ltd. +Author: Brian Murray +''' + +from apport.hookutils import * + +def add_info(report): + attach_hardware(report) + attach_printing(report)