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