[rtems-crossrpms commit] Overhaul perl-filters.
Ralf Corsepius
ralf at rtems.org
Wed May 23 15:47:12 UTC 2012
Module: rtems-crossrpms
Branch: master
Commit: 4fae264605d29f93949553b344167675f1da64cc
Changeset: http://git.rtems.org/rtems-crossrpms/commit/?id=4fae264605d29f93949553b344167675f1da64cc
Author: Ralf Corsépius <ralf.corsepius at rtems.org>
Date: Wed May 23 12:16:28 2012 +0200
Overhaul perl-filters.
---
autotools/automake.add | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/autotools/automake.add b/autotools/automake.add
index fa9f19a..5669cae 100644
--- a/autotools/automake.add
+++ b/autotools/automake.add
@@ -10,6 +10,9 @@
%define requirements autoconf >= 2.61
%endif
+# --with check enable checks (default: off)
+%bcond_with check
+
Name: %{name}
URL: http://sources.redhat.com/automake
License: GPL
@@ -27,10 +30,17 @@ Requires(preun):/sbin/install-info
@SOURCES@
-# remove bogus Automake perl dependencies and provides
+# rpm-4.9 filter
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Automake::
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(Automake::
+# rpm-4.8 filter
+%{?filter_setup:
+%filter_from_provides /^perl(Automake::/d
+%filter_from_requires /^perl(Automake::/d
+%filter_setup
+}
+
%description
Automake is a tool for automatically generating "Makefile.in"s from
files called "Makefile.am". "Makefile.am" is basically a series of
@@ -42,14 +52,14 @@ standards.
%setup -q -n automake-%{srcvers}
%{?PATCH0:%patch0 -p1}
-%if !%{defined fedora}
+%if 0%{?el5} || 0%{?suse11_4}
# Work around rpm inserting bogus perl-module deps
cat << \EOF > %{name}-prov
#!/bin/sh
%{__perl_provides} $* |\
sed -e '/^perl(Automake/d'
EOF
-%global __perl_provides %{_builddir}/automake-%{srcvers}/%{name}-prov
+%define __perl_provides %{_builddir}/automake-%{srcvers}/%{name}-prov
chmod +x %{__perl_provides}
cat << \EOF > %{name}-requ
@@ -57,7 +67,7 @@ cat << \EOF > %{name}-requ
%{__perl_requires} $* |\
sed -e '/^perl(Automake/d'
EOF
-%global __perl_requires %{_builddir}/automake-%{srcvers}/%{name}-requ
+%define __perl_requires %{_builddir}/automake-%{srcvers}/%{name}-requ
chmod +x %{__perl_requires}
%endif
@@ -78,6 +88,13 @@ esac
--disable-silent-rules
make
+%check
+%if "%{_build}" == "%{_host}"
+%if %{with check}
+make check
+%endif
+%endif
+
%install
rm -rf "$RPM_BUILD_ROOT"
make DESTDIR=${RPM_BUILD_ROOT} install
More information about the vc
mailing list