]> git.pld-linux.org Git - packages/bird.git/blame - bird.spec
- switch to https
[packages/bird.git] / bird.spec
CommitLineData
587f8625
JK
1# TODO:
2# - trigger to clean up after old bird package (stop, chkconfig --del)
0e72880e
ER
3#
4# Conditional build:
5%bcond_without ipv6 # disable IPv6 support (and building bird-ipv6 package)
6%bcond_without ipv4 # disable IPv4 support (and building bird-ipv4 package)
3c309a5c 7%bcond_with alien # enable possibility to import 'alien' routes import into bird's routing table
0e72880e 8#
46b7240d
TP
9Summary: The BIRD Internet Routing Daemon
10Summary(pl.UTF-8): Demon BIRD Internetowego Routingu Dynamicznego
859a1f4d 11Name: bird
97a5aa47
AM
12Version: 1.6.8
13Release: 1
46b7240d 14License: GPL v2+
859a1f4d 15Group: Networking/Daemons
19154b0e 16Source0: https://bird.network.cz/download/%{name}-%{version}.tar.gz
97a5aa47 17# Source0-md5: abe29a927e21a3d7f8092641f06093c2
587f8625
JK
18Source1: %{name}-ipv4.init
19Source2: %{name}-ipv4.sysconfig
20Source3: %{name}-ipv6.init
21Source4: %{name}-ipv6.sysconfig
19154b0e 22Source5: https://bird.network.cz/download/%{name}-doc-%{version}.tar.gz
97a5aa47 23# Source5-md5: d5b69caeee629479e0261aba18d35758
d84ccda5
JK
24Source6: %{name}-ipv4.service
25Source7: %{name}-ipv6.service
dcb2fa8e 26Patch0: %{name}-allowalien.patch
97a5aa47 27Patch1: gcc.patch
19154b0e 28URL: https://bird.network.cz/
42582df4 29BuildRequires: autoconf
bd9359d2 30BuildRequires: automake
0e8a59db 31BuildRequires: bison
32BuildRequires: flex
1e96d8fe 33BuildRequires: readline-devel >= 4.2
f3122825 34BuildRequires: rpmbuild(macros) >= 1.268
90026ef8 35Requires(post,preun): /sbin/chkconfig
587f8625 36Requires: bird-daemon
f3122825 37Requires: rc-scripts
fc243893
AM
38Requires(postun): /usr/sbin/userdel
39Requires(pre): /usr/sbin/useradd
bd846c8e 40Obsoletes: gated
dab997f5 41Obsoletes: mrt
bd846c8e 42Obsoletes: zebra
43Obsoletes: zebra-guile
f3122825 44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
859a1f4d
AM
45
46%description
47The BIRD project is an attempt to create a routing daemon running on
48UNIX-like systems (but not necessarily limited to them) with full
49support of all modern routing protocols, easy to use configuration
50interface and powerful route filtering language.
51
bf003f25 52%description -l pl.UTF-8
859a1f4d 53Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
bf003f25
JR
54pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
55protokołów routingu, łatwym interfejsem konfiguracji i językiem
56filtrów o dużych możliwościach.
859a1f4d 57
587f8625
JK
58%package ipv4
59Summary: Routing daemon for IPv4
6317c737 60Summary(pl.UTF-8): Demon dynamicznego routingu IPv4
587f8625 61Group: Networking/Daemons
587f8625 62Requires(post,preun): /sbin/chkconfig
f3122825
ER
63Requires: %{name} = %{version}-%{release}
64Requires: rc-scripts
587f8625 65Provides: bird-daemon
f3122825 66Provides: routingdaemon
587f8625
JK
67Obsoletes: gated
68Obsoletes: mrt
69Obsoletes: zebra
70Obsoletes: zebra-guile
587f8625
JK
71
72%description ipv4
73The BIRD project is an attempt to create a routing daemon running on
74UNIX-like systems (but not necessarily limited to them) with full
75support of all modern routing protocols, easy to use configuration
76interface and powerful route filtering language.
77
bf003f25 78%description ipv4 -l pl.UTF-8
587f8625 79Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
bf003f25
JR
80pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
81protokołów routingu, łatwym interfejsem konfiguracji i językiem
82filtrów o dużych możliwościach.
587f8625
JK
83
84%package ipv6
85Summary: Routing daemon for IPv6
6317c737 86Summary(pl.UTF-8): Demon dynamicznego routingu IPv6
587f8625 87Group: Networking/Daemons
587f8625 88Requires(post,preun): /sbin/chkconfig
f3122825
ER
89Requires: %{name} = %{version}-%{release}
90Requires: rc-scripts
587f8625 91Provides: bird-daemon
f3122825 92Provides: routingdaemon
587f8625
JK
93Obsoletes: gated
94Obsoletes: mrt
95Obsoletes: zebra
96Obsoletes: zebra-guile
587f8625
JK
97
98%description ipv6
99The BIRD project is an attempt to create a routing daemon running on
100UNIX-like systems (but not necessarily limited to them) with full
101support of all modern routing protocols, easy to use configuration
102interface and powerful route filtering language.
103
bf003f25 104%description ipv6 -l pl.UTF-8
587f8625 105Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
bf003f25
JR
106pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
107protokołów routingu, łatwym interfejsem konfiguracji i językiem
108filtrów o dużych możliwościach.
587f8625 109
859a1f4d 110%prep
46b7240d 111%setup -q -a 5
dbe442d0 112%{?with_alien:%patch0 -p1}
97a5aa47 113%patch1 -p1
859a1f4d
AM
114
115%build
bd9359d2 116cp -f /usr/share/automake/config.* tools
46b7240d
TP
117%{__autoconf}
118
4a882be4 119export CFLAGS="%{rpmcflags} -I%{_includedir}/ncursesw -fno-strict-aliasing -fno-strict-overflow"
587f8625
JK
120
121%if %{with ipv6}
587f8625 122%configure \
859a1f4d
AM
123 --disable-memcheck \
124 --enable-client \
125 --enable-ipv6
b90dbe4c 126%{__make} -j1
859a1f4d 127
587f8625
JK
128mv bird bird-6
129
130%{__make} clean
131%endif
132
133%if %{with ipv4}
134%configure \
135 --disable-memcheck \
136 --enable-client \
137 --disable-ipv6
b90dbe4c 138%{__make} -j1
587f8625
JK
139%endif
140
859a1f4d
AM
141%install
142rm -rf $RPM_BUILD_ROOT
d84ccda5
JK
143install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}} \
144 $RPM_BUILD_ROOT%{systemdunitdir}
859a1f4d 145
bd846c8e 146install birdc $RPM_BUILD_ROOT%{_sbindir}
147
2770ad60 148%if %{with ipv4}
587f8625 149install bird $RPM_BUILD_ROOT%{_sbindir}
bd846c8e 150install doc/bird.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
587f8625
JK
151install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv4
152install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv4
d84ccda5 153install %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-ipv4.service
587f8625
JK
154%endif
155
156%if %{with ipv6}
157install bird-6 $RPM_BUILD_ROOT%{_sbindir}
158cat <<EOF > $RPM_BUILD_ROOT%{_sbindir}/birdc-6
159#!/bin/sh
c51371c4 160exec %{_sbindir}/birdc -s /var/run/bird6.ctl
587f8625 161EOF
d1aeed34 162:> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}6.conf
587f8625
JK
163install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv6
164install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv6
d84ccda5 165install %{SOURCE7} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-ipv6.service
587f8625 166%endif
bd846c8e 167
e7d0d739
JB
168%clean
169rm -rf $RPM_BUILD_ROOT
170
fc243893
AM
171%pre
172%groupadd -g 271 bird
173%useradd -u 271 -d /usr/share/empty -s /bin/false -c "bird routing daemon" -g bird bird
174
175%postun
176if [ "$1" = "0" ]; then
177 %userremove bird
178 %groupremove bird
179fi
180
587f8625 181%post ipv4
f3122825
ER
182/sbin/chkconfig --add %{name}-ipv4
183%service %{name}-ipv4 restart "routing daemon"
d84ccda5 184%systemd_post %{name}-ipv4.service
7873eba9 185
587f8625 186%preun ipv4
cddbae54 187if [ "$1" = "0" ]; then
f3122825
ER
188 %service %{name}-ipv4 stop
189 /sbin/chkconfig --del %{name}-ipv4
587f8625 190fi
d84ccda5
JK
191%systemd_preun %{name}-ipv4.service
192
193%postun ipv4
194%systemd_reload
587f8625
JK
195
196%post ipv6
f3122825
ER
197/sbin/chkconfig --add %{name}-ipv6
198%service %{name}-ipv6 restart "routing daemon"
d84ccda5 199%systemd_post %{name}-ipv6.service
587f8625
JK
200
201%preun ipv6
202if [ "$1" = "0" ]; then
f3122825
ER
203 %service %{name}-ipv6 stop
204 /sbin/chkconfig --del %{name}-ipv6
cddbae54 205fi
d84ccda5
JK
206%systemd_preun %{name}-ipv6.service
207
208%postun ipv6
209%systemd_reload
859a1f4d 210
4be85d6d 211%triggerpostun ipv4 -- %{name}-ipv4 < 1.3.4-3
2c57648d 212chmod 0640 /etc/bird.conf
8bee0433
AM
213chgrp bird /etc/bird.conf
214
d84ccda5
JK
215%triggerpostun -- %{name}-ipv4 < 1.4.5-2
216%systemd_trigger %{name}-ipv4.service
217
218%triggerpostun -- %{name}-ipv6 < 1.4.5-2
219%systemd_trigger %{name}-ipv6.service
220
859a1f4d 221%files
d889a53b 222%defattr(644,root,root,755)
94972328 223%doc doc/*.html doc/reply_codes %{name}-doc-%{version}/doc/*.pdf ChangeLog NEWS README
587f8625
JK
224%attr(755,root,root) %{_sbindir}/birdc
225
226%if %{with ipv4}
227%files ipv4
859a1f4d 228%defattr(644,root,root,755)
587f8625
JK
229%attr(755,root,root) %{_sbindir}/bird
230%attr(754,root,root) /etc/rc.d/init.d/bird-ipv4
a24fb93f 231%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv4
bf535bdb 232%attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf
d84ccda5 233%{systemdunitdir}/%{name}-ipv4.service
587f8625 234%endif
859a1f4d 235
587f8625
JK
236%if %{with ipv6}
237%files ipv6
238%defattr(644,root,root,755)
239%attr(755,root,root) %{_sbindir}/bird-6
240%attr(755,root,root) %{_sbindir}/birdc-6
a24fb93f
TP
241%attr(754,root,root) /etc/rc.d/init.d/bird-ipv6
242%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv6
d1aeed34 243%attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird6.conf
d84ccda5 244%{systemdunitdir}/%{name}-ipv6.service
587f8625 245%endif
This page took 0.109938 seconds and 4 git commands to generate.