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