From afcf302835b59c48f01b6b273512bee37a594468 Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jples...@redhat.com>
Date: Fri, 22 Jul 2016 10:07:04 +0200
Subject: 0.62 bump

---
 .gitignore                      |   1 +
 Net-CUPS-0.61-cups2.patch       |  13 ----
 perl-Net-CUPS-0.61-cups16.patch | 165 ----------------------------------------
 perl-Net-CUPS.spec              |  34 ++++++---
 sources                         |   2 +-
 5 files changed, 24 insertions(+), 191 deletions(-)
 delete mode 100644 Net-CUPS-0.61-cups2.patch
 delete mode 100644 perl-Net-CUPS-0.61-cups16.patch

diff --git a/.gitignore b/.gitignore
index 5d35eac..ab4f7b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 Net-CUPS-0.61.tar.gz
+/Net-CUPS-0.62.tar.gz
diff --git a/Net-CUPS-0.61-cups2.patch b/Net-CUPS-0.61-cups2.patch
deleted file mode 100644
index cf27b3f..0000000
--- a/Net-CUPS-0.61-cups2.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- Makefile.PL
-+++ Makefile.PL
-@@ -31,8 +31,8 @@
- 
- my @version_parts = split( /\./, $version );
- 
--if( ( $version_parts[1] < 2 ) ||
--      ( ( $version_parts[1] == 2 ) && ( $version_parts[2] < 2 ) ) )
-+if( $version_parts[0] < 2 && ( ( $version_parts[1] < 2 ) ||
-+      ( ( $version_parts[1] == 2 ) && ( $version_parts[2] < 2 ) ) ) )
- {
-       print "The version of the Common Unix Printing System installed\n";
-       print "on your system is too old for this module to work properly.\n";
diff --git a/perl-Net-CUPS-0.61-cups16.patch b/perl-Net-CUPS-0.61-cups16.patch
deleted file mode 100644
index 4c5bf66..0000000
--- a/perl-Net-CUPS-0.61-cups16.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-diff --git a/CUPS.xs b/CUPS.xs
-index 2da9558..109f73f 100644
---- a/CUPS.xs
-+++ b/CUPS.xs
-@@ -5,9 +5,17 @@
- #include "ppport.h"
- 
- #include <cups/cups.h>
-+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
-+#define HAVE_CUPS_1_6 1
-+#endif
-+
- /*#include <cups/backend.h>*/
- #include <cups/http.h>
--#include <cups/image.h>
-+#ifdef HAVE_CUPS_1_6
-+ #include <cupsfilters/image.h>
-+#else
-+ #include <cups/image.h>
-+#endif
- #include <cups/ipp.h>
- #include <cups/ppd.h>
- #include <cups/file.h>
-@@ -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 @@ NETCUPS_getPPDMakes()
-               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 @@ NETCUPS_getPPDMakes()
-                               }
- 
-                               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 @@ NETCUPS_getAllPPDs ()
-                                                                       
"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 @@ NETCUPS_getAllPPDs ()
-                                       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 @@ NETCUPS_getPPDFileName(ppdfilename);
-               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 @@ NETCUPS_getDeviceAttribute( device, attribute, 
attribute_type )
-                       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 @@ NETCUPS_getAttributes( ipp )
-               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 @@ NETCUPS_getAttributeValue( ipp, name )
-               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 );
diff --git a/perl-Net-CUPS.spec b/perl-Net-CUPS.spec
index 90d1d14..6043f79 100644
--- a/perl-Net-CUPS.spec
+++ b/perl-Net-CUPS.spec
@@ -1,19 +1,29 @@
 Name:           perl-Net-CUPS
-Version:        0.61
-Release:        22%{?dist}
+Version:        0.62
+Release:        1%{?dist}
 Summary:        Perl bindings to the CUPS C API Interface
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Net-CUPS/
-Source0:        
http://search.cpan.org/CPAN/authors/id/D/DH/DHAGEMAN/Net-CUPS-%{version}.tar.gz
-Patch0:         perl-Net-CUPS-0.61-cups16.patch
-Patch1:         Net-CUPS-0.61-cups2.patch
+Source0:        
http://search.cpan.org/CPAN/authors/id/N/NI/NINE/Net-CUPS-%{version}.tar.gz
 Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 BuildRequires:  cups-devel
 BuildRequires:  cups-filters-devel
+BuildRequires:  findutils
+BuildRequires:  perl
+BuildRequires:  perl-devel
+BuildRequires:  perl-generators
+BuildRequires:  perl(ExtUtils::MakeMaker)
+BuildRequires:  perl(File::Copy)
+BuildRequires:  perl(File::Spec)
+# Run-time
 BuildRequires:  perl(AutoLoader)
 BuildRequires:  perl(Carp)
-BuildRequires:  perl(ExtUtils::MakeMaker)
+BuildRequires:  perl(Exporter)
+BuildRequires:  perl(strict)
+BuildRequires:  perl(warnings)
+BuildRequires:  perl(XSLoader)
+# Tests
 BuildRequires:  perl(Test::More)
 
 %{?perl_default_filter}
@@ -25,18 +35,15 @@ an urge to control CUPS servers via Perl, this is a good 
way to do it :)
 %prep
 %setup -q -n Net-CUPS-%{version}
 find . -type f -exec chmod -c -x {} +
-%patch0 -p1 -b .cups16
-%patch1
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
 make %{?_smp_mflags}
 
 %install
-make pure_install PERL_INSTALL_ROOT=%{buildroot}
-find %{buildroot} -type f -name .packlist -exec rm -f {} +
-find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} +
-find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
+make pure_install DESTDIR=%{buildroot}
+find %{buildroot} -type f -name .packlist -delete
+find %{buildroot} -type f -name '*.bs' -size 0 -delete
 %{_fixperms} %{buildroot}/*
 
 %check
@@ -49,6 +56,9 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Fri Jul 22 2016 Jitka Plesnikova <jples...@redhat.com> - 0.62-1
+- 0.62 bump
+
 * Thu Feb 04 2016 Fedora Release Engineering <rel...@fedoraproject.org> - 
0.61-22
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
 
diff --git a/sources b/sources
index 3265e5d..7ae8307 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1aba74db9bcf15396005091f826b50e8  Net-CUPS-0.61.tar.gz
+77a606d9bd08265043fc24477da6abcd  Net-CUPS-0.62.tar.gz
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/perl-Net-CUPS.git/commit/?h=f24&id=afcf302835b59c48f01b6b273512bee37a594468
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Reply via email to