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