debian/0000755000000000000000000000000012231171315007162 5ustar debian/watch0000644000000000000000000000015212161626023010214 0ustar version=3 https://metacpan.org/release/Net-CUPS/ .*/Net-CUPS-v?(\d[\d.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip) debian/libnet-cups-perl.examples0000644000000000000000000000001312161626023014104 0ustar examples/* debian/rules0000755000000000000000000000003612161626023010244 0ustar #!/usr/bin/make -f %: dh $@ debian/copyright0000644000000000000000000000261412161626023011123 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Net-CUPS Upstream-Contact: D. Hageman Source: https://metacpan.org/release/Net-CUPS/ Files: * Copyright: 2006-2009, Dracken Technology, Inc. (http://www.dracken.com/) 2003-2005, D. Hageman License: Artistic or GPL-1+ Files: ppport.h Copyright: 2004-2009, Marcus Holland-Moritz 2001, Paul Marquess (Version 2.x) 1999, Kenneth Albanowski (Version 1.x) License: Artistic or GPL-1+ Files: debian/* Copyright: 2007, Rene Mayorga 2008-2013, gregor herrmann 2009, Jonathan Yu License: Artistic or GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ 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 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. debian/source/0000755000000000000000000000000012161626023010465 5ustar debian/source/format0000644000000000000000000000001412161626023011673 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012161626023010614 5ustar debian/patches/series0000644000000000000000000000001512161626023012025 0ustar cups16.patch debian/patches/cups16.patch0000644000000000000000000001213412161626023012757 0ustar Description: cups 1.6 compatibility Origin: CPAN RT Bug: https://rt.cpan.org/Ticket/Display.html?id=78583 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=78583 Bug-Debian: http://bugs.debian.org/713682 Author: Jiří Popelka Reviewed-by: gregor herrmann Last-Update: 2013-06-22 --- a/CUPS.xs +++ b/CUPS.xs @@ -5,9 +5,17 @@ #include "ppport.h" #include +#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) +#define HAVE_CUPS_1_6 1 +#endif + /*#include */ #include -#include +#ifdef HAVE_CUPS_1_6 + #include +#else + #include +#endif #include #include #include @@ -19,6 +27,17 @@ #include "const-c.inc" #include "packer.c" +#ifndef HAVE_CUPS_1_6 +#define ippGetGroupTag(attr) attr->group_tag +#define ippGetName(attr) attr->name +#define ippGetValueTag(attr) attr->value_tag +#define ippGetInteger(attr, element) attr->values[element].integer +#define ippGetString(attr, element, language) attr->values[element].string.text +#define ippGetStatusCode(ipp) ipp->request.status.status_code +#define ippFirstAttribute(ipp) ipp->current = ipp->attrs +#define ippNextAttribute(ipp) ipp->current = ipp->current->next +#endif + static SV *password_cb = (SV*) NULL; const char * @@ -200,7 +219,7 @@ if (response != NULL) { attr = ippFindAttribute(response, "ppd-make", IPP_TAG_TEXT); rv = sv_newmortal(); - sv_setpv(rv, attr->values[0].string.text); + sv_setpv(rv, ippGetString(attr, 0, NULL)); XPUSHs(rv); count++; @@ -211,7 +230,7 @@ } rv = sv_newmortal(); - sv_setpv(rv, attr->values[0].string.text); + sv_setpv(rv, ippGetString(attr, 0, NULL)); XPUSHs(rv); count++; } @@ -252,7 +271,7 @@ "ppd-make-and-model", IPP_TAG_TEXT); rv = sv_newmortal(); - sv_setpv(rv, attr->values[0].string.text); + sv_setpv(rv, ippGetString(attr, 0, NULL)); XPUSHs(rv); count++; while (attr != NULL) { @@ -263,7 +282,7 @@ break; } rv = sv_newmortal(); - sv_setpv(rv, attr->values[0].string.text); + sv_setpv(rv, ippGetString(attr, 0, NULL)); XPUSHs(rv); count++; } @@ -356,14 +375,14 @@ if (response != NULL) { attr = ippFindAttribute(response, "ppd-name", IPP_TAG_NAME ); while ((attr != NULL) && (i < 1)) { - tmpppd = attr->values[0].string.text; + tmpppd = ippGetString(attr, 0, NULL); attr = ippFindNextAttribute(response, "ppd-make", IPP_TAG_TEXT); attr = ippFindNextAttribute(response, "ppd-make-and-model", IPP_TAG_TEXT); - if (strcmp(attr->values[0].string.text, ppdfilename) == 0 ) { + if (strcmp(ippGetString(attr, 0, NULL), ppdfilename) == 0 ) { /* return tmpppd; */ strcpy(test, tmpppd); break; @@ -410,12 +429,12 @@ attr = ippFindNextAttribute(response, "printer-name", IPP_TAG_NAME); while (attr != NULL) { - if (strcmp(attr->values[0].string.text, device) == 0) { + if (strcmp(ippGetString(attr, 0, NULL), device) == 0) { attr = ippFindNextAttribute( response, attribute, attribute_type); rv = sv_newmortal(); - sv_setpv( rv, attr->values[0].string.text); + sv_setpv( rv, ippGetString(attr, 0, NULL)); XPUSHs( rv ); break; } @@ -858,15 +877,15 @@ SV* rv = NULL; int count = 0; ipp_attribute_t* attr = NULL; - for (attr = ipp->attrs; attr != NULL; attr = attr->next) + for (attr = ippFirstAttribute(ipp); attr != NULL; attr = ippNextAttribute(ipp)) { - while (attr != NULL && attr->group_tag != IPP_TAG_JOB) - attr = attr->next; + while (attr != NULL && ippGetGroupTag(attr) != IPP_TAG_JOB) + attr = ippNextAttribute(ipp); if (attr == NULL) break; rv = sv_newmortal(); - sv_setpv( rv, attr->name ); + sv_setpv( rv, ippGetName(attr) ); XPUSHs( rv ); count++; } @@ -880,27 +899,27 @@ SV* rv = NULL; int count = 0; ipp_attribute_t* attr = NULL; - for (attr = ipp->attrs; attr != NULL; attr = attr->next) + for (attr = ippFirstAttribute(ipp); attr != NULL; attr = ippNextAttribute(ipp)) { - while (attr != NULL && attr->group_tag != IPP_TAG_JOB) - attr = attr->next; + while (attr != NULL && ippGetGroupTag(attr) != IPP_TAG_JOB) + attr = ippNextAttribute(ipp); if (attr == NULL) break; - if( !strcmp( attr->name, name ) ) + if( !strcmp( ippGetName(attr), name ) ) { rv = sv_newmortal(); - if( ( attr->value_tag == IPP_TAG_INTEGER ) || - ( attr->value_tag == IPP_TAG_ENUM ) ) + if( ( ippGetValueTag(attr) == IPP_TAG_INTEGER ) || + ( ippGetValueTag(attr) == IPP_TAG_ENUM ) ) { /* We have a number with any luck ... */ - sv_setiv( rv, attr->values[0].integer ); + sv_setiv( rv, ippGetInteger(attr, 0) ); } else { /* We have a string ... maybe ... try to set it. */ - sv_setpv( rv, attr->values[0].string.text ); + sv_setpv( rv, ippGetString(attr, 0, NULL) ); } XPUSHs( rv ); debian/compat0000644000000000000000000000000212161626023010363 0ustar 9 debian/control0000644000000000000000000000235612161626023010576 0ustar Source: libnet-cups-perl Maintainer: Debian Perl Group Uploaders: Damyan Ivanov , Jonathan Yu , Rene Mayorga , Martín Ferrari , gregor herrmann Section: perl Priority: optional Build-Depends: perl, debhelper (>= 9.20120312), libcups2-dev, libcupsfilters-dev, libcupsimage2-dev Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libnet-cups-perl.git Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libnet-cups-perl.git Homepage: https://metacpan.org/release/Net-CUPS/ Package: libnet-cups-perl Architecture: any Depends: ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends} Suggests: cups-common Description: Perl module for printing through CUPS Net::CUPS is a Perl module that provides an object-oriented interface to the Common Unix Printing System (CUPS). It supports retrieving information such as names of all configured printers, authenticating with username/password credentials, and various other utilities for manipulating the CUPS daemon. debian/changelog0000644000000000000000000001327012231171315011037 0ustar libnet-cups-perl (0.61-2build1) trusty; urgency=low * Rebuild for Perl 5.18. -- Colin Watson Mon, 21 Oct 2013 10:24:29 +0100 libnet-cups-perl (0.61-2) unstable; urgency=low * debian/control: while we love and obey policy, "Standards-Version: 3.8.2" is not an Uploader. Thanks to Jakub Wilk for noticing. -- gregor herrmann Sun, 23 Jun 2013 19:10:19 +0200 libnet-cups-perl (0.61-1) unstable; urgency=low [ Jonathan Yu ] * New upstream release [ Salvatore Bonaccorso ] * debian/control: Changed: Replace versioned (build-)dependency on perl (>= 5.6.0-{12,16}) with an unversioned dependency on perl (as permitted by Debian Policy 3.8.3). [ Ryan Niebur ] * Email change: Jonathan Yu -> jawnsy@cpan.org [ Ansgar Burchardt ] * debian/control: Convert Vcs-* fields to Git. [ gregor herrmann ] * debian/control: update {versioned,alternative} (build) dependencies. [ Salvatore Bonaccorso ] * Change search.cpan.org based URIs to metacpan.org based URIs [ gregor herrmann ] * Switch to "3.0 (quilt)" source format. * Add patch from Red Hat taken from CPAN RT for CUPS 1.6 compatibility. (Closes: #713682) * Add libcupsfilters-dev to Build-Depends. * debian/copyright: switch formatting to Copyright-Format 1.0. * Use debhelper 9.20120312 to get all hardening flags. * Set Standards-Version to 3.9.4 (no further changes). -- gregor herrmann Sat, 22 Jun 2013 23:04:11 +0200 libnet-cups-perl (0.60-1) unstable; urgency=medium [ Jonathan Yu ] * New upstream release + Updated copyright years + Fixes double-free issues due to cleanup in DESTROY * Added myself to Copyright and Uploaders * Removed .docs, none of the stuff is important * Updated to new shorter rules format * Standards-Version 3.8.2 (no changes) * Rewrite the control description [ gregor herrmann ] * debian/control: Changed: Switched Vcs-Browser field to ViewSVN (source stanza). [ Rene Mayorga ] * debian/control: update my email address. [ Nathan Handler ] * debian/watch: Update to ignore development releases. -- Jonathan Yu Thu, 30 Jul 2009 15:07:34 -0400 libnet-cups-perl (0.59-1) unstable; urgency=low * New upstream release. * Set debhelper compatibility level to 7; adapt debian/{control,compat,rules}. * No need to select specific tests any more, t/03_destination.t has been moved to extra_t/. * Convert debian/copyright to the new format. -- gregor herrmann Sat, 06 Sep 2008 18:22:55 +0200 libnet-cups-perl (0.58-1) unstable; urgency=low * New upstream release. * debian/copyright: Update years of copyright. -- gregor herrmann Sat, 23 Aug 2008 13:00:01 -0300 libnet-cups-perl (0.57-2) unstable; urgency=low * Don't run test t/03_destination.t, it requires a cups daemon at localhost (closes: #494931). * Remove the patch against the test, as we don't run it any more. Remove quilt fragments. -- gregor herrmann Wed, 13 Aug 2008 20:05:58 -0300 libnet-cups-perl (0.57-1) unstable; urgency=low [ gregor herrmann ] * Change build dependency from libcupsys2-dev to libcups2-dev and Suggests: from cupsys-common to cups-common (the cups* packages have been renamed; closes: #494035). [ Martín Ferrari ] * Updating my email address [ Gunnar Wolf ] * New upstream release. * Added myself as an uploader * Added build-dependency on quilt * Standards-version -> 3.8.0 * Disabled some test cases requiring interactivity or root privileges, which caused a FTBFS -- Gunnar Wolf Tue, 12 Aug 2008 10:58:43 -0500 libnet-cups-perl (0.55-3) unstable; urgency=medium * Set build dependency on libcupsys2-dev to >= 1.3.7-3; fixes "FTBFS: CUPS.xs:15:23: error: cups/i18n.h: No such file or directory" (closes: #474870); set urgency to medium because of the RC bug. * Refresh debian/rules, no functional changes, except: add const-c.inc and const-xs.inc to dh_clean call. * Add /me to Uploaders. -- gregor herrmann Wed, 23 Apr 2008 17:09:59 +0200 libnet-cups-perl (0.55-2) unstable; urgency=low [ gregor herrmann ] The 'ready for perl 5.10' release. * debian/rules: delete /usr/share/perl5 only if it exists. * Set Standards-Version to 3.7.3 (no changes). * Set debhelper compatibility level to 6. * debian/watch: use dist-based URL. * Remove debian/docs, install files directly from debian/rules. * Remove debian/examples, install files directly from debian/rules. * debian/copyright: - make reference to Perl license more verbose - add copyright and license information for ppport.h * debian/rules: - always create new Makefile - move dh_clean before make distclean and use it to remove -stamp files - create install-stamp target depending on build-stamp - use DESTDIR and PREFIX in install-stamp target [ Damyan Ivanov ] * add myself to Uploaders -- Damyan Ivanov Wed, 23 Jan 2008 22:31:11 +0200 libnet-cups-perl (0.55-1) unstable; urgency=low [ Gregor Herrmman ] * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser field (source stanza); Homepage field (source stanza). Removed: Homepage pseudo-field (Description); XS-Vcs-Svn fields. [ Martín Ferrari ] * New upstream release. * Added myself to uploaders. * Added new examples from upstream. * Loosened the versioned dependency on perl. -- Martín Ferrari Sun, 14 Oct 2007 22:52:37 -0300 libnet-cups-perl (0.51-1) unstable; urgency=low * Initial release (Closes: #428727) -- Rene Mayorga Wed, 13 Jun 2007 15:02:18 -0600