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%\'}
+ case "$req" in
+ php-pear-*)
+ # convert pear package name to file pattern
+ req=$(echo "$req" | sed -e 's,^php-pear-,pear(,;y,-,/,;s,$,.*),')
+ ;;
+ *)
+ # process only php-pear-* packages
+ continue
+ ;;
+ esac
+
m=$(grep "^%define.*_noautoreq" $spec || :)
if [ -z "$m" ]; then
sed -i -e "/^BuildRoot:/{