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 Name: perl-Declare-Constraints-Simple
Version: 0.03 Version: 0.03
Release: 13%{?dist} Release: 14%{?dist}
Summary: Declarative Validation of Data Structures Summary: Declarative Validation of Data Structures
License: GPL+ or Artistic License: GPL+ or Artistic
Group: Development/Libraries Group: Development/Libraries
@ -32,15 +32,9 @@ declarative keywords in the importing namespace.
%prep %prep
%setup -q -n Declare-Constraints-Simple-%{version} %setup -q -n Declare-Constraints-Simple-%{version}
# Filter unwanted Requires: (pre rpm 4.9) # Filter unwanted Requires (prior to rpm 4.9)
cat << \EOF > %{name}-req %global reqfilt /bin/sh -c "%{__perl_requires} | grep -Fvx 'perl(Declare::Constraints::Simple-Library)'"
#!/bin/sh %define __perl_requires %{reqfilt}
%{__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}
%build %build
%{__perl} Makefile.PL INSTALLDIRS=vendor %{__perl} Makefile.PL INSTALLDIRS=vendor
@ -48,13 +42,10 @@ make %{?_smp_mflags}
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
make pure_install DESTDIR=%{buildroot}
make pure_install PERL_INSTALL_ROOT=%{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 \; find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null
%{_fixperms} %{buildroot}
%{_fixperms} %{buildroot}/*
%check %check
make test make test
@ -65,10 +56,16 @@ rm -rf %{buildroot}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc Changes README t/ %doc Changes README t/
%{perl_vendorlib}/* %{perl_vendorlib}/Declare/
%{_mandir}/man3/* %{_mandir}/man3/Declare::Constraints::Simple*
%changelog %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 * Wed Jun 29 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.03-13
- Perl mass rebuild - Perl mass rebuild

Loading…
Cancel
Save