Spec clean-up

- Simplify pre-rpm-4.9 provides filter
- Use DESTDIR rather than PERL_INSTALL_ROOT
- Make %files list more specific
epel9
Paul Howarth 13 years ago
parent 347f925145
commit 455a7f274f

@ -1,6 +1,6 @@
Name: perl-Declare-Constraints-Simple
Version: 0.03
Release: 13%{?dist}
Release: 14%{?dist}
Summary: Declarative Validation of Data Structures
License: GPL+ or Artistic
Group: Development/Libraries
@ -32,15 +32,9 @@ declarative keywords in the importing namespace.
%prep
%setup -q -n Declare-Constraints-Simple-%{version}
# Filter unwanted Requires: (pre rpm 4.9)
cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} $* |\
sed -e '/perl(Declare::Constraints::Simple-Library)/d'
EOF
%define __perl_requires %{_builddir}/Declare-Constraints-Simple-%{version}/%{name}-req
chmod +x %{__perl_requires}
# Filter unwanted Requires (prior to rpm 4.9)
%global reqfilt /bin/sh -c "%{__perl_requires} | grep -Fvx 'perl(Declare::Constraints::Simple-Library)'"
%define __perl_requires %{reqfilt}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
@ -48,13 +42,10 @@ make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make pure_install PERL_INSTALL_ROOT=%{buildroot}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} %{buildroot}/*
find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null
%{_fixperms} %{buildroot}
%check
make test
@ -65,10 +56,16 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc Changes README t/
%{perl_vendorlib}/*
%{_mandir}/man3/*
%{perl_vendorlib}/Declare/
%{_mandir}/man3/Declare::Constraints::Simple*
%changelog
* Wed Jan 11 2012 Paul Howarth <paul@city-fan.org> - 0.03-14
- Spec clean-up
- Simplify pre-rpm-4.9 provides filter
- Use DESTDIR rather than PERL_INSTALL_ROOT
- Make %%files list more specific
* Wed Jun 29 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.03-13
- Perl mass rebuild

Loading…
Cancel
Save