From 4743a56eea7ff0672506dc3b53347cae7837fa08 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 22 Aug 2010 08:51:08 +0000 Subject: [PATCH] - ensure rpm macros present Changed files: pearize.sh -> 1.56 --- pearize.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pearize.sh b/pearize.sh index 481a8dc..61efa32 100644 --- a/pearize.sh +++ b/pearize.sh @@ -103,6 +103,10 @@ sed -ne '/^Name:/,/^BuildRoot/p' $spec > $preamble # create backup bak=$(cp -fbv $spec $spec | awk '{print $NF}' | tr -d "['\`]" ) +# ensure rpm-build-macros is present +if ! grep -q "^BuildRequires:.*rpmbuild(macros)" $preamble; then + sed -i -e "/^BuildRequires:.*rpm-php-pearprov/aBuildRequires:\trpmbuild(macros) >= 1.300" $spec +fi # parse requires requires=$(grep '^BuildRequires:' $template || :) if [ -n "$requires" ]; then -- 2.44.0