perl-RPM2/perl-RPM2.spec

61 lines
1.8 KiB
RPMSpec

Name: perl-RPM2
Version: 1.0
Release: 1%{?dist}
Summary: Perl bindings for the RPM Package Manager API
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/RPM2/
Source0: http://www.cpan.org/authors/id/L/LK/LKUNDRAK/RPM2-%{version}.tar.gz
Patch0: perl-RPM2-1.0-switchofffunctions.patch
Patch1: perl-RPM2-1.0-60_tests.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl(ExtUtils::CBuilder)
BuildRequires: perl(File::Spec)
BuildRequires: perl(Module::Build)
BuildRequires: rpm-devel
Requires: perl(File::Spec)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
The RPM2 module provides an object-oriented interface to querying both the
installed RPM database as well as files on the filesystem.
%prep
%setup -q -n RPM2-%{version}
%patch0 -p1
%patch1 -p1
%build
%{__perl} Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
./Build
%install
rm -rf $RPM_BUILD_ROOT
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*
%check
./Build test verbose=1
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Changes hdlist-test.hdr META.yml README test-rpm-1.0-1.noarch.rpm test-rpm-1.0-1.src.rpm
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/RPM2*
%{_mandir}/man3/*
%changelog
* Fri Jul 14 2023 BogusDateBot
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
by assuming the date is correct and changing the weekday.
* Thu Mar 17 2016 Daniel Berteaud <daniel@firewall-servuces.com> 1.0-1
- First build using cpanspec [SME: 9330]