X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=pearize.sh;h=12f8030609c3c82436f422db476ab916751876c9;hb=887577bd1b07c3bd3a7fc0e7445f3cd141fe61fc;hp=2d8ad944adbbbaadd8a7de5a0e02aa6a49e168b1;hpb=269cad96fb357df253c460a60792348587e38511;p=packages%2Frpm-build-tools.git diff --git a/pearize.sh b/pearize.sh index 2d8ad94..12f8030 100644 --- a/pearize.sh +++ b/pearize.sh @@ -128,6 +128,9 @@ optional=$(grep '^Optional:' $template || :) if [ -n "$optional" ]; then echo "$optional" | while read tag dep; do for req in $dep; do + # strip single quotes that default template includes in @optional@ expand + # TODO: remove in php-pear-PEAR_Command_Packaging package + req=${req#\'} req=${req%\'} m=$(grep "^%define.*_noautoreq" $spec || :) if [ -z "$m" ]; then sed -i -e "/^BuildRoot:/{ @@ -145,7 +148,7 @@ if [ -n "$optional" ]; then done done fi -has_opt=$(egrep -c '^Optional-(pkg|ext):' $template || :) +has_opt=$(grep -Ec '^Optional-(pkg|ext):' $template || :) if [ "$has_opt" -gt 0 ]; then if ! grep -q '%{_docdir}/.*/optional-packages.txt' $spec; then sed -i -e '