[bt-devel] SPEC file question

Holger Schurig bt-devel@crosswire.org
Wed, 18 Jul 2001 18:44:35 +0200


O> I thought about something like
>
> if [ %{ostype} = "Mandrake" ] ; then
> 	Prefix: /usr
> elif [ %{ostype} = "SuSE" ] ; then
> 	Prefix: /opt/kde2
> fi

You you check /usr/lib/rpm/macros?

For me (Red Hat 6.2) there is line

%_prefix  /usr

in it (you have to access this with %{_prefix} inside the spec file).  
And RPM's %if stuff is allowed in the header section. So you could 
check for the %{_vendor} variable (for me it's 'redhat').


If not, then an "kde-config --prefix" with the *.spec.in file should do 
the trick.

-- 
Holger Schurig
Gartenstr. 26
61206 Ober-Wöllstadt
06034-906230