Multiple packages out of a single build?

Marco listaddr at gmail.com
Wed Nov 9 15:51:58 UTC 2011


2011/11/9 Nils Philippsen <nils at redhat.com>:

> You could add a subpackage for each of these, e.g. a specfile like this
> would produce packages mypkg-foo and mypkg-bar:
>
> ...
> Name: mypkg
> ...
> %package foo
> ...
> %description foo
> ...
> %package bar
> ...
> %description bar
> ...
> %build
> # build both foo and bar
> ...
> %install
> # install both foo and bar
> ...
> %files foo
> %dir /usr/local/foo
> /usr/local/foo/...
> ...
> %files bar
> %dir /usr/local/bar
> /usr/local/bar/...
> ...

This is indeed an interesting idea, thanks. I suppose there cannot be
something like "%install foo", "%install bar" etc., right? (it's
because if not, we'll have to modify the installation step itself to
install into all valid paths).

Thanks!


More information about the Rpm-list mailing list