Added "%global pear_metadir" and changed RPM_BUILD_ROOT to %{buildroot}