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