Re: how to "rembuild --rebuild" a source rpm in the current directory?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 8 Mar 2004, James Olin Oden wrote:

> So you don't control the build systems...what a pain (-;
> All is not lost, but you will have to provide a wrapper to build the rpms
> if you want any sort of control of the build process.  What the wrapper
> can do is:
> 
> 	- generate macro files.
> 	- generate an rpmrc file that specifies the path to these
> 	  generated macro files.  You do this with the macrofiles:
> 	  entry wich is a colon delimited list of macros files.
> 	- When you run rpmbuild in the wrapper specify this generated
> 	  rc file (--rcfile, this too takes a colon delimited list, so 
>  	  you can include the default ones after yours).

actually, based on a previous post, here's my solution, built into a 
makefile:

	rpmbuild \
                --define "_topdir $(shell pwd)/build" \
                ${RPMARGS} \
                --rebuild \
                ${PKG}-${VERSION}-${BUILD}.src.rpm

RPMARGS is defined in an included "rpmargs.mk" file:

RPMARGS=\
        --define '_ntopdir      %{_topdir}'  \
        --define '_builddir     %{_ntopdir}' \
        --define '_sourcedir    %{_ntopdir}' \
        --define '_specdir      %{_ntopdir}' \
        --define '_rpmdir       %{_ntopdir}' \
        --define '_srcrpmdir    %{_ntopdir}' \
        --define '_tmpdir       %{_ntopdir}' \
        --define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'

as you can see, all of the building is done in a build/ subdirectory, so i
can do a quick make clean to blow that stuff away in preparation for the
next build.  seems to work fine, but there's one unresolved issue.  
instead of defining this multiline RPMARGS variable, i wanted to add a
simple --macros option to the rpmbuild command so i could put all that in
a single macros file, but nothing i do with that macros directive seems to
have any effect.

what's the trick?  and is there a way to prepend a single macros file to 
the default list, rather than override the entire list?  nothing i've 
tried seems to work.

rday


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux