]> git.pld-linux.org Git - packages/bird2.git/blame - bird2.spec
- use /etc/bird dir
[packages/bird2.git] / bird2.spec
CommitLineData
b6147e4b
AG
1# Conditional build:
2%bcond_without docs # don't build html docs
3%bcond_without libssh # disable libssh support in RPKI
4%bcond_without mpls_kernel # disable MPLS support in kernel protocol
5#
6Summary: The BIRD Internet Routing Daemon
7Summary(pl.UTF-8): Demon BIRD Internetowego Routingu Dynamicznego
8Name: bird2
9Version: 2.0.10
10Release: 0.1
11License: GPL v2+
12Group: Networking/Daemons
13Source0: https://bird.network.cz/download/bird-%{version}.tar.gz
14# Source0-md5: 1026621839e0162844afa991ad9a7355
15Source1: https://bird.network.cz/download/bird-doc-%{version}.tar.gz
16# Source1-md5: ad099b03849730aa7bd6931b89dae490
17Source2: %{name}.init
18Source3: %{name}.sysconfig
19Source4: %{name}.service
20URL: https://bird.network.cz/
21BuildRequires: autoconf
22BuildRequires: automake
23BuildRequires: bison
24BuildRequires: flex
25%{?with_libssh:BuildRequires: libssh-devel}
26%{?with_docs:BuildRequires: opensp}
27BuildRequires: readline-devel >= 4.2
28BuildRequires: rpmbuild(macros) >= 1.268
29%{?with_docs:BuildRequires: sgmls}
30%{?with_docs:BuildRequires: sgml-tools}
31%{?with_docs:BuildRequires: texlive-format-pdflatex}
32%{?with_docs:BuildRequires: texlive-latex-enumitem}
33%{?with_docs:BuildRequires: texlive-xetex}
34Requires(post,preun): /sbin/chkconfig
35Requires: rc-scripts
36Requires(postun): /usr/sbin/userdel
37Requires(pre): /usr/sbin/useradd
38Obsoletes: bird-ipv4
39Obsoletes: bird-ipv6
40Obsoletes: gated
41Obsoletes: mrt
42Obsoletes: zebra
43Obsoletes: zebra-guile
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
0fb912a0
AG
46%define _sysconfdir /etc/bird
47
b6147e4b
AG
48%description
49The BIRD project is an attempt to create a routing daemon running on
50UNIX-like systems (but not necessarily limited to them) with full
51support of all modern routing protocols, easy to use configuration
52interface and powerful route filtering language.
53
54%description -l pl.UTF-8
55Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
56pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
57protokołów routingu, łatwym interfejsem konfiguracji i językiem
58filtrów o dużych możliwościach.
59
60%prep
61%setup -q -n bird-%{version} -a 1
62
63%build
64cp -f /usr/share/automake/config.* tools
65%{__autoconf}
66
67%configure \
68 --disable-memcheck \
69 --enable-client \
70 %{__enable_disable libssh libssh} \
71 %{__enable_disable mpls_kernel mpls-kernel} \
72
73%{__make}
74%{?with_docs:%{__make} docs}
75
76%install
77rm -rf $RPM_BUILD_ROOT
78install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}} \
79 $RPM_BUILD_ROOT%{systemdunitdir}
80
81%{__make} install \
82 DESTDIR=$RPM_BUILD_ROOT
83
84install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/bird
85install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/bird
86install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/bird.service
87
88%clean
89rm -rf $RPM_BUILD_ROOT
90
91%pre
92%groupadd -g 271 bird
93%useradd -u 271 -d /usr/share/empty -s /bin/false -c "bird routing daemon" -g bird bird
94
95%post
96/sbin/chkconfig --add bird
97%service bird restart "routing daemon"
98%systemd_post bird.service
99
100%preun
101if [ "$1" = "0" ]; then
102 %service bird stop
103 /sbin/chkconfig --del bird
104fi
105%systemd_preun bird.service
106
107%postun
108if [ "$1" = "0" ]; then
109 %userremove bird
110 %groupremove bird
111fi
112%systemd_reload
113
114%files
115%defattr(644,root,root,755)
116%doc %{?with_docs:obj/doc/*.html} doc/reply_codes bird-doc-%{version}/doc/*.pdf ChangeLog NEWS README
0fb912a0 117%dir %{_sysconfdir}
b6147e4b
AG
118%attr(755,root,root) %{_sbindir}/bird
119%attr(755,root,root) %{_sbindir}/birdc
120%attr(755,root,root) %{_sbindir}/birdcl
121%attr(754,root,root) /etc/rc.d/init.d/bird
122%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird
123%attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf
124%{systemdunitdir}/bird.service
This page took 0.118633 seconds and 4 git commands to generate.