No libjansson for old distros

OBS-URL: https://build.opensuse.org/package/show/security:netfilter/libnftnl?expand=0&rev=5
This commit is contained in:
Jan Engelhardt 2014-01-20 23:38:33 +00:00 committed by Git OBS Bridge
parent f89de3cdba
commit 0d9241f062

View File

@ -30,10 +30,18 @@ URL: http://netfilter.org/projects/libnftnl/
Source: %name-%version.tar.xz Source: %name-%version.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pkgconfig >= 0.21 BuildRequires: pkgconfig >= 0.21
BuildRequires: pkgconfig(jansson) >= 2.3
BuildRequires: pkgconfig(libmnl) >= 1.0.3 BuildRequires: pkgconfig(libmnl) >= 1.0.3
%if 0%{?suse_version} %if 0%{?suse_version} >= 1220
# Fedora does not have %define with_json 1
%define with_mxml 1
%endif
%if 0%{?fedora_version}
%define with_json 1
%endif
%if 0%{?with_json}
BuildRequires: pkgconfig(jansson) >= 2.3
%endif
%if 0%{?with_mxml}
BuildRequires: pkgconfig(mxml) >= 2.6 BuildRequires: pkgconfig(mxml) >= 2.6
%endif %endif
@ -65,11 +73,14 @@ applications that want to make use of libnftnl.
%setup -qn %name %setup -qn %name
%build %build
%configure --includedir="%_includedir/pkg" \ %configure \
%if 0%{?suse_version} %if 0%{?with_mxml}
--with-xml-parsing \ --with-xml-parsing \
%endif %endif
--with-json-parsing %if 0%{?with_json}
--with-json-parsing \
%endif
--includedir="%_includedir/pkg"
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install