2018-12-10 18:04:30 +01:00
|
|
|
#
|
|
|
|
# spec file for package bird
|
|
|
|
#
|
2021-03-22 23:16:32 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2018-12-10 18:04:30 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-03-02 14:53:32 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-12-10 18:04:30 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define bird_user bird
|
|
|
|
%define bird_group bird
|
|
|
|
%define bird_home %{_localstatedir}/lib/bird
|
|
|
|
%define bird_runtimedir %{_rundir}/%{name}
|
|
|
|
Name: bird
|
2021-03-22 23:16:32 +01:00
|
|
|
Version: 2.0.8
|
2018-12-10 18:04:30 +01:00
|
|
|
Release: 0
|
2018-12-15 20:42:00 +01:00
|
|
|
Summary: The BIRD Internet Routing Daemon
|
2018-12-10 18:04:30 +01:00
|
|
|
License: GPL-2.0-or-later
|
|
|
|
Group: Productivity/Networking/Routing
|
|
|
|
URL: https://bird.network.cz/
|
|
|
|
Source: ftp://bird.network.cz/pub/bird/bird-%{version}.tar.gz
|
|
|
|
Source1: bird.service
|
|
|
|
Source3: bird.tmpfiles.d
|
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: readline-devel
|
|
|
|
BuildRequires: pkgconfig(systemd)
|
2020-09-26 00:54:13 +02:00
|
|
|
Provides: bird6 = %{version}
|
|
|
|
Provides: bird6:%{_sbindir}/bird6
|
|
|
|
Obsoletes: bird6 < %{version}
|
|
|
|
Provides: bird-common = %{version}
|
|
|
|
Obsoletes: bird-common < %{version}
|
2018-12-10 18:04:30 +01:00
|
|
|
|
|
|
|
%description
|
2018-12-15 20:42:00 +01:00
|
|
|
BIRD is an implementation for routing Internet Protocol packets. IPv4
|
|
|
|
and IPv6 are supported by running separate daemons. It establishes
|
|
|
|
multiple routing tables, and uses BGP, RIP, and OSPF routing
|
|
|
|
protocols, as well as statically defined routes.
|
2018-12-10 18:04:30 +01:00
|
|
|
|
2020-09-26 00:54:13 +02:00
|
|
|
This package holds the IPv4+IPv6 binaries.
|
2018-12-10 18:04:30 +01:00
|
|
|
|
|
|
|
This package holds common files and directories.
|
|
|
|
|
|
|
|
%package doc
|
2018-12-15 20:42:00 +01:00
|
|
|
Summary: Documentation for the BIRD Internet Routing Daemon
|
|
|
|
Group: Documentation/HTML
|
2020-09-26 00:54:13 +02:00
|
|
|
BuildRequires: perl-FindBin-Real
|
2018-12-10 18:04:30 +01:00
|
|
|
|
|
|
|
%description doc
|
2018-12-15 20:42:00 +01:00
|
|
|
BIRD is an implementation for routing Internet Protocol packets.
|
2018-12-10 18:04:30 +01:00
|
|
|
|
|
|
|
This package holds the HTML documentation.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2020-09-26 00:54:13 +02:00
|
|
|
export CFLAGS="${RPM_OPT_FLAGS} -fpic -DPIC -fno-strict-aliasing -Wno-parentheses -Wno-pointer-sign"
|
2018-12-10 18:04:30 +01:00
|
|
|
export LDFLAGS="-Wl,-z,relro -pie"
|
|
|
|
%configure \
|
|
|
|
--with-runtimedir=%{bird_runtimedir}
|
2020-09-26 00:54:13 +02:00
|
|
|
%make_build all
|
|
|
|
# requires linuxdoctools
|
|
|
|
# make docs
|
2018-12-10 18:04:30 +01:00
|
|
|
|
|
|
|
%install
|
2020-09-26 00:54:13 +02:00
|
|
|
%make_install
|
2018-12-10 18:04:30 +01:00
|
|
|
|
|
|
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/bird.service
|
|
|
|
install -D -m 0644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
|
|
|
ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcbird
|
|
|
|
install -D -d -m 0750 %{buildroot}%{bird_home}
|
|
|
|
install -D -d -m 0750 %{buildroot}%{_docdir}/%{name}/
|
|
|
|
|
2020-09-26 00:54:13 +02:00
|
|
|
%check
|
|
|
|
make test
|
|
|
|
|
|
|
|
%pre
|
2018-12-10 18:04:30 +01:00
|
|
|
# Create bird user/group
|
|
|
|
getent group %{bird_group} >/dev/null || groupadd -r %{bird_group}
|
|
|
|
getent passwd %{bird_user} >/dev/null || useradd -r -g %{bird_group} -d %{bird_home} -s /sbin/nologin -c "Bird routing daemon" %{bird_user}
|
|
|
|
%service_add_pre bird.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun bird.service
|
|
|
|
|
|
|
|
%post
|
2020-09-26 00:54:13 +02:00
|
|
|
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf || true
|
2018-12-10 18:04:30 +01:00
|
|
|
%service_add_post bird.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun bird.service
|
|
|
|
|
|
|
|
%files
|
|
|
|
%config(noreplace) %attr(0640,root,%{bird_group}) %{_sysconfdir}/bird.conf
|
|
|
|
%{_sbindir}/bird
|
|
|
|
%{_sbindir}/birdc
|
|
|
|
%{_sbindir}/birdcl
|
|
|
|
%{_sbindir}/rcbird
|
|
|
|
%{_unitdir}/bird.service
|
|
|
|
%dir %attr(750,%{bird_user},%{bird_group}) %{bird_home}
|
|
|
|
%{_tmpfilesdir}/%{name}.conf
|
|
|
|
%dir %attr(-,%{bird_user},%{bird_group}) %ghost %{bird_runtimedir}
|
|
|
|
|
|
|
|
%files doc
|
2020-09-26 00:54:13 +02:00
|
|
|
%doc NEWS README
|
|
|
|
%doc doc/bird.conf.*
|
2018-12-10 18:04:30 +01:00
|
|
|
|
|
|
|
%changelog
|