debian/0000755000000000000000000000000012265534573007202 5ustar debian/pyppd.10000644000000000000000000000161312265005105010401 0ustar .TH PYPPD "1" "November 2010" "Debian" "User Commands" .SH NAME pyppd \- A CUPS PostScript Printer Driver's compressor and generator .SH SYNOPSIS .B pyppd [\fIoptions\fR] \fIppds_directory\fR .SH OPTIONS .TP \fB\-\-version\fR show program's version number and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-v\fR, \fB\-\-verbose\fR run verbosely (can be supplied multiple times to increase verbosity) .TP \fB\-d\fR, \fB\-\-debug\fR print debug messages .TP \fB\-o\fR FILE, \fB\-\-output\fR=\fIFILE\fR write archive to FILE [default pyppd\-ppdfile] .SH AUTHOR This manpage has been written by Didier Raboud for the Debian project with help2man as a start. .SH COPYRIGHT Copyright \(co 2010 Vitor Baptista. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. debian/watch0000644000000000000000000000012012265005105010204 0ustar version=3 http://pypi.python.org/packages/source/p/pyppd/pyppd-([\d\.]+).tar.gz debian/dh_pyppd.pm0000644000000000000000000000014712265005105011331 0ustar use warnings; use strict; use Debian::Debhelper::Dh_Lib; insert_after('dh_install', 'dh_pyppd'); 1; debian/compat0000644000000000000000000000000212265005105010360 0ustar 7 debian/copyright0000644000000000000000000000271612265005105011123 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: pyppd Upstream-Contact: Vitor Baptista Source: https://github.com/vitorbaptista/pyppd/ Files: * Copyright: 2010,2012 Vitor Baptista License: Expat Files: debian/* Copyright: 2010-2012 Didier Raboud 2012 Martin Pitt License: Expat License: Expat 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. debian/control0000644000000000000000000000174712265530102010576 0ustar Source: pyppd Section: python Priority: extra Maintainer: Debian Printing Group Uploaders: Didier Raboud Build-Depends: debhelper (>= 7.0.50~), python3-all Homepage: http://pypi.python.org/pypi/pyppd Vcs-Git: git://anonscm.debian.org/collab-maint/pyppd.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/pyppd.git Standards-Version: 3.9.5 Package: pyppd Architecture: all Depends: ${python3:Depends}, ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}, xz-utils Description: CUPS PostScript Printer Driver's compressor and generator pyppd is a CUPS PPD generator. It holds an compressed archive of PPDs, which can be listed and retrieved only when needed by CUPS, saving disk space. . This tool is mostly useful as build-dependency for printing driver packages. For this use, it provides a Debian-specific dh_pyppd Debhelper addon that handles the pyppd launch and the cleanup after it. debian/dh_pyppd0000755000000000000000000000442012265534041010725 0ustar #!/usr/bin/perl -w =head1 NAME dh_pyppd - Compress the CUPS PPDs using pyppd. =cut use strict; use Debian::Debhelper::Dh_Lib; use File::Path; use File::Find; =head1 SYNOPSIS B [--archive-filename=archvname] [S>] =head1 DESCRIPTION B is a debhelper program that compresses PPDs installed under /usr/share using pyppd, removes them from the binary package and adds the needed Depends to the package's ${misc:Depends}. =head1 OPTIONS =over 4 =item B<--archive-filename>=I Use the specified pyppd archive filename instead of deriving it from the binary package name (by dropping printer-driver-). This is usually not needed. =back =cut init(options => { "archive-filename=s" => \$dh{ARCHIVE_FILENAME}, }); foreach my $package (@{$dh{DOPACKAGES}}) { my $tmp=tmpdir($package); my $ppd_src="$tmp/usr/share/"; my $pyppd_dest="$tmp/usr/lib/cups/driver"; my $package_printer_driver=$package; $package_printer_driver =~ s/^printer-driver-//; # If archive-filename is specified, use that instead if($dh{ARCHIVE_FILENAME}) { $package_printer_driver = $dh{ARCHIVE_FILENAME}; } if(-d $ppd_src) { my $ppds_presence = 0; find(sub { if(($_ =~ m/\.ppd(\.gz)?$/) ) { $ppds_presence++; } }, "$ppd_src"); # fall back to debian/tmp as dh_install does if (! compat(6) && ! $ppds_presence) { $ppd_src="debian/tmp/usr/share/"; find(sub { if(($_ =~ m/\.ppd(\.gz)?$/) ) { $ppds_presence++; } }, "$ppd_src"); } if( $ppds_presence ) { # verbose_print("PPDs found in $ppd_src."); # verbose_print("Creating pyppd archive at $pyppd_dest/$package."); mkpath($pyppd_dest); doit("pyppd","--output=$pyppd_dest/$package_printer_driver","$ppd_src"); # verbose_print("Remove PPDs now in the archive."); doit("find",$ppd_src,"-name","\*.ppd","-delete","-o","-name","\*.ppd.gz","-delete"); # verbose_print("Remove empty directories left."); doit("find",$ppd_src,"-type","d","-empty","-delete"); # verbose_print("Add needed Depends in \${misc:Depends}"); addsubstvar($package,"misc:Depends", "xz-utils"); addsubstvar($package,"misc:Depends", "python3"); } else { # verbose_print("No PPDs found under $ppd_src."); } } } =head1 AUTHOR Didier Raboud =cut debian/pyppd.manpages0000644000000000000000000000004112265005105012026 0ustar debian/pyppd.1 debian/dh_pyppd.1 debian/source/0000755000000000000000000000000012265005105010462 5ustar debian/source/format0000644000000000000000000000001412265005105011670 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012265005105010611 5ustar debian/patches/series0000644000000000000000000000005712265005105012030 0ustar 00_fix_issues_ftbfs.patch 02_use_python3.patch debian/patches/00_fix_issues_ftbfs.patch0000644000000000000000000000126412265005105015501 0ustar Description: Cope with the ironical disappearance of the ISSUES file from the upstream tarball. Author: Didier Raboud Origin: vendor Last-Update: 2012-07-10 --- a/setup.py +++ b/setup.py @@ -28,8 +28,7 @@ url='http://github.com/vitorbaptista/pyppd/', license='MIT', description='A CUPS PostScript Printer Driver\'s compressor and generator', - long_description=open('README', 'rb').read().decode('UTF-8') + "\n" + - open('ISSUES', 'rb').read().decode('UTF-8'), + long_description=open('README', 'rb').read().decode('UTF-8'), cmdclass={'sdist': sdist}, classifiers=[ 'Development Status :: 5 - Production/Stable', debian/patches/02_use_python3.patch0000644000000000000000000000226512265005105014420 0ustar Description: Use python3 in the program, template, and setup.py Author: Martin Pitt Forwarded: Not yet, waiting on https://gitorious.org/vitorbaptista/pyppd/merge_requests/1 Index: pyppd/bin/pyppd =================================================================== --- pyppd.orig/bin/pyppd 2012-06-04 15:25:40.539885921 +0200 +++ pyppd/bin/pyppd 2012-06-04 15:26:25.891888117 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from pyppd import runner try: Index: pyppd/pyppd/pyppd-ppdfile.in =================================================================== --- pyppd.orig/pyppd/pyppd-ppdfile.in 2012-06-04 15:25:40.559885923 +0200 +++ pyppd/pyppd/pyppd-ppdfile.in 2012-06-04 15:26:29.347888283 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # compressor.py @compressor@ Index: pyppd/setup.py =================================================================== --- pyppd.orig/setup.py 2012-06-04 15:25:40.559885923 +0200 +++ pyppd/setup.py 2012-06-04 15:26:27.755888207 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from distutils.core import setup from distutils.command.sdist import sdist as _sdist debian/rules0000755000000000000000000000144112265005105010242 0ustar #!/usr/bin/make -f %: dh "$@" --with python3 override_dh_install: dh_install install -D -m 755 debian/dh_pyppd $(CURDIR)/debian/pyppd/usr/bin/dh_pyppd install -D -m 644 debian/dh_pyppd.pm $(CURDIR)/debian/pyppd/usr/share/perl5/Debian/Debhelper/Sequence/pyppd.pm # build/install needs manual commands, see Debian #597105 override_dh_auto_build: set -ex; for python in $(shell py3versions -r); do \ $$python ./setup.py build ; \ done pod2man -c Debhelper -r '' debian/dh_pyppd > debian/dh_pyppd.1 override_dh_python3: dh_python3 --shebang=/usr/bin/python3 override_dh_auto_install: set -ex; for python in $(shell py3versions -r); do \ $$python setup.py install --root=$(CURDIR)/debian/pyppd --install-layout=deb; \ done override_dh_auto_clean: rm -f debian/dh_pyppd.1 rm -rf build debian/changelog0000644000000000000000000001143312265534207011050 0ustar pyppd (1.0.2-1) unstable; urgency=low * New 1.0.2 upstream release * Update Vcs-* fields to canonical forms * Bump Standards-Version to 3.9.5 without changes needed * Add --archive-filename option to dh_pyppd to allow the specification of the pyppd archive name -- Didier Raboud Wed, 15 Jan 2014 17:34:04 +0100 pyppd (1.0.1-2) unstable; urgency=low [ Enrico Tassi ] * Fallback to debian/tmp if no ppds are found in debian/$pkg (Closes: #722890) -- Didier Raboud Fri, 01 Nov 2013 13:11:51 +0100 pyppd (1.0.1-1) unstable; urgency=low * New 1.0.1 upstream release. - Improved the checking of "*1284DeviceID:" and "*Product:" lines in the PPD files whether they are really for different models Closes: #693697 * Fix dh_pyppd's POD typos. -- Didier Raboud Thu, 12 Sep 2013 19:34:53 +0200 pyppd (1.0.0-3) unstable; urgency=low * Upload to unstable * Don't use dh_auto_* tools to avoid trying to run setup.py with python2.x, which is not supported. * Bump Standards-Version to 3.9.4 without changes needed -- Didier Raboud Sun, 19 May 2013 10:14:16 +0200 pyppd (1.0.0-2) experimental; urgency=low [ Dmitrijs Ledkovs ] * Use python3 shebang (Closes: #692379) * Clean up builds in clean target -- Didier Raboud Mon, 05 Nov 2012 15:44:33 +0100 pyppd (1.0.0-1) experimental; urgency=low * New upstream version 1.0.0. * Drop patches merged upstream: - 00git_improve_runtime_error_handling.patch - 01_python3_compat.patch * Bump Standards-Version to 3.9.3 without changes needed. * Fix upstream FTBFS caused by the absence of ISSUES file. * Build for all python3 versions. * Rewrite debian/copyright with CF1.0 and reflect the license change to Expat. -- Didier Raboud Wed, 11 Jul 2012 01:38:42 +0200 pyppd (0.4.9-8) experimental; urgency=low * 00git_improve_runtime_error_handling.patch: Also import upstream commit efa467c0a to only exit if the IOError caught was a Broken Pipe. * 01_python3_compat.patch: Update to current upstream merge proposal to rework bytes vs. string handling to be more robust. Also fix setup.py to work under non-UTF8 locales. (Closes: #677130) -- Martin Pitt Tue, 12 Jun 2012 08:39:24 +0200 pyppd (0.4.9-7) experimental; urgency=low * Add 00git_improve_runtime_error_handling.patch: Improved runtime error handling. Patch taken from upstream git head. * Add 01_python3_compat.patch: Port code to also work with Python 3. It still works with Python2 as well. * Switch to Python 3: - Add 02_use_python3.patch: Use python3 in the program, template, and setup.py. - debian/control: Move to python3-all build dependency, and drop XS-Python-Version (as this works with all python 3 versions). - debian/rules: Build with "python3", and override auto_build and auto_install command (until debhelper supports autobuilding python3 modules, see Debian #597105). - debian/dh_pyppd: Generate "python3" dependency. -- Martin Pitt Tue, 05 Jun 2012 09:52:02 +0200 pyppd (0.4.9-6) unstable; urgency=low * Strip '^printer-driver-' from compressed PPD archive names. -- Didier Raboud Mon, 24 Oct 2011 15:35:58 +0200 pyppd (0.4.9-5) unstable; urgency=low * Bugfix in dh_pyppd: Delete non-gzipped PPDs too. -- Didier Raboud Thu, 18 Aug 2011 19:49:09 +0200 pyppd (0.4.9-4) unstable; urgency=low * dh_pyppd update: - Make sure it handles gzipped PPDs. - Don't try to be too smart and just check for available PPDs. -- Didier Raboud Thu, 18 Aug 2011 16:52:51 +0200 pyppd (0.4.9-3) unstable; urgency=low * Add dh_pyppd helper in the dh sequence. * Update the long description to include some bits about dh_pyppd. * Update the Debian copyright. * Acknowledge NMU, thanks Piotr ! -- Didier Raboud Wed, 17 Aug 2011 16:48:52 +0200 pyppd (0.4.9-2.1) unstable; urgency=low * Non-maintainer upload (just a rebuild to add Python 2.7 and dropPython 2.5 support) -- Piotr Ożarowski Sun, 17 Apr 2011 21:18:45 +0200 pyppd (0.4.9-2) unstable; urgency=low * Merge from Ubuntu: - Correct debian/copyright to match the upstream code: GPLv3 instead of GPLv3+. (Closes: #607282) * Use my @d.o address in Uploaders. -- Didier Raboud Thu, 06 Jan 2011 15:32:24 +0100 pyppd (0.4.9-1ubuntu1) natty; urgency=low * debian/copyright: Corrected to match the upstream code. -- Till Kamppeter Thu, 16 Dec 2010 17:24:03 +0100 pyppd (0.4.9-1) unstable; urgency=low * Initial release. (Closes: #602389) -- Didier Raboud Thu, 11 Nov 2010 23:27:59 +0100