[bt-devel] SPEC file question
Brook Humphrey
bt-devel@crosswire.org
Wed, 18 Jul 2001 06:04:53 -0700
Joachim Ansorg wrote:
>Brook,
>I'm working on a one-for-all SPEC file in the HEAD branch which uses the new
>configure options.
>
>My problem is that the different Linux distributions have different values
>for Prefix:
>How do I set Prefix: depending on the Linux system (SuSE/Mandrake ...)?
>
>I thought about something like
>
>if [ %{ostype} = "Mandrake" ] ; then
> Prefix: /usr
>elif [ %{ostype} = "SuSE" ] ; then
> Prefix: /opt/kde2
>fi
>
>but this doesn't work because (I think) scripting isn't allowed in the header
>of a SPEC file.
>
Yes I ran into this same problem. It's not allowed in the files section
either, or the description. The only way I've found is to make a define
at the top so people will still have to set a few things but by putting
the defines at the top they don't have to go hunting for the things thay
need to change.
Fortuantly mandrake has many macros for the system which define all
these types of variables. If I leave them out they are already defined.
But I use the macros provided because some programs compile to funny
places. I'm not sure but maybe they were only programed on debian or
something.
>
>Joachim
>
>
>