]> git.pld-linux.org Git - packages/bird.git/blob - bird.spec
- Release up to 2
[packages/bird.git] / bird.spec
1 # TODO:
2 #       - trigger to clean up after old bird package (stop, chkconfig --del)
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)
7 %bcond_with     alien # enable possibility to import 'alien' routes import into bird's routing table
8 #
9 Summary:        The BIRD Internet Routing Daemon
10 Summary(pl.UTF-8):      Demon BIRD Internetowego Routingu Dynamicznego
11 Name:           bird
12 Version:        1.3.0
13 Release:        2
14 License:        GPL v2+
15 Group:          Networking/Daemons
16 Source0:        ftp://bird.network.cz/pub/bird/%{name}-%{version}.tar.gz
17 # Source0-md5:  4836e3b15fcbe03d5dfe467bd4ca98fb
18 Source1:        %{name}-ipv4.init
19 Source2:        %{name}-ipv4.sysconfig
20 Source3:        %{name}-ipv6.init
21 Source4:        %{name}-ipv6.sysconfig
22 Source5:        ftp://bird.network.cz/pub/bird/%{name}-doc-%{version}.tar.gz
23 # Source5-md5:  c99c927430a4ccb07d3317614520caf2
24 Patch0:         %{name}-tinfo.patch
25 %{?with_alien:Patch1:           %{name}-allowalien.patch}
26 URL:            http://bird.network.cz/
27 BuildRequires:  autoconf
28 BuildRequires:  automake
29 BuildRequires:  bison
30 BuildRequires:  flex
31 BuildRequires:  readline-devel >= 4.2
32 BuildRequires:  rpmbuild(macros) >= 1.268
33 Requires(post,preun):   /sbin/chkconfig
34 Requires:       bird-daemon
35 Requires:       rc-scripts
36 Obsoletes:      gated
37 Obsoletes:      mrt
38 Obsoletes:      zebra
39 Obsoletes:      zebra-guile
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 The BIRD project is an attempt to create a routing daemon running on
44 UNIX-like systems (but not necessarily limited to them) with full
45 support of all modern routing protocols, easy to use configuration
46 interface and powerful route filtering language.
47
48 %description -l pl.UTF-8
49 Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
50 pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
51 protokołów routingu, łatwym interfejsem konfiguracji i językiem
52 filtrów o dużych możliwościach.
53
54 %package ipv4
55 Summary:        Routing daemon for IPv4
56 Summary(pl.UTF-8):      Demon dynamicznego routingu IPv4
57 Group:          Networking/Daemons
58 Requires(post,preun):   /sbin/chkconfig
59 Requires:       %{name} = %{version}-%{release}
60 Requires:       rc-scripts
61 Provides:       bird-daemon
62 Provides:       routingdaemon
63 Obsoletes:      gated
64 Obsoletes:      mrt
65 Obsoletes:      zebra
66 Obsoletes:      zebra-guile
67
68 %description ipv4
69 The BIRD project is an attempt to create a routing daemon running on
70 UNIX-like systems (but not necessarily limited to them) with full
71 support of all modern routing protocols, easy to use configuration
72 interface and powerful route filtering language.
73
74 %description ipv4 -l pl.UTF-8
75 Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
76 pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
77 protokołów routingu, łatwym interfejsem konfiguracji i językiem
78 filtrów o dużych możliwościach.
79
80 %package ipv6
81 Summary:        Routing daemon for IPv6
82 Summary(pl.UTF-8):      Demon dynamicznego routingu IPv6
83 Group:          Networking/Daemons
84 Requires(post,preun):   /sbin/chkconfig
85 Requires:       %{name} = %{version}-%{release}
86 Requires:       rc-scripts
87 Provides:       bird-daemon
88 Provides:       routingdaemon
89 Obsoletes:      gated
90 Obsoletes:      mrt
91 Obsoletes:      zebra
92 Obsoletes:      zebra-guile
93
94 %description ipv6
95 The BIRD project is an attempt to create a routing daemon running on
96 UNIX-like systems (but not necessarily limited to them) with full
97 support of all modern routing protocols, easy to use configuration
98 interface and powerful route filtering language.
99
100 %description ipv6 -l pl.UTF-8
101 Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
102 pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
103 protokołów routingu, łatwym interfejsem konfiguracji i językiem
104 filtrów o dużych możliwościach.
105
106 %prep
107 %setup -q -a 5
108 %patch0 -p1
109 %if %{with alien}
110 %patch1 -p1
111 %endif
112
113 %build
114 cp -f /usr/share/automake/config.* tools
115 %{__autoconf}
116
117 export CFLAGS="%{rpmcflags} -I%{_includedir}/ncursesw"
118
119 %if %{with ipv6}
120 %configure \
121         --disable-memcheck \
122         --enable-client \
123         --enable-ipv6
124 %{__make} -j1
125
126 mv bird bird-6
127
128 %{__make} clean
129 %endif
130
131 %if %{with ipv4}
132 %configure \
133         --disable-memcheck \
134         --enable-client \
135         --disable-ipv6
136 %{__make} -j1
137 %endif
138
139 %install
140 rm -rf $RPM_BUILD_ROOT
141 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}}
142
143 install birdc $RPM_BUILD_ROOT%{_sbindir}
144
145 %if %{with ipv6}
146 install bird $RPM_BUILD_ROOT%{_sbindir}
147 install doc/bird.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
148 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv4
149 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv4
150 %endif
151
152 %if %{with ipv6}
153 install bird-6 $RPM_BUILD_ROOT%{_sbindir}
154 cat <<EOF > $RPM_BUILD_ROOT%{_sbindir}/birdc-6
155 #!/bin/sh
156 exec %{_sbindir}/birdc -s /var/run/bird-6.ctl
157 EOF
158 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv6
159 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv6
160 %endif
161
162 %clean
163 rm -rf $RPM_BUILD_ROOT
164
165 %post ipv4
166 /sbin/chkconfig --add %{name}-ipv4
167 %service %{name}-ipv4 restart "routing daemon"
168
169 %preun ipv4
170 if [ "$1" = "0" ]; then
171         %service %{name}-ipv4 stop
172         /sbin/chkconfig --del %{name}-ipv4
173 fi
174
175 %post ipv6
176 /sbin/chkconfig --add %{name}-ipv6
177 %service %{name}-ipv6 restart "routing daemon"
178
179 %preun ipv6
180 if [ "$1" = "0" ]; then
181         %service %{name}-ipv6 stop
182         /sbin/chkconfig --del %{name}-ipv6
183 fi
184
185 %files
186 %defattr(644,root,root,755)
187 %doc doc/*.html doc/reply_codes %{name}-doc-%{version}/doc/*.ps ChangeLog NEWS README TODO
188 %attr(755,root,root) %{_sbindir}/birdc
189
190 %if %{with ipv4}
191 %files ipv4
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{_sbindir}/bird
194 %attr(754,root,root) /etc/rc.d/init.d/bird-ipv4
195 %attr(754,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv4
196 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf
197 %endif
198
199 %if %{with ipv6}
200 %files ipv6
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_sbindir}/bird-6
203 %attr(755,root,root) %{_sbindir}/birdc-6
204 %attr(754,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv6
205 %attr(754,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/rc.d/init.d/bird-ipv6
206 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird-6.conf
207 %endif
This page took 0.124105 seconds and 4 git commands to generate.