On Monday 22 October 2007 17:31, Michael Matz wrote: > Hi, > > On Mon, 22 Oct 2007, Marcus Rueckert wrote: > > > we have the rule that a readme.suse or suse.tar.bz2 should be prefixed > > with the package name to avoid collisions when installing the src rpm. > > We should fix the reason for this stupid rule, namely that installing a > source rpm places all files in the same directory. That's just insane.
I fully agree. The most sane approach IMHO would be to expand the sources and
specfile into the current directory; there is no such thing as "installing" a
source rpm anyway, the files only get extracted somewhere. Redefining
_sourcedir and _specdir alone gets rid of this stupidity, by the way:
rpm --eval '%define _sourcedir %(pwd)' \
--eval '%define _specdir %_sourcedir' \
-i ...
In fact there is just as little reason for _rpmdir and _srcrpmdir being
absolute paths. I have been using the attached script for sanely building a
package on the local machine, e.g.,
xrpm --rebuild foo.src.rpm
xrpm -ba foo.spec
This works like a charm...
Thanks,
Andreas
xrpm
Description: application/shellscript
