Re: [gnome-love] request for spec files
James Ogley <[email protected]> Sun, 13 Feb 2005 00:00:09 -0100
| Newsgroups | gmane.comp.gnome.packaging |
|---|---|
| Organization | usr local bin |
| Message-ID | <1108256409.7012.3.camel@dhcp1> |
> 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 [email protected]
GNOME for SuSE: http://usr-local-bin.org/rpms