summaryrefslogtreecommitdiffstats
path: root/redhat
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-06-29 01:10:20 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-06-29 01:10:20 +0200
commit4275d86bbd4a4090e1667522b8387e01a83efa68 (patch)
tree618864f1ec8f3fd362b00772a199163bde8eb3ad /redhat
parentMerge pull request #753 from dslicenc/cm16876-ospfv6-mtu (diff)
parentMerge pull request #760 from opensourcerouting/rpm-non-redhat-fix (diff)
downloadfrr-4275d86bbd4a4090e1667522b8387e01a83efa68.tar.xz
frr-4275d86bbd4a4090e1667522b8387e01a83efa68.zip
Merge remote-tracking branch 'origin/stable/2.0'
Diffstat (limited to 'redhat')
-rw-r--r--redhat/frr.spec.in26
1 files changed, 14 insertions, 12 deletions
diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in
index bf4a36297..674ccb2d6 100644
--- a/redhat/frr.spec.in
+++ b/redhat/frr.spec.in
@@ -46,13 +46,17 @@
%{expand: %%global rpmversion %(echo '@VERSION@' | tr [:blank:]- _ )}
%define frrversion @VERSION@
-#### Check version of texi2html
-# Old versions don't support "--number-footnotes" option.
-%{expand: %%global texi2htmlversion %(if [[ -f /usr/bin/texi2html ]]; then /usr/bin/texi2html --version | cut -d. -f1; else echo 0; fi)}
-
#### Check for systemd or init.d (upstart)
# Check for init.d (upstart) as used in CentOS 6 or systemd (ie CentOS 7)
-%{expand: %%global initsystem %(if [[ `/sbin/init --version 2> /dev/null` =~ upstart ]]; then echo upstart; elif [[ `file /sbin/init` =~ "symbolic link to \`../lib/systemd/systemd'" ]]; then echo systemd; elif [[ `systemctl` =~ -\.mount ]]; then echo systemd; fi)}
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210
+ %global initsystem systemd
+%else
+%if (0%{?fedora} && 0%{?fedora} < 15) || (0%{?rhel} && 0%{?rhel} < 7)
+ %global initsystem upstart
+%else
+ %{expand: %%global initsystem %(if [[ `/sbin/init --version 2> /dev/null` =~ upstart ]]; then echo upstart; elif [[ `readlink -f /sbin/init` = /usr/lib/systemd/systemd ]]; then echo systemd; elif [[ `systemctl` =~ -\.mount ]]; then echo systemd; fi)}
+%endif
+%endif
#
# If init system is systemd, then always disable watchfrr
#
@@ -65,10 +69,9 @@
#### Check for RedHat 6.x or CentOS 6.x - they are too old to support PIM.
#### Always disable it on these old systems unconditionally
-%{expand: %%global redhat6 %(if [[ `cat /etc/redhat-release 2> /dev/null` =~ release\ 6\. ]]; then echo 6; else echo 0; fi)}
#
-# if CentOS 6 / RedHat 6, then disable PIMd
-%if "%{redhat6}" == "6"
+# if CentOS / RedHat and version < 7, then disable PIMd (too old, won't work)
+%if 0%{?rhel} && 0%{?rhel} < 7
%global with_pimd 0
%endif
@@ -304,7 +307,6 @@ developing OSPF-API and frr applications.
%else
--disable-bgp-vnc \
%endif
- --enable-gcc-rdynamic \
--enable-isisd=yes \
%if "%{initsystem}" == "systemd"
--enable-systemd=yes \
@@ -314,11 +316,11 @@ developing OSPF-API and frr applications.
make %{?_smp_mflags} MAKEINFO="makeinfo --no-split"
pushd doc
-%if %{texi2htmlversion} < 5
+if [ $(texi2html --version | cut -d. -f1) -lt 5 ]; then
texi2html --number-sections frr.texi
-%else
+else
texi2html --number-footnotes --number-sections frr.texi
-%endif
+fi
popd
%install