Multiple packages out of a single build?

Marco listaddr at
Wed Nov 9 09:40:12 UTC 2011

Let me clarify what I mean. I have a makefile that has some targets to
create rpm packages. They are all the same; the only part that differs
is that the files are installed to different target directories, so
the target rpm-foo has a %install section where it installs to
${RPM_BUILD_ROOT}/usr/local/foo, the target rpm-bar has a %install
section where it installs to ${RPM_BUILD_ROOT}/usr/local/bar, etc.
Other than that, everything else is the same (including the expensive
%build part where the source is compiled).
Now I was wondering if there was a way to execute the %build only
once, but still generate multiple packages (each one with its own
target directory) without needing to repeat the whole process for each
one (like eg having multiple %install - I don't even know if that is
possible, but looking for ideas).

Thanks in advance.

More information about the Rpm-list mailing list