File perl-Net-CUPS.spec of Package perl-Net-CUPS

%define realname Net-CUPS
%define realver  0.64
%define srcext   tar.gz

%{!?perl_installarchlib:%define perl_installarchlib %(perl -V:installarchlib | sed "s!.*='!!;s!'.*!!")}

# turn off the generation of debuginfo rpm  (RH9) ??
%global debug_package %{nil}

# Common info
Name:           perl-%{realname}
Version:        %{realver}
Release:        wiz%{?extraver:0.}1%{?dist}
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/Net-CUPS/
Summary:        Common Unix Printing System Interface

# Install-time parameters
Requires:      perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

# Build-time parameters
BuildRequires:  perl
BuildRequires:  cups-devel
%if 0%{?suse_version} >= 1315 || 0%{?rhel} >= 7
BuildRequires:  cups-filters-devel
%endif
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Test::More)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         http://search.cpan.org/CPAN/authors/id/N/NI/NINE/%{realname}-%{realver}.%{srcext}

%description
Net::CUPS is an object oriented interface to the Common Unix Printing System.

%prep
%setup -q -n %{realname}-%{realver}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%{__make} DESTDIR=%{buildroot} install_vendor

%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

%files
%defattr(644,root,root,755)
%doc Changes README
%dir %{perl_vendorarch}/auto/Net/CUPS/Destination
%dir %{perl_vendorarch}/auto/Net/CUPS/IPP
%dir %{perl_vendorarch}/auto/Net/CUPS/PPD
%dir %{perl_vendorarch}/auto/Net/CUPS
%dir %{perl_vendorarch}/auto/Net
%dir %{perl_vendorarch}/Net/CUPS
%dir %{perl_vendorarch}/Net
%{perl_vendorarch}/auto/Net/CUPS/CUPS.*
%{perl_vendorarch}/auto/Net/CUPS/autosplit.ix
%{perl_vendorarch}/auto/Net/CUPS/PPD/autosplit.ix
%{perl_vendorarch}/auto/Net/CUPS/IPP/autosplit.ix
%{perl_vendorarch}/auto/Net/CUPS/Destination/autosplit.ix
%{perl_vendorarch}/Net/CUPS.pm
%{perl_vendorarch}/Net/CUPS/PPD.pm
%{perl_vendorarch}/Net/CUPS/IPP.pm
%{perl_vendorarch}/Net/CUPS/Destination.pm
%doc %{_mandir}/man3/*
%exclude %{perl_installarchlib}/perllocal.pod
%exclude %{perl_vendorarch}/auto/Net/CUPS/.packlist

%changelog