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:/{
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 '