On Mon, 8 Mar 2004, Paul Nasrat wrote: > Can I suggest an approach similar to jbj's mkrpm where you have a > script/makefile in the top level cvs repo which handles this. cvs.colug.net is > down atm and I don't have a local copy to hand. This is far simpler than > trying to do it via a loaded macro files. > > Essentially your script/Makefile needs to just set a load of defines. > Something like > > rpmargs=\ > --define '_ntopdir %{_topdir}' \ > --define '_builddir %{_ntopdir}' \ > --define '_sourcedir %{_ntopdir}' \ > --define '_specdir %{_ntopdir}' \ > --define '_rpmdir %{_ntopdir}' \ > --define '_srcrpmdir %{_ntopdir}' \ > --define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' > > Then you can have targets that build setting topdir using $(pwd) or > $(pwd)/%{name} or whatever that actually pretty much completes the picture of what i came to. here's what i found. if i want to build everything in the, say, "build" subdirectory of my current directory (the one that contains the source rpm), i first have to explicitly create some of those subdirectories: $ mkdir -p build/{SOURCES,BUILD,RPMS} the build process requires the above and is apparently unwilling to create those directories itself. so, after the above, i can do: $ rpmbuild --rebuild \ --define "_topdir $(pwd)/build" \ ppp-2.4.1-7.src.rpm my last issue was exactly the above -- what's the best way to add a number of additional defines for things like _sourcedir, _specdir and so on. i tried putting them in a separate macros file and adding --macros=<macrofile> but that didn't seem to make any difference. (anyone know why?) but your way seems fine -- i'll add a lengthy $rpmargs variable to the top level of the cvs repo and just incorporate that into the rpmbuild command. and that should do nicely. thanks for the guidance. rday _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list