Re: [gnome-love] request for spec files



> If someone wants to proof-of-concept this with, say, libxml, that
> would be great :)

Done it with libxml2 - added the following to the top of my spec file:

%{?_with_suse:%define suse 1}
%{!?_with_suse:%define suse 0}
%if %{suse}
%define name        libxml2
%define prefix      %{_prefix}
%define sysconfdir  %{_sysconfdir}
%define prefixgnome /opt/gnome
%else
%define name        libxml
%define prefix      %{_prefix}
%define sysconfdir  %{_sysconfdir}
%define prefixgnome /opt/gnome
%endif

Now, provided Source0 is the equivalent of @PACKAGE@ and the %setup line
includes the equivalent of -n @PACKAGE -%{version} this allows me to do
rpmbuild -ba --with suse foo.spec and build packages called
libxml2[-devel] or rpmbuild -ba foo.spec and build packages called
libxml[-devel].
-- 
James Ogley james usr-local-bin org
GNOME for SuSE: http://usr-local-bin.org/rpms




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]