X-Git-Url: https://git.proxmox.com/?p=mirror_frr.git;a=blobdiff_plain;f=redhat%2Ffrr.spec.in;h=674ccb2d6fed6048e3f88ad9f48c3ba5c7f7d571;hp=bf4a362972af26e6ea8cdf90d809ba36c2aabbe2;hb=4275d86bbd4a4090e1667522b8387e01a83efa68;hpb=3d07d27345fe5832045632d292ac6cdfabbc75e0 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