allow build without protobuf on ppc64
This commit is contained in:
parent
79dbd08a4e
commit
bc89292ce8
21
ocserv.spec
21
ocserv.spec
@ -17,6 +17,13 @@ Release: 1%{?dist}
|
|||||||
%define use_libwrap 1
|
%define use_libwrap 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%define use_local_protobuf 0
|
||||||
|
%if 0%{?rhel} && 0%{?rhel} == 7
|
||||||
|
%ifarch ppc64
|
||||||
|
%define use_local_protobuf 1
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: ocserv
|
Name: ocserv
|
||||||
Summary: OpenConnect SSL VPN server
|
Summary: OpenConnect SSL VPN server
|
||||||
|
|
||||||
@ -48,12 +55,7 @@ BuildRequires: gnutls-devel
|
|||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
BuildRequires: iproute
|
BuildRequires: iproute
|
||||||
|
|
||||||
%if 0%{?rhel} && 0%{?rhel} == 7
|
%if (0%{?use_local_protobuf} == 0)
|
||||||
%ifnarch ppc64
|
|
||||||
BuildRequires: protobuf-c-devel
|
|
||||||
%endif
|
|
||||||
%else
|
|
||||||
|
|
||||||
BuildRequires: protobuf-c-devel
|
BuildRequires: protobuf-c-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -125,7 +127,10 @@ gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} || gpgv2 --keyring %{SOURCE10}
|
|||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
rm -f src/http-parser/http_parser.c src/http-parser/http_parser.h
|
rm -f src/http-parser/http_parser.c src/http-parser/http_parser.h
|
||||||
|
%if (0%{?use_local_protobuf} == 0)
|
||||||
rm -rf src/protobuf/protobuf-c/
|
rm -rf src/protobuf/protobuf-c/
|
||||||
|
touch src/*.proto
|
||||||
|
%endif
|
||||||
rm -rf src/ccan/talloc
|
rm -rf src/ccan/talloc
|
||||||
rm -f src/pcl/*.c src/pcl/*.h
|
rm -f src/pcl/*.c src/pcl/*.h
|
||||||
sed -i 's|/etc/ocserv.conf|/etc/ocserv/ocserv.conf|g' src/config.c
|
sed -i 's|/etc/ocserv.conf|/etc/ocserv/ocserv.conf|g' src/config.c
|
||||||
@ -133,7 +138,6 @@ sed -i 's/run-as-group = nogroup/run-as-group = nobody/g' tests/data/*.config
|
|||||||
# GPLv3 in headers is a gnulib bug:
|
# GPLv3 in headers is a gnulib bug:
|
||||||
# http://lists.gnu.org/archive/html/bug-gnulib/2013-11/msg00062.html
|
# http://lists.gnu.org/archive/html/bug-gnulib/2013-11/msg00062.html
|
||||||
sed -i 's/either version 3 of the License/either version 2 of the License/g' build-aux/snippet/*
|
sed -i 's/either version 3 of the License/either version 2 of the License/g' build-aux/snippet/*
|
||||||
touch src/*.proto
|
|
||||||
|
|
||||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
%if 0%{?rhel} && 0%{?rhel} <= 6
|
||||||
echo "int main() { return 77; }" > tests/valid-hostname.c
|
echo "int main() { return 77; }" > tests/valid-hostname.c
|
||||||
@ -161,6 +165,9 @@ autoreconf -fvi
|
|||||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
%if 0%{?rhel} && 0%{?rhel} <= 6
|
||||||
--enable-local-libopts \
|
--enable-local-libopts \
|
||||||
%endif
|
%endif
|
||||||
|
%if %{use_local_protobuf}
|
||||||
|
--without-protobuf \
|
||||||
|
%endif
|
||||||
%if %{use_libwrap}
|
%if %{use_libwrap}
|
||||||
--with-libwrap
|
--with-libwrap
|
||||||
%else
|
%else
|
||||||
|
Loading…
Reference in New Issue
Block a user