advanced packaging possibilites

Here is what I am trying to accomplish:

Build a package but offer up separate user controlled installation options depending on some currently undefined trigger (say a config file in /etc).

The goal is to create a meta set of packages that have the user controlled option to install them into very customized directories and include menu entries (not unlike Backtrack), but, still retain the the option (default) for users who want these same packages installed into standard FHS compliant directories and without menu entries for non-gui tools.

The difference being user1 wants a few tools, and user2 wants an entirely customized distro that allows them to perform a specific set of tasks in a much more optimized manner.

Is it possible to accomplish this with RPM? Say via the spec file? So far, I have found nothing to indicate this is so.

If I didn’t explain myself well, let me know! =D

As a random side thought, I think FHS is antiquated. I’d like to see that standard redefined.

Just some way to have the binary separate from the installation definitions…

Aren’t you mixing things up, you can’t tell a binary to do xyz well certainly not build options. And the other regarding place is again not going to be handled the way you want a binary is used for ease of use. But look at man rpm for prefix and relocate.

I see 2 ways create sans-binary and with-all-binary, the other going on the spec option but this really doesn’t sound user friendly. With some limited rpm building and a lot of googling you can pass environment vars.
I’ve seen a few of the format …

rpmbuild -ba SPECS/$package.spec --define '_prefix /usr/local'

snipped from here Defining variables for rpmbuild | End Point Blog (redhatish but shouldn’t matter)
So I would guess and a lot of presumption that that could be a custom var that you could check in one of the macros.

… and if you wish for finer granularity of where then then I think similar again, by sending it to rpmbuild.

Any way my tuppence and perhaps something to experiment with until someone with better packaging skills than I jumps in.

Thanks FM, I’ll play around with your suggestions and see where it takes me. =D