Hello,
I would like to make it easier to build KDE packages for any RPM-based
distro. I would like to achieve this by requiring just one .spec file with
preferably no %if per distro, where the differencies would be hidden by
macros and such things. The secret plan here is to get people who publish
their KDE apps on e.g. kde-apps.org to use the buildservice for packaging it
and so it should be as simple as possible. I however have trouble with how to
achieve this.
I know I can map differences in package names using Substitute: in prjconf, I
however can't think of a good way how to create the setup per build
repository (distribution). I haven't found any way how to create macros in
prjconf with conditional contents, so that e.g. %_kde4_appsdir would be
different on openSUSE, Fedora and Mandriva as necessary. It appears to me
that the Macros: section is basically interpreted as-is and no substitutions
or %if work there.
I thought also about creating one extra .rpm with just the macro definitions
in /etc/rpm, I could force it in using Requires: in prjconf, but I don't know
how to make sure these macros take priority over macros from the distribution
if there are any with the same name.
I also don't know if any prjconf-based solution would scale well. If many
people package their KDE app in their home repo, they will need to edit the
prjconf. If something in the recommended setup changes, they will need to
edit it again. Is there a way to do some kind of #include