Description of problem:The macro %configure in file /usr/lib/rpm/macros should have some of its parameters prefixed with %{?buildroot:%{buildroot}}, just like the macro %makeinstall. The way it is now, normal users cannot create rpms, because it creates Makefiles with bindir=/usr/bin. The fix I used was: %configure \ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ ./configure --host=%{_host} --build=%{_build} \\\ --target=%{_target_platform} \\\ --program-prefix=%{?_program_prefix} \\\ --prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\ --exec-prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\ --bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\ --sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\ --sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\ --datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\ --includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\ --libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\ --libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\ --localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\ --sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\ --mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\ --infodir=%{?buildroot:%{buildroot}}%{_infodir}
%configure can be changed, or even not used, if it does not work for your specific package.
Ok, I agree, I don't have to use it. But then, the comments in the file /usr/lib/rpm/macros that precede the macro %makeinstall should be altered. There we can read: # The make install analogue of %configure: %makeinstall \ ... This is clearly false for a normal user creating a rpm with another buildroot. I wonder what is the problem with prefixing some entries with %{?buildroot:%{buildroot}} just like it has been done with % makeinstall. Well, maybe I'm just using it the wrong way. These two macros are great to quickly create rpms from well written gnu packages, that's why I always use them.