On Sat, Jul 29, 2006 at 11:59:02AM +1000, John Pye wrote:
> Hi all
>
> What's the right way to build an RPM so that it outputs
> mypackage-1.0-1.fc4.i386.rpm and
> mypackage-1.0-1.src.rpm
> when I build it on FC4, but
> mypackage-1.0-1.fc5.i386.rpm and
> mypackage-1.0-1.src.rpm
> when I build it on FC5?
>
> I want the binary packages to be labelled with the different
> distribution tags, but I want the src RPM not to be labelled with the
> distribution.
>
> Up til now, I've been using
> Release: 1.%{dist}
> and I've defined %dist fc4 in my ~/.rpmmacros file.
>
> Is there a better way?
Redefine macros that come up in the Release on the command line to
rpmbuild, e.g.
rpmbuild -bs --define 'dist %{nil}' ...
rpmbuild -bb --define 'dist superdistro9' ...
You should make sure no spurious dot remains. And the binary rpm will
lie that it was built from a src.rpm with a distro in the Release
tag. But that's aesthetics.
--
Axel.Thimm at ATrpms.net
Attachment:
pgpO98pENF6cx.pgp
Description: PGP signature