mxcl/homebrew — pull request #19978 by coryb (2013-05-21 18:20:28+00:00)
Title: [rpm.rb] rpmbuild fails without macros.rpmbuild included

rpmbuild is failing because it is not loading lib/rpm/macros.rpmbuild by default.

The configure.ac defaults the macros list to:
```autoconf
MACROFILES="${USRLIBRPM}/macros"
MACROFILES="${MACROFILES}:${USRLIBRPM}/%{_target}/macros"
MACROFILES="${MACROFILES}:${SYSCONFIGDIR}/macros.*"
MACROFILES="${MACROFILES}:${SYSCONFIGDIR}/macros"
MACROFILES="${MACROFILES}:${SYSCONFIGDIR}/%{_target}/macros"
```

But the macros.rpmbuild is installed to ${USERLIBRPM} rather than ${SYSCONFIGDIR}
```automake
pkgdatadir = @USRLIBRPM@
pkgdata_DATA = rpmpopt macros/macros macros/macros.rpmbuild cpuinfo.yaml
```

So lib/rpm/macros.rpmbuild is never loaded. The provided patch is the easiest fix that I found which is to just add ${USERLIBRPM}/macros.* as an extra macros path like:
```shell
--with-extra-path-macros=#{lib}/rpm/macros.*
```

This is hopefully a better fix than my previous bogus attempt #19957.

Thanks
-Cory