From 61100caa824332fc212f854a9ef3e4601362ae30 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 14 Oct 2019 14:42:22 +0200 Subject: [PATCH] spec: updated for rhel8 --- ocserv.spec | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ocserv.spec b/ocserv.spec index 79213fb..7b1ebcf 100644 --- a/ocserv.spec +++ b/ocserv.spec @@ -17,6 +17,13 @@ Release: 2%{?dist} %define use_libwrap 1 %endif +%if 0%{?rhel} && 0%{?rhel} == 8 +%define use_http_parser 0 +%define use_geoip 0 +%else +%define use_geoip 1 +%endif + %define use_local_protobuf 0 Name: ocserv @@ -61,7 +68,10 @@ BuildRequires: gperf BuildRequires: pcllib-devel BuildRequires: libtalloc-devel BuildRequires: libev-devel +%if %{use_http_parser} BuildRequires: http-parser-devel +%endif + %if %{use_libwrap} BuildRequires: tcp_wrappers-devel %endif @@ -69,7 +79,9 @@ BuildRequires: automake, autoconf BuildRequires: radcli-devel BuildRequires: lz4-devel BuildRequires: readline-devel +%if %{use_geoip} BuildRequires: GeoIP-devel +%endif %if %{use_systemd} BuildRequires: systemd @@ -92,7 +104,7 @@ BuildRequires: libseccomp-devel %endif #use systemd # no rubygem in epel7 -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?fedora} BuildRequires: rubygem(ronn) %endif @@ -128,7 +140,9 @@ gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} || gpgv2 --keyring %{SOURCE10} %autosetup -p1 +%if %{use_http_parser} rm -f src/http-parser/http_parser.c src/http-parser/http_parser.h +%endif %if (0%{?use_local_protobuf} == 0) rm -rf src/protobuf/protobuf-c/ touch src/*.proto @@ -165,6 +179,9 @@ autoreconf -fvi %if %{use_local_protobuf} --without-protobuf \ %endif +%if ! %{use_http_parser} + --without-http-parser \ +%endif %if %{use_libwrap} --with-libwrap %else