Spec clean-up

- BR: perl(base), perl(constant) and perl(lib)
- Install to vendor directories
- Drop %defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
This commit is contained in:
Paul Howarth 2012-08-28 12:26:36 +01:00
parent e37d18918f
commit 5b0705dd3c

View File

@ -1,6 +1,6 @@
Name: perl-JSON-PP Name: perl-JSON-PP
Version: 2.27200 Version: 2.27200
Release: 240%{?dist} Release: 241%{?dist}
Summary: JSON::XS compatible pure-Perl module Summary: JSON::XS compatible pure-Perl module
License: GPL+ or Artistic License: GPL+ or Artistic
Group: Development/Libraries Group: Development/Libraries
@ -8,12 +8,14 @@ URL: http://search.cpan.org/dist/CPAN-Meta-YAML/
Source0: http://search.cpan.org/CPAN/authors/id/M/MA/MAKAMAKA/JSON-PP-%{version}.tar.gz Source0: http://search.cpan.org/CPAN/authors/id/M/MA/MAKAMAKA/JSON-PP-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch BuildArch: noarch
BuildRequires: perl(B) BuildRequires: perl(base)
BuildRequires: perl(Carp) BuildRequires: perl(Carp)
BuildRequires: perl(constant)
BuildRequires: perl(Data::Dumper) BuildRequires: perl(Data::Dumper)
BuildRequires: perl(Exporter) BuildRequires: perl(Exporter)
BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Getopt::Long) BuildRequires: perl(Getopt::Long)
BuildRequires: perl(lib)
BuildRequires: perl(Test::More) BuildRequires: perl(Test::More)
BuildRequires: perl(Tie::IxHash) BuildRequires: perl(Tie::IxHash)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
@ -30,14 +32,13 @@ JSON::PP is a pure-Perl module and is compatible with JSON::XS.
%setup -q -n JSON-PP-%{version} %setup -q -n JSON-PP-%{version}
%build %build
perl Makefile.PL INSTALLDIRS=perl perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
make pure_install DESTDIR=%{buildroot} make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} \; find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null
%{_fixperms} %{buildroot} %{_fixperms} %{buildroot}
%check %check
@ -47,15 +48,20 @@ make test
rm -rf %{buildroot} rm -rf %{buildroot}
%files %files
%defattr(-,root,root,-)
%doc Changes README %doc Changes README
%{_bindir}/json_pp %{_bindir}/json_pp
%{perl_privlib}/JSON/ %{perl_vendorlib}/JSON/
%{_mandir}/man1/json_pp.1* %{_mandir}/man1/json_pp.1*
%{_mandir}/man3/JSON::PP.3pm* %{_mandir}/man3/JSON::PP.3pm*
%{_mandir}/man3/JSON::PP::Boolean.3pm* %{_mandir}/man3/JSON::PP::Boolean.3pm*
%changelog %changelog
* Tue Aug 28 2012 Paul Howarth <paul@city-fan.org> - 2.27200-241
- BR: perl(base), perl(constant) and perl(lib)
- Install to vendor directories
- Drop %%defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
* Fri Aug 17 2012 Petr Pisar <ppisar@redhat.com> - 2.27200-240 * Fri Aug 17 2012 Petr Pisar <ppisar@redhat.com> - 2.27200-240
- Increase release to replace perl sub-package (bug #848961) - Increase release to replace perl sub-package (bug #848961)