Thursday, May 25, 2017

Having rpmbuild to put its output in the current directory

Mikolaj Izdebski showed me how to do this.

To have rpmbuild put its outputted RPM and/or SRPM in the current directory, add the following lines to your ~/.rpmmacros :
%_topdir %{lua:print(posix.getcwd())}
%_builddir %{_topdir}/builddir
%_rpmdir %{_topdir}
%_sourcedir %{_topdir}
%_specdir %{_topdir}
%_srcrpmdir %{_topdir}
%_buildroot %{_topdir}/root

You can then run a command like `rpmbuild -ba foo.spec`

No comments:

Post a Comment