paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 1 | # configure options |
paul | b64d92a | 2005-04-25 15:13:42 +0000 | [diff] [blame] | 2 | # |
| 3 | # Some can be overriden on rpmbuild commandline with: |
| 4 | # rpmbuild --define 'variable value' |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 5 | # (use any value, ie 1 for flag "with_XXXX" definitions) |
paul | b64d92a | 2005-04-25 15:13:42 +0000 | [diff] [blame] | 6 | # |
Paul Jakma | 283d5d7 | 2016-02-11 13:54:23 +0000 | [diff] [blame] | 7 | # E.g. rpmbuild --define 'release_rev 02' may be useful if building |
| 8 | # rpms again and again on the same day, so the newer rpms can be installed. |
| 9 | # bumping the number each time. |
paul | b64d92a | 2005-04-25 15:13:42 +0000 | [diff] [blame] | 10 | |
paul | 1189075 | 2005-11-05 16:29:54 +0000 | [diff] [blame] | 11 | ####################### Quagga configure options ######################### |
| 12 | # with-feature options |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 13 | %{!?with_snmp: %global with_snmp 1 } |
| 14 | %{!?with_vtysh: %global with_vtysh 1 } |
| 15 | %{!?with_tcp_zebra: %global with_tcp_zebra 0 } |
| 16 | %{!?with_vtysh: %global with_vtysh 1 } |
| 17 | %{!?with_pam: %global with_pam 1 } |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 18 | %{!?with_ospfclient: %global with_ospfclient 1 } |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 19 | %{!?with_ospfapi: %global with_ospfapi 1 } |
| 20 | %{!?with_irdp: %global with_irdp 1 } |
| 21 | %{!?with_rtadv: %global with_rtadv 1 } |
| 22 | %{!?with_isisd: %global with_isisd 1 } |
| 23 | %{!?with_pimd: %global with_pimd 1 } |
Timo Teräs | 2d78fe7 | 2017-02-14 13:07:39 +0200 | [diff] [blame] | 24 | %{!?with_nhrpd: %global with_nhrpd 1 } |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 25 | %{!?with_shared: %global with_shared 1 } |
| 26 | %{!?with_multipath: %global with_multipath 64 } |
| 27 | %{!?quagga_user: %global quagga_user quagga } |
| 28 | %{!?vty_group: %global vty_group quaggavt } |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 29 | %{!?with_fpm: %global with_fpm 0 } |
| 30 | %{!?with_watchquagga: %global with_watchquagga 1 } |
paul | 30b9d89 | 2003-01-18 22:57:15 +0000 | [diff] [blame] | 31 | |
| 32 | # path defines |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 33 | %define _sysconfdir /etc/quagga |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 34 | %define zeb_src %{_builddir}/%{name}-%{quaggaversion} |
paul | 8f75498 | 2003-01-20 04:55:51 +0000 | [diff] [blame] | 35 | %define zeb_rh_src %{zeb_src}/redhat |
| 36 | %define zeb_docs %{zeb_src}/doc |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 37 | |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 38 | # defines for configure |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 39 | %define _localstatedir /var/run/quagga |
paul | 1189075 | 2005-11-05 16:29:54 +0000 | [diff] [blame] | 40 | ############################################################################ |
| 41 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 42 | #### Version String tweak |
| 43 | # Remove invalid characters form version string and replace with _ |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 44 | %{expand: %%global rpmversion %(echo '@VERSION@' | tr [:blank:]- _ )} |
| 45 | %define quaggaversion @VERSION@ |
paul | 1189075 | 2005-11-05 16:29:54 +0000 | [diff] [blame] | 46 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 47 | #### Check version of texi2html |
| 48 | # Old versions don't support "--number-footnotes" option. |
Paul Jakma | 9e31fbc | 2017-02-27 17:43:44 +0000 | [diff] [blame] | 49 | %{expand: %%global texi2htmlversion %(type texi2html >/dev/null 2>&1 && (rpm -q --qf '%%{VERSION}' texi2html | cut -d. -f1) || echo 0 )} |
paul | 1189075 | 2005-11-05 16:29:54 +0000 | [diff] [blame] | 50 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 51 | #### Check for systemd or init.d (upstart) |
| 52 | # Check for init.d (upstart) as used in CentOS 6 or systemd (ie CentOS 7) |
| 53 | %{expand: %%global initsystem %(if [[ `/sbin/init --version 2> /dev/null` =~ upstart ]]; then echo upstart; elif [[ `systemctl` =~ -\.mount ]]; then echo systemd; fi)} |
| 54 | # |
| 55 | # If init system is systemd, then always disable watchquagga |
| 56 | # |
| 57 | %if "%{initsystem}" == "systemd" |
| 58 | # Note: For systems with systemd, watchquagga will NOT be built. Systemd |
| 59 | # takes over the role of restarting crashed processes. Value will |
| 60 | # be overwritten with 0 below for systemd independent on the setting here |
| 61 | %global with_watchquagga 0 |
| 62 | %endif |
paul | 1189075 | 2005-11-05 16:29:54 +0000 | [diff] [blame] | 63 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 64 | # if FPM is enabled, then enable tcp_zebra as well |
| 65 | # |
| 66 | %if %{with_fpm} |
| 67 | %global with_tcp_zebra 1 |
| 68 | %endif |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 69 | |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 70 | # misc internal defines |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 71 | %{!?quagga_uid: %global quagga_uid 92 } |
| 72 | %{!?quagga_gid: %global quagga_gid 92 } |
| 73 | %{!?vty_gid: %global vty_gid 85 } |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 74 | |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 75 | %define daemon_list zebra ripd ospfd bgpd |
paul | 0df63b5 | 2004-11-07 22:12:23 +0000 | [diff] [blame] | 76 | |
David Lamparter | 5460bae | 2015-05-19 00:35:04 +0200 | [diff] [blame] | 77 | %define daemonv6_list ripngd ospf6d |
paul | 0df63b5 | 2004-11-07 22:12:23 +0000 | [diff] [blame] | 78 | |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 79 | %if %{with_isisd} |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 80 | %define daemon_isisd isisd |
paul | 69f5d26 | 2004-10-07 16:23:36 +0000 | [diff] [blame] | 81 | %else |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 82 | %define daemon_isisd "" |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 83 | %endif |
| 84 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 85 | %if %{with_pimd} |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 86 | %define daemon_pimd pimd |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 87 | %else |
| 88 | %define daemon_pimd "" |
| 89 | %endif |
| 90 | |
Timo Teräs | 2d78fe7 | 2017-02-14 13:07:39 +0200 | [diff] [blame] | 91 | %if %{with_nhrpd} |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 92 | %define daemon_nhrpd nhrpd |
Timo Teräs | 2d78fe7 | 2017-02-14 13:07:39 +0200 | [diff] [blame] | 93 | %else |
| 94 | %define daemon_nhrpd "" |
| 95 | %endif |
| 96 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 97 | %if %{with_watchquagga} |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 98 | %define daemon_watchquagga watchquagga |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 99 | %else |
| 100 | %define daemon_watchquagga "" |
| 101 | %endif |
| 102 | |
Timo Teräs | 2d78fe7 | 2017-02-14 13:07:39 +0200 | [diff] [blame] | 103 | %define all_daemons %{daemon_list} %{daemonv6_list} %{daemon_isisd} %{daemon_pimd} %{daemon_nhrpd} %{daemon_watchquagga} |
ajs | b3324e2 | 2004-12-22 17:52:29 +0000 | [diff] [blame] | 104 | |
paul | b5f310c | 2004-09-13 13:15:25 +0000 | [diff] [blame] | 105 | # allow build dir to be kept |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 106 | %{!?keep_build: %global keep_build 0 } |
paul | b5f310c | 2004-09-13 13:15:25 +0000 | [diff] [blame] | 107 | |
paul | 4859e20 | 2005-11-20 02:09:32 +0000 | [diff] [blame] | 108 | #release sub-revision (the two digits after the CONFDATE) |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 109 | %{!?release_rev: %global release_rev 01 } |
paul | 4859e20 | 2005-11-20 02:09:32 +0000 | [diff] [blame] | 110 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 111 | Summary: Routing daemon |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 112 | Name: quagga |
| 113 | Version: %{rpmversion} |
| 114 | Release: @CONFDATE@%{release_rev}%{?dist} |
| 115 | License: GPLv2+ |
| 116 | Group: System Environment/Daemons |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 117 | Source0: https://download.savannah.gnu.org/releases/quagga/%{name}-%{quaggaversion}.tar.gz |
| 118 | URL: https://www.quagga.net |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 119 | Requires: ncurses |
| 120 | Requires(pre): /sbin/install-info |
| 121 | Requires(preun): /sbin/install-info |
| 122 | Requires(post): /sbin/install-info |
| 123 | BuildRequires: texi2html texinfo autoconf patch libcap-devel groff |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 124 | BuildRequires: perl-generators pkgconfig |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 125 | %if %{with_snmp} |
paul | b63cef7 | 2004-08-19 03:36:13 +0000 | [diff] [blame] | 126 | BuildRequires: net-snmp-devel |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 127 | Requires: net-snmp |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 128 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 129 | %if %{with_vtysh} |
paul | 30b9d89 | 2003-01-18 22:57:15 +0000 | [diff] [blame] | 130 | BuildRequires: readline readline-devel ncurses ncurses-devel |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 131 | Requires: ncurses |
paul | d7ccae2 | 2003-01-18 00:24:00 +0000 | [diff] [blame] | 132 | %endif |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 133 | %if %{with_pam} |
| 134 | BuildRequires: pam-devel |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 135 | Requires: pam |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 136 | %endif |
Paul Jakma | 4cdc030 | 2017-03-03 15:07:28 +0000 | [diff] [blame] | 137 | %if %{with_nhrpd} |
| 138 | BuildRequires: c-ares-devel |
| 139 | Requires: c-ares |
| 140 | %endif |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 141 | %if "%{initsystem}" == "systemd" |
| 142 | BuildRequires: systemd |
| 143 | Requires(post): systemd |
| 144 | Requires(preun): systemd |
| 145 | Requires(postun): systemd |
| 146 | %else |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 147 | # Initscripts > 5.60 is required for IPv6 support |
Matti-Oskari Leppänen | fa75585 | 2013-02-15 10:12:55 +0000 | [diff] [blame] | 148 | Requires(pre): initscripts >= 5.60 |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 149 | %endif |
| 150 | Provides: routingdaemon = %{version}-%{release} |
| 151 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 152 | #Obsoletes: mrt zebra quagga-sysvinit |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 153 | |
| 154 | %define __perl_requires %{zeb_rh_src}/quagga-filter-perl-requires.sh |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 155 | |
| 156 | %description |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 157 | Quagga is a free software routing protocol suite. |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 158 | |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 159 | Quagga supports BGP, OSPFv2, OSPFv3, ISIS, RIP, RIPng, PIM-SSM and NHRP. |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 160 | |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 161 | %package contrib |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 162 | Summary: contrib tools for quagga |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 163 | Group: System Environment/Daemons |
| 164 | |
| 165 | %description contrib |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 166 | Contributed/3rd party tools which may be of use with quagga. |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 167 | |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 168 | %package devel |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 169 | Summary: Header and object files for quagga development |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 170 | Group: System Environment/Daemons |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 171 | Requires: %{name} = %{version}-%{release} |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 172 | |
| 173 | %description devel |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 174 | The quagga-devel package contains the header and object files neccessary for |
| 175 | developing OSPF-API and quagga applications. |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 176 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 177 | %prep |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 178 | %setup -q -n quagga-%{quaggaversion} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 179 | |
| 180 | %build |
ajs | 7966b97 | 2004-11-10 22:02:05 +0000 | [diff] [blame] | 181 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 182 | %configure \ |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 183 | --sysconfdir=%{_sysconfdir} \ |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 184 | --libdir=%{_libdir}/quagga \ |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 185 | --libexecdir=%{_libexecdir} \ |
| 186 | --localstatedir=%{_localstatedir} \ |
| 187 | --disable-werror \ |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 188 | %if !%{with_shared} |
| 189 | --disable-shared \ |
| 190 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 191 | %if %{with_snmp} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 192 | --enable-snmp \ |
| 193 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 194 | %if %{with_multipath} |
| 195 | --enable-multipath=%{with_multipath} \ |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 196 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 197 | %if %{with_tcp_zebra} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 198 | --enable-tcp-zebra \ |
| 199 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 200 | %if %{with_vtysh} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 201 | --enable-vtysh \ |
| 202 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 203 | %if %{with_ospfclient} |
paul | 6898008 | 2003-03-25 05:07:42 +0000 | [diff] [blame] | 204 | --enable-ospfclient=yes \ |
| 205 | %else |
| 206 | --enable-ospfclient=no\ |
| 207 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 208 | %if %{with_ospfapi} |
paul | 6898008 | 2003-03-25 05:07:42 +0000 | [diff] [blame] | 209 | --enable-ospfapi=yes \ |
| 210 | %else |
| 211 | --enable-ospfapi=no \ |
| 212 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 213 | %if %{with_irdp} |
paul | 5b81926 | 2004-07-28 14:11:55 +0000 | [diff] [blame] | 214 | --enable-irdp=yes \ |
| 215 | %else |
| 216 | --enable-irdp=no \ |
| 217 | %endif |
paul | e7cd37b | 2005-09-08 15:18:39 +0000 | [diff] [blame] | 218 | %if %{with_rtadv} |
| 219 | --enable-rtadv=yes \ |
| 220 | %else |
| 221 | --enable-rtadv=no \ |
| 222 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 223 | %if %{with_isisd} |
| 224 | --enable-isisd \ |
| 225 | %else |
paul | 69f5d26 | 2004-10-07 16:23:36 +0000 | [diff] [blame] | 226 | --disable-isisd \ |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 227 | %endif |
Timo Teräs | 2d78fe7 | 2017-02-14 13:07:39 +0200 | [diff] [blame] | 228 | %if %{with_nhrpd} |
| 229 | --enable-nhrpd \ |
| 230 | %else |
| 231 | --disable-nhrpd \ |
| 232 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 233 | %if %{with_pam} |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 234 | --with-libpam \ |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 235 | %endif |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 236 | %if 0%{?quagga_user:1} |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 237 | --enable-user=%quagga_user \ |
| 238 | --enable-group=%quagga_user \ |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 239 | %endif |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 240 | %if 0%{?vty_group:1} |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 241 | --enable-vty-group=%vty_group \ |
| 242 | %endif |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 243 | %if %{with_fpm} |
| 244 | --enable-fpm \ |
| 245 | %else |
| 246 | --disable-fpm \ |
| 247 | %endif |
| 248 | %if %{with_watchquagga} |
| 249 | --enable-watchquagga \ |
| 250 | %else |
| 251 | --disable-watchquagga \ |
| 252 | %endif |
| 253 | --enable-gcc-rdynamic |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 254 | |
| 255 | make %{?_smp_mflags} MAKEINFO="makeinfo --no-split" |
| 256 | |
| 257 | pushd doc |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 258 | %if %{texi2htmlversion} < 5 |
| 259 | texi2html --number-sections quagga.texi |
| 260 | %else |
Paul Jakma | e07068c | 2015-09-04 14:25:13 +0100 | [diff] [blame] | 261 | texi2html --number-footnotes --number-sections quagga.texi |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 262 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 263 | popd |
| 264 | |
| 265 | %install |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 266 | mkdir -p %{buildroot}/etc/{quagga,sysconfig,logrotate.d,pam.d} \ |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 267 | %{buildroot}/var/log/quagga %{buildroot}%{_infodir} |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 268 | make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" install |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 269 | |
paul | 9a344b7 | 2003-08-05 23:24:58 +0000 | [diff] [blame] | 270 | # Remove this file, as it is uninstalled and causes errors when building on RH9 |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 271 | rm -rf %{buildroot}/usr/share/info/dir |
paul | 9a344b7 | 2003-08-05 23:24:58 +0000 | [diff] [blame] | 272 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 273 | # install /etc sources |
| 274 | %if "%{initsystem}" == "systemd" |
| 275 | mkdir -p %{buildroot}%{_unitdir} |
| 276 | for daemon in %{all_daemons} ; do |
| 277 | if [ x"${daemon}" != x"" ] ; then |
| 278 | install %{zeb_rh_src}/${daemon}.service \ |
| 279 | %{buildroot}%{_unitdir}/${daemon}.service |
| 280 | fi |
| 281 | done |
| 282 | %else |
| 283 | mkdir -p %{buildroot}/etc/rc.d/init.d |
ajs | b3324e2 | 2004-12-22 17:52:29 +0000 | [diff] [blame] | 284 | for daemon in %{all_daemons} ; do |
paul | da29c6b | 2004-10-08 00:49:09 +0000 | [diff] [blame] | 285 | if [ x"${daemon}" != x"" ] ; then |
| 286 | install %{zeb_rh_src}/${daemon}.init \ |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 287 | %{buildroot}/etc/rc.d/init.d/${daemon} |
paul | da29c6b | 2004-10-08 00:49:09 +0000 | [diff] [blame] | 288 | fi |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 289 | done |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 290 | %endif |
| 291 | |
Paul Jakma | 283d5d7 | 2016-02-11 13:54:23 +0000 | [diff] [blame] | 292 | install -m644 %{zeb_rh_src}/quagga.pam \ |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 293 | %{buildroot}/etc/pam.d/quagga |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 294 | install -m644 %{zeb_rh_src}/quagga.logrotate \ |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 295 | %{buildroot}/etc/logrotate.d/quagga |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 296 | install -m644 %{zeb_rh_src}/quagga.sysconfig \ |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 297 | %{buildroot}/etc/sysconfig/quagga |
| 298 | install -d -m750 %{buildroot}/var/run/quagga |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 299 | |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 300 | |
| 301 | %if 0%{?_tmpfilesdir:1} |
| 302 | install -d -m 755 %{buildroot}/%{_tmpfilesdir} |
| 303 | install -p -m 644 %{zeb_rh_src}/quagga-tmpfs.conf \ |
| 304 | %{buildroot}/%{_tmpfilesdir}/quagga.conf |
| 305 | %endif |
| 306 | |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 307 | %pre |
| 308 | # add vty_group |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 309 | %if 0%{?vty_group:1} |
paul | e7cd37b | 2005-09-08 15:18:39 +0000 | [diff] [blame] | 310 | if getent group %vty_group > /dev/null ; then : ; else \ |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 311 | /usr/sbin/groupadd -r -g %vty_gid %vty_group > /dev/null || : ; fi |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 312 | %endif |
paul | e7cd37b | 2005-09-08 15:18:39 +0000 | [diff] [blame] | 313 | |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 314 | # add quagga user and group |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 315 | %if 0%{?quagga_user:1} |
paul | e7cd37b | 2005-09-08 15:18:39 +0000 | [diff] [blame] | 316 | # Ensure that quagga_gid gets correctly allocated |
| 317 | if getent group %quagga_user >/dev/null; then : ; else \ |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 318 | /usr/sbin/groupadd -g %quagga_gid %quagga_user > /dev/null || : ; \ |
paul | e7cd37b | 2005-09-08 15:18:39 +0000 | [diff] [blame] | 319 | fi |
| 320 | if getent passwd %quagga_user >/dev/null ; then : ; else \ |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 321 | /usr/sbin/useradd -u %quagga_uid -g %quagga_gid -G %vty_group \ |
| 322 | -M -r -s /sbin/nologin -c "Quagga routing suite" \ |
| 323 | -d %_localstatedir %quagga_user 2> /dev/null || : ; \ |
paul | e7cd37b | 2005-09-08 15:18:39 +0000 | [diff] [blame] | 324 | fi |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 325 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 326 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 327 | %post |
paul | 30b9d89 | 2003-01-18 22:57:15 +0000 | [diff] [blame] | 328 | # zebra_spec_add_service <service name> <port/proto> <comment> |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 329 | # e.g. zebra_spec_add_service zebrasrv 2600/tcp "zebra service" |
| 330 | |
| 331 | zebra_spec_add_service () |
| 332 | { |
| 333 | # Add port /etc/services entry if it isn't already there |
paul | 6b637e9 | 2004-10-23 00:48:51 +0000 | [diff] [blame] | 334 | if [ -f /etc/services ] && \ |
| 335 | ! %__sed -e 's/#.*$//' /etc/services | %__grep -wq $1 ; then |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 336 | echo "$1 $2 # $3" >> /etc/services |
| 337 | fi |
| 338 | } |
| 339 | |
| 340 | zebra_spec_add_service zebrasrv 2600/tcp "zebra service" |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 341 | zebra_spec_add_service zebra 2601/tcp "zebra vty" |
| 342 | zebra_spec_add_service ripd 2602/tcp "RIPd vty" |
| 343 | zebra_spec_add_service ripngd 2603/tcp "RIPngd vty" |
| 344 | zebra_spec_add_service ospfd 2604/tcp "OSPFd vty" |
| 345 | zebra_spec_add_service bgpd 2605/tcp "BGPd vty" |
| 346 | zebra_spec_add_service ospf6d 2606/tcp "OSPF6d vty" |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 347 | %if %{with_ospfapi} |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 348 | zebra_spec_add_service ospfapi 2607/tcp "OSPF-API" |
paul | 7021c42 | 2003-07-15 12:52:22 +0000 | [diff] [blame] | 349 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 350 | %if %{with_isisd} |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 351 | zebra_spec_add_service isisd 2608/tcp "ISISd vty" |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 352 | %endif |
Everton Marques | 871dbcf | 2009-08-11 15:43:05 -0300 | [diff] [blame] | 353 | %if %{with_pimd} |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 354 | zebra_spec_add_service pimd 2611/tcp "PIMd vty" |
Everton Marques | 871dbcf | 2009-08-11 15:43:05 -0300 | [diff] [blame] | 355 | %endif |
Timo Teräs | 2d78fe7 | 2017-02-14 13:07:39 +0200 | [diff] [blame] | 356 | %if %{with_nhrpd} |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 357 | zebra_spec_add_service nhrpd 2612/tcp "NHRPd vty" |
Timo Teräs | 2d78fe7 | 2017-02-14 13:07:39 +0200 | [diff] [blame] | 358 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 359 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 360 | %if "%{initsystem}" == "systemd" |
| 361 | for daemon in %all_daemons ; do |
| 362 | %systemd_post ${daemon}.service |
| 363 | done |
| 364 | %else |
| 365 | for daemon in %all_daemons ; do |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 366 | /sbin/chkconfig --add ${daemon} |
| 367 | done |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 368 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 369 | |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 370 | if [ -f %{_infodir}/%{name}.inf* ]; then |
| 371 | /sbin/install-info %{_infodir}/quagga.info %{_infodir}/dir |
| 372 | fi |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 373 | |
| 374 | # Create dummy files if they don't exist so basic functions can be used. |
| 375 | if [ ! -e %{_sysconfdir}/zebra.conf ]; then |
| 376 | echo "hostname `hostname`" > %{_sysconfdir}/zebra.conf |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 377 | %if 0%{?quagga_user:1} |
| 378 | chown %quagga_user:%quagga_user %{_sysconfdir}/zebra.conf* |
paul | e7cd37b | 2005-09-08 15:18:39 +0000 | [diff] [blame] | 379 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 380 | chmod 640 %{_sysconfdir}/zebra.conf |
| 381 | fi |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 382 | for daemon in %{all_daemons} ; do |
| 383 | if [ ! -e %{_sysconfdir}/${daemon}.conf ]; then |
| 384 | touch %{_sysconfdir}/${daemon}.conf |
| 385 | %if 0%{?quagga_user:1} |
| 386 | chown %quagga_user:%quagga_user %{_sysconfdir}/${daemon}.conf* |
| 387 | %endif |
| 388 | fi |
| 389 | done |
| 390 | %if %{with_watchquagga} |
| 391 | # No config for watchquagga - this is part of /etc/sysconfig/quagga |
| 392 | rm -f %{_sysconfdir}/watchquagga.* |
| 393 | %endif |
| 394 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 395 | if [ ! -e %{_sysconfdir}/vtysh.conf ]; then |
| 396 | touch %{_sysconfdir}/vtysh.conf |
| 397 | chmod 640 %{_sysconfdir}/vtysh.conf |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 398 | %if 0%{?vty_group:1} |
| 399 | chown quagga:%{vty_group} %{_sysconfdir}/vtysh.conf* |
| 400 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 401 | fi |
| 402 | |
| 403 | %postun |
ajs | fc43ecc | 2005-01-12 16:41:33 +0000 | [diff] [blame] | 404 | if [ "$1" -ge 1 ]; then |
| 405 | # Find out which daemons need to be restarted. |
ajs | b3324e2 | 2004-12-22 17:52:29 +0000 | [diff] [blame] | 406 | for daemon in %all_daemons ; do |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 407 | if [ -f /var/lock/subsys/${daemon} ]; then |
| 408 | eval restart_${daemon}=yes |
ajs | fc43ecc | 2005-01-12 16:41:33 +0000 | [diff] [blame] | 409 | else |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 410 | eval restart_${daemon}=no |
ajs | fc43ecc | 2005-01-12 16:41:33 +0000 | [diff] [blame] | 411 | fi |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 412 | done |
ajs | fc43ecc | 2005-01-12 16:41:33 +0000 | [diff] [blame] | 413 | # Rename restart flags for daemons handled specially. |
| 414 | running_zebra="$restart_zebra" |
| 415 | restart_zebra=no |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 416 | %if %{with_watchquagga} |
| 417 | running_watchquagga="$restart_watchquagga" |
| 418 | restart_watchquagga=no |
| 419 | %endif |
| 420 | |
| 421 | %if "%{initsystem}" == "systemd" |
| 422 | ## |
| 423 | ## Systemd Version |
| 424 | ## |
| 425 | # No watchquagga for systemd version |
| 426 | # |
| 427 | # Stop all daemons other than zebra. |
| 428 | for daemon in %all_daemons ; do |
| 429 | eval restart=\$restart_${daemon} |
| 430 | [ "$restart" = yes ] && \ |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 431 | %systemd_postun_with_restart ${daemon}.service |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 432 | done |
| 433 | # Restart zebra. |
| 434 | [ "$running_zebra" = yes ] && \ |
| 435 | %systemd_postun_with_restart $daemon.service |
| 436 | # Start all daemons other than zebra. |
| 437 | for daemon in %all_daemons ; do |
| 438 | eval restart=\$restart_${daemon} |
| 439 | [ "$restart" = yes ] && \ |
| 440 | %systemd_post ${daemon}.service |
| 441 | done |
| 442 | %else |
| 443 | ## |
| 444 | ## init.d Version |
| 445 | ## |
| 446 | %if %{with_watchquagga} |
| 447 | # Stop watchquagga first. |
| 448 | [ "$running_watchquagga" = yes ] && \ |
| 449 | /etc/rc.d/init.d/watchquagga stop >/dev/null 2>&1 |
| 450 | %endif |
| 451 | # Stop all daemons other than zebra and watchquagga. |
| 452 | for daemon in %all_daemons ; do |
| 453 | eval restart=\$restart_${daemon} |
| 454 | [ "$restart" = yes ] && \ |
| 455 | /etc/rc.d/init.d/${daemon} stop >/dev/null 2>&1 |
| 456 | done |
| 457 | # Restart zebra. |
| 458 | [ "$running_zebra" = yes ] && \ |
| 459 | /etc/rc.d/init.d/zebra restart >/dev/null 2>&1 |
| 460 | # Start all daemons other than zebra and watchquagga. |
| 461 | for daemon in %all_daemons ; do |
| 462 | eval restart=\$restart_${daemon} |
| 463 | [ "$restart" = yes ] && \ |
| 464 | /etc/rc.d/init.d/${daemon} start >/dev/null 2>&1 |
| 465 | done |
| 466 | %if %{with_watchquagga} |
| 467 | # Start watchquagga last. |
| 468 | # Avoid postun scriptlet error if watchquagga is not running. |
| 469 | [ "$running_watchquagga" = yes ] && \ |
| 470 | /etc/rc.d/init.d/watchquagga start >/dev/null 2>&1 || : |
| 471 | %endif |
| 472 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 473 | fi |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 474 | |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 475 | if [ -f %{_infodir}/%{name}.inf* ]; then |
| 476 | /sbin/install-info --delete %{_infodir}/quagga.info %{_infodir}/dir |
| 477 | fi |
| 478 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 479 | %preun |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 480 | %if "%{initsystem}" == "systemd" |
| 481 | ## |
| 482 | ## Systemd Version |
| 483 | ## |
| 484 | if [ "$1" = "0" ]; then |
| 485 | for daemon in %all_daemons ; do |
| 486 | %systemd_preun ${daemon}.service |
| 487 | done |
| 488 | fi |
| 489 | %else |
| 490 | ## |
| 491 | ## init.d Version |
| 492 | ## |
| 493 | if [ "$1" = "0" ]; then |
| 494 | for daemon in %all_daemons ; do |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 495 | /etc/rc.d/init.d/${daemon} stop >/dev/null 2>&1 |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 496 | /sbin/chkconfig --del ${daemon} |
| 497 | done |
| 498 | fi |
| 499 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 500 | |
| 501 | %clean |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 502 | %if !0%{?keep_build:1} |
| 503 | rm -rf %{buildroot} |
paul | b5f310c | 2004-09-13 13:15:25 +0000 | [diff] [blame] | 504 | %endif |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 505 | |
| 506 | %files |
| 507 | %defattr(-,root,root) |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 508 | %doc */*.sample* AUTHORS COPYING |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 509 | %doc doc/quagga.html |
paul | 30b9d89 | 2003-01-18 22:57:15 +0000 | [diff] [blame] | 510 | %doc doc/mpls |
paul | 8f75498 | 2003-01-20 04:55:51 +0000 | [diff] [blame] | 511 | %doc ChangeLog INSTALL NEWS README REPORTING-BUGS SERVICES TODO |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 512 | %if 0%{?quagga_user:1} |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 513 | %dir %attr(751,%quagga_user,%quagga_user) %{_sysconfdir} |
| 514 | %dir %attr(750,%quagga_user,%quagga_user) /var/log/quagga |
| 515 | %dir %attr(751,%quagga_user,%quagga_user) /var/run/quagga |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 516 | %else |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 517 | %dir %attr(750,root,root) %{_sysconfdir} |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 518 | %dir %attr(750,root,root) /var/log/quagga |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 519 | %dir %attr(750,root,root) /var/run/quagga |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 520 | %endif |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 521 | %if 0%{?vty_group:1} |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 522 | %attr(750,%quagga_user,%vty_group) %{_sysconfdir}/vtysh.conf.sample |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 523 | %endif |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 524 | %{_infodir}/quagga.info.gz |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 525 | %{_mandir}/man*/* |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 526 | %if %{with_watchquagga} |
| 527 | %{_mandir}/man*/watchquagga.* |
| 528 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 529 | %{_sbindir}/zebra |
| 530 | %{_sbindir}/ospfd |
| 531 | %{_sbindir}/ripd |
| 532 | %{_sbindir}/bgpd |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 533 | %if %{with_watchquagga} |
| 534 | %{_sbindir}/watchquagga |
| 535 | %endif |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 536 | %{_sbindir}/ripngd |
| 537 | %{_sbindir}/ospf6d |
Paul Jakma | 283d5d7 | 2016-02-11 13:54:23 +0000 | [diff] [blame] | 538 | %if %{with_pimd} |
| 539 | %{_sbindir}/pimd |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 540 | %endif |
| 541 | %if %{with_isisd} |
| 542 | %{_sbindir}/isisd |
| 543 | %endif |
Timo Teräs | 2d78fe7 | 2017-02-14 13:07:39 +0200 | [diff] [blame] | 544 | %if %{with_nhrpd} |
| 545 | %{_sbindir}/nhrpd |
| 546 | %endif |
paul | 28f7972 | 2004-10-29 05:35:43 +0000 | [diff] [blame] | 547 | %if %{with_shared} |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 548 | %{_libdir}/quagga/lib*.so |
| 549 | %{_libdir}/quagga/lib*.so.? |
| 550 | %attr(755,root,root) %{_libdir}/quagga/lib*.so.?.?.? |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 551 | %endif |
| 552 | %if %{with_vtysh} |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 553 | %{_bindir}/* |
paul | d7ccae2 | 2003-01-18 00:24:00 +0000 | [diff] [blame] | 554 | %endif |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 555 | %config /etc/quagga/[!v]* |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 556 | %if "%{initsystem}" == "systemd" |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 557 | %{_unitdir}/*.service |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 558 | %else |
| 559 | %config /etc/rc.d/init.d/zebra |
| 560 | %if %{with_watchquagga} |
| 561 | %config /etc/rc.d/init.d/watchquagga |
| 562 | %endif |
| 563 | %config /etc/rc.d/init.d/ripd |
| 564 | %config /etc/rc.d/init.d/ospfd |
| 565 | %config /etc/rc.d/init.d/bgpd |
| 566 | %config /etc/rc.d/init.d/ripngd |
| 567 | %config /etc/rc.d/init.d/ospf6d |
| 568 | %if %{with_isisd} |
| 569 | %config /etc/rc.d/init.d/isisd |
| 570 | %endif |
| 571 | %if %{with_pimd} |
| 572 | %config /etc/rc.d/init.d/pimd |
| 573 | %endif |
Timo Teräs | 2d78fe7 | 2017-02-14 13:07:39 +0200 | [diff] [blame] | 574 | %if %{with_nhrpd} |
| 575 | %config /etc/rc.d/init.d/nhrpd |
| 576 | %endif |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 577 | %endif |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 578 | %config(noreplace) /etc/sysconfig/quagga |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 579 | %config(noreplace) /etc/pam.d/quagga |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 580 | %config(noreplace) %attr(640,root,root) /etc/logrotate.d/* |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 581 | %{_tmpfilesdir}/quagga.conf |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 582 | |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 583 | %files contrib |
| 584 | %defattr(-,root,root) |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 585 | %doc AUTHORS COPYING %attr(0644,root,root) tools |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 586 | |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 587 | %files devel |
| 588 | %defattr(-,root,root) |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 589 | %doc AUTHORS COPYING |
paul | da29c6b | 2004-10-08 00:49:09 +0000 | [diff] [blame] | 590 | %if %{with_ospfclient} |
| 591 | %{_sbindir}/ospfclient |
| 592 | %endif |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 593 | %dir %{_libdir}/quagga/ |
| 594 | %{_libdir}/quagga/*.a |
| 595 | %{_libdir}/quagga/*.la |
paul | cfc1842 | 2004-10-23 00:05:41 +0000 | [diff] [blame] | 596 | %dir %attr(755,root,root) %{_includedir}/%{name} |
paul | 28f7972 | 2004-10-29 05:35:43 +0000 | [diff] [blame] | 597 | %{_includedir}/%name/*.h |
paul | cfc1842 | 2004-10-23 00:05:41 +0000 | [diff] [blame] | 598 | %dir %attr(755,root,root) %{_includedir}/%{name}/ospfd |
paul | 28f7972 | 2004-10-29 05:35:43 +0000 | [diff] [blame] | 599 | %{_includedir}/%name/ospfd/*.h |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 600 | %if %{with_ospfapi} |
paul | cfc1842 | 2004-10-23 00:05:41 +0000 | [diff] [blame] | 601 | %dir %attr(755,root,root) %{_includedir}/%{name}/ospfapi |
paul | 28f7972 | 2004-10-29 05:35:43 +0000 | [diff] [blame] | 602 | %{_includedir}/%name/ospfapi/*.h |
paul | 6898008 | 2003-03-25 05:07:42 +0000 | [diff] [blame] | 603 | %endif |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 604 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 605 | %changelog |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 606 | * Mon Feb 27 2017 Paul Jakma <paul@jakma.org> |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 607 | - Apply 0001-systemd-various-service-file-improvements.patch from Fedora |
| 608 | - Review Fedora spec file and sync up with any useful differences, inc: |
| 609 | - Add tmpfiles.d config for Quagga from Fedora |
| 610 | - Add quagga-filter-perl-requires.sh from Fedora. |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 611 | - Move libs to %%{_libdir}/quagga as per Fedora |
Paul Jakma | 9368746 | 2017-02-27 22:42:59 +0000 | [diff] [blame] | 612 | - use systemd_postun_with_restart for postun |
| 613 | |
Paul Jakma | 75ebcd8 | 2017-03-05 10:21:02 +0000 | [diff] [blame^] | 614 | * Tue Feb 14 2017 Timo Teräs <timo.teras@iki.fi> |
Timo Teräs | 2d78fe7 | 2017-02-14 13:07:39 +0200 | [diff] [blame] | 615 | - add nhrpd |
| 616 | |
| 617 | * Thu Feb 11 2016 Paul Jakma <paul@jakma.org> |
Paul Jakma | 283d5d7 | 2016-02-11 13:54:23 +0000 | [diff] [blame] | 618 | - remove with_ipv6 conditionals, always build v6 |
| 619 | - Fix UTF-8 char in spec changelog |
| 620 | - remove quagga.pam.stack, long deprecated. |
| 621 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 622 | * Thu Oct 22 2015 Martin Winter <mwinter@opensourcerouting.org> |
| 623 | - Cleanup configure: remove --enable-ipv6 (default now), --enable-nssa, |
| 624 | --enable-netlink |
| 625 | - Remove support for old fedora 4/5 |
| 626 | - Fix for package nameing |
| 627 | - Fix Weekdays of previous changelogs (bogus dates) |
| 628 | - Add conditional logic to only build tex footnotes with supported texi2html |
| 629 | - Added pimd to files section and fix double listing of /var/lib*/quagga |
| 630 | - Numerous fixes to unify upstart/systemd startup into same spec file |
| 631 | - Only allow use of watchquagga for non-systemd systems. no need with systemd |
| 632 | |
| 633 | * Fri Sep 4 2015 Paul Jakma <paul@jakma.org> |
Paul Jakma | e07068c | 2015-09-04 14:25:13 +0100 | [diff] [blame] | 634 | - buildreq updates |
| 635 | - add a default define for with_pimd |
| 636 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 637 | * Mon Sep 12 2005 Paul Jakma <paul@dishone.st> |
paul | e7cd37b | 2005-09-08 15:18:39 +0000 | [diff] [blame] | 638 | - Steal some changes from Fedora spec file: |
| 639 | - Add with_rtadv variable |
| 640 | - Test for groups/users with getent before group/user adding |
| 641 | - Readline need not be an explicit prerequisite |
| 642 | - install-info delete should be postun, not preun |
| 643 | |
ajs | fc43ecc | 2005-01-12 16:41:33 +0000 | [diff] [blame] | 644 | * Wed Jan 12 2005 Andrew J. Schorr <ajschorr@alumni.princeton.edu> |
| 645 | - on package upgrade, implement careful, phased restart logic |
| 646 | - use gcc -rdynamic flag when linking for better backtraces |
| 647 | |
ajs | b3324e2 | 2004-12-22 17:52:29 +0000 | [diff] [blame] | 648 | * Wed Dec 22 2004 Andrew J. Schorr <ajschorr@alumni.princeton.edu> |
ajs | f393175 | 2004-12-23 00:00:58 +0000 | [diff] [blame] | 649 | - daemonv6_list should contain only IPv6 daemons |
| 650 | |
| 651 | * Wed Dec 22 2004 Andrew J. Schorr <ajschorr@alumni.princeton.edu> |
ajs | b3324e2 | 2004-12-22 17:52:29 +0000 | [diff] [blame] | 652 | - watchquagga added |
| 653 | - on upgrade, all daemons should be condrestart'ed |
| 654 | - on removal, all daemons should be stopped |
| 655 | |
paul | 36002ae | 2004-11-08 17:36:29 +0000 | [diff] [blame] | 656 | * Mon Nov 08 2004 Paul Jakma <paul@dishone.st> |
| 657 | - Use makeinfo --html to generate quagga.html |
| 658 | |
paul | 0df63b5 | 2004-11-07 22:12:23 +0000 | [diff] [blame] | 659 | * Sun Nov 07 2004 Paul Jakma <paul@dishone.st> |
| 660 | - Fix with_ipv6 set to 0 build |
| 661 | |
paul | cfc1842 | 2004-10-23 00:05:41 +0000 | [diff] [blame] | 662 | * Sat Oct 23 2004 Paul Jakma <paul@dishone.st> |
| 663 | - Update to 0.97.2 |
| 664 | |
| 665 | * Sat Oct 23 2004 Andrew J. Schorr <aschorr@telemetry-investments.com> |
| 666 | - Make directories be owned by the packages concerned |
| 667 | - Update logrotate scripts to use correct path to killall and use pid files |
| 668 | |
paul | da29c6b | 2004-10-08 00:49:09 +0000 | [diff] [blame] | 669 | * Fri Oct 08 2004 Paul Jakma <paul@dishone.st> |
| 670 | - Update to 0.97.0 |
| 671 | |
paul | 54b25dc | 2004-09-30 04:56:26 +0000 | [diff] [blame] | 672 | * Wed Sep 15 2004 Paul Jakma <paul@dishone.st> |
| 673 | - build snmp support by default |
| 674 | - build irdp support |
| 675 | - build with shared libs |
| 676 | - devel subpackage for archives and headers |
| 677 | |
paul | 00bc560 | 2004-01-09 16:30:52 +0000 | [diff] [blame] | 678 | * Thu Jan 08 2004 Paul Jakma <paul@dishone.st> |
| 679 | - updated sysconfig files to specify local dir |
| 680 | - added ospf_dump.c crash quick fix patch |
| 681 | - added ospfd persistent interface configuration patch |
| 682 | |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 683 | * Tue Dec 30 2003 Paul Jakma <paul@dishone.st> |
| 684 | - sync to CVS |
| 685 | - integrate RH sysconfig patch to specify daemon options (RH) |
| 686 | - default to have vty listen only to 127.1 (RH) |
| 687 | - add user with fixed UID/GID (RH) |
| 688 | - create user with shell /sbin/nologin rather than /bin/false (RH) |
| 689 | - stop daemons on uninstall (RH) |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 690 | - delete info file on preun, not postun to avoid deletion on upgrade. (RH) |
paul | 15d74e9 | 2003-12-30 11:16:21 +0000 | [diff] [blame] | 691 | - isisd added |
| 692 | - cleanup tasks carried out for every daemon |
| 693 | |
paul | 406f700 | 2003-11-02 07:30:52 +0000 | [diff] [blame] | 694 | * Sun Nov 2 2003 Paul Jakma <paul@dishone.st> |
| 695 | - Fix -devel package to include all files |
| 696 | - Sync to 0.96.4 |
| 697 | |
paul | 6bd8fd3 | 2003-08-12 12:54:13 +0000 | [diff] [blame] | 698 | * Tue Aug 12 2003 Paul Jakma <paul@dishone.st> |
| 699 | - Renamed to Quagga |
| 700 | - Sync to Quagga release 0.96 |
| 701 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 702 | * Thu Mar 20 2003 Paul Jakma <paul@dishone.st> |
paul | edd7c24 | 2003-06-04 13:59:38 +0000 | [diff] [blame] | 703 | - zebra privileges support |
| 704 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 705 | * Tue Mar 18 2003 Paul Jakma <paul@dishone.st> |
paul | e062685 | 2003-03-18 14:11:36 +0000 | [diff] [blame] | 706 | - Fix mem leak in 'show thread cpu' |
| 707 | - Ralph Keller's OSPF-API |
| 708 | - Amir: Fix configure.ac for net-snmp |
| 709 | |
paul | 448ed4a | 2003-03-01 15:43:28 +0000 | [diff] [blame] | 710 | * Sat Mar 1 2003 Paul Jakma <paul@dishone.st> |
| 711 | - ospfd IOS prefix to interface matching for 'network' statement |
| 712 | - temporary fix for PtP and IPv6 |
| 713 | - sync to zebra.org CVS |
| 714 | |
paul | 8f75498 | 2003-01-20 04:55:51 +0000 | [diff] [blame] | 715 | * Mon Jan 20 2003 Paul Jakma <paul@dishone.st> |
| 716 | - update to latest cvs |
| 717 | - Yon's "show thread cpu" patch - 17217 |
| 718 | - walk up tree - 17218 |
| 719 | - ospfd NSSA fixes - 16681 |
| 720 | - ospfd nsm fixes - 16824 |
| 721 | - ospfd OLSA fixes and new feature - 16823 |
| 722 | - KAME and ifindex fixes - 16525 |
| 723 | - spec file changes to allow redhat files to be in tree |
| 724 | |
paul | d7ccae2 | 2003-01-18 00:24:00 +0000 | [diff] [blame] | 725 | * Sat Dec 28 2002 Alexander Hoogerhuis <alexh@ihatent.com> |
| 726 | - Added conditionals for building with(out) IPv6, vtysh, RIP, BGP |
| 727 | - Fixed up some build requirements (patch) |
| 728 | - Added conditional build requirements for vtysh / snmp |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 729 | - Added conditional to files for _bindir depending on vtysh |
paul | d7ccae2 | 2003-01-18 00:24:00 +0000 | [diff] [blame] | 730 | |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 731 | * Mon Nov 11 2002 Paul Jakma <paulj@alphyra.ie> |
| 732 | - update to latest CVS |
| 733 | - add Greg Troxel's md5 buffer copy/dup fix |
| 734 | - add RIPv1 fix |
| 735 | - add Frank's multicast flag fix |
| 736 | |
| 737 | * Wed Oct 09 2002 Paul Jakma <paulj@alphyra.ie> |
| 738 | - update to latest CVS |
| 739 | - timestamped crypt_seqnum patch |
| 740 | - oi->on_write_q fix |
| 741 | |
| 742 | * Mon Sep 30 2002 Paul Jakma <paulj@alphyra.ie> |
| 743 | - update to latest CVS |
| 744 | - add vtysh 'write-config (integrated|daemon)' patch |
| 745 | - always 'make rebuild' in vtysh/ to catch new commands |
| 746 | |
| 747 | * Fri Sep 13 2002 Paul Jakma <paulj@alphyra.ie> |
| 748 | - update to 0.93b |
| 749 | |
| 750 | * Wed Sep 11 2002 Paul Jakma <paulj@alphyra.ie> |
| 751 | - update to latest CVS |
| 752 | - add "/sbin/ip route flush proto zebra" to zebra RH init on startup |
| 753 | |
| 754 | * Sat Aug 24 2002 Paul Jakma <paulj@alphyra.ie> |
| 755 | - update to current CVS |
| 756 | - add OSPF point to multipoint patch |
| 757 | - add OSPF bugfixes |
| 758 | - add BGP hash optimisation patch |
| 759 | |
| 760 | * Fri Jun 14 2002 Paul Jakma <paulj@alphyra.ie> |
| 761 | - update to 0.93-pre1 / CVS |
| 762 | - add link state detection support |
| 763 | - add generic PtP and RFC3021 support |
| 764 | - various bug fixes |
| 765 | |
| 766 | * Thu Aug 09 2001 Elliot Lee <sopwith@redhat.com> 0.91a-6 |
| 767 | - Fix bug #51336 |
| 768 | |
Martin Winter | a5efdb6 | 2015-10-29 22:15:42 -0700 | [diff] [blame] | 769 | * Wed Aug 1 2001 Trond Eivind Glomsrød <teg@redhat.com> 0.91a-5 |
paul | 788cdc6 | 2003-01-18 00:22:08 +0000 | [diff] [blame] | 770 | - Use generic initscript strings instead of initscript specific |
| 771 | ( "Starting foo: " -> "Starting $prog:" ) |
| 772 | |
| 773 | * Fri Jul 27 2001 Elliot Lee <sopwith@redhat.com> 0.91a-4 |
| 774 | - Bump the release when rebuilding into the dist. |
| 775 | |
| 776 | * Tue Feb 6 2001 Tim Powers <timp@redhat.com> |
| 777 | - built for Powertools |
| 778 | |
| 779 | * Sun Feb 4 2001 Pekka Savola <pekkas@netcore.fi> |
| 780 | - Hacked up from PLD Linux 0.90-1, Mandrake 0.90-1mdk and one from zebra.org. |
| 781 | - Update to 0.91a |
| 782 | - Very heavy modifications to init.d/*, .spec, pam, i18n, logrotate, etc. |
| 783 | - Should be quite Red Hat'isque now. |