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