summaryrefslogtreecommitdiffstats
path: root/redhat
diff options
context:
space:
mode:
authorMartin Winter <mwinter@opensourcerouting.org>2024-05-29 19:13:19 +0200
committerMartin Winter <mwinter@opensourcerouting.org>2024-06-20 12:14:56 +0200
commita761db826c323c1d69eba59db31ac1f53d13e0b4 (patch)
treee8f3f0272b3e2b1b4658523b4fe5b660535e09cd /redhat
parentdebian: Add option to build pkg with grpc support (diff)
downloadfrr-a761db826c323c1d69eba59db31ac1f53d13e0b4.tar.xz
frr-a761db826c323c1d69eba59db31ac1f53d13e0b4.zip
redhat: Add option to build pkg with grpc support
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Diffstat (limited to 'redhat')
-rw-r--r--redhat/frr.spec.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in
index f42079cd5..d6775e6e9 100644
--- a/redhat/frr.spec.in
+++ b/redhat/frr.spec.in
@@ -30,6 +30,7 @@
%{!?with_rtadv: %global with_rtadv 1 }
%{!?with_watchfrr: %global with_watchfrr 1 }
%{!?with_pathd: %global with_pathd 1 }
+%{!?with_grpc: %global with_grpc 0 }
# user and group
%{!?frr_user: %global frr_user frr }
@@ -201,6 +202,12 @@ BuildRequires: python3-devel
BuildRequires: python3-sphinx
%endif
%endif
+%if %{with_grpc}
+BuildRequires: grpc-devel >= 1.16.1
+BuildRequires: protobuf-devel >= 3.6.1
+BuildRequires: protobuf-compiler >= 3.6.1
+BuildRequires: protobuf-c-devel
+%endif
%if 0%{?rhel} > 7
#platform-python-devel is needed for /usr/bin/pathfix.py
BuildRequires: platform-python-devel
@@ -301,6 +308,17 @@ through the AgentX protocol. Provides read-only access to current
routing state through standard SNMP MIBs.
+%if %{with_grpc}
+%package grpc
+Summary: GRPC support for FRR daemons
+Group: System Environment/Daemons
+License: GPLv3+
+Requires: %{name} = %{version}-%{release}
+
+%description grpc
+Adds GRPC support to the individual FRR daemons.
+%endif
+
%prep
%setup -q -n frr-%{frrversion}
@@ -425,6 +443,11 @@ routing state through standard SNMP MIBs.
%else
--disable-pathd \
%endif
+%if %{with_grpc}
+ --enable-grpc \
+%else
+ --disable-grpc \
+%endif
--enable-snmp
# end
@@ -783,6 +806,12 @@ sed -i 's/ -M rpki//' %{_sysconfdir}/frr/daemons
%{_libdir}/frr/modules/*snmp.so
+%if %{with_grpc}
+%files grpc
+%{_libdir}/libfrrgrpc_pb.*
+%{_libdir}/frr/modules/grpc.so
+%endif
+
%files devel
%{_libdir}/lib*.so
%dir %{_includedir}/%{name}