]> git.pld-linux.org Git - packages/bird.git/blob - bird.spec
- bcond_with(out) is followed by one \t, then bcond's name.
[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 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 PreReq:         rc-scripts
30 Requires(post,preun):   /sbin/chkconfig
31 Requires:       bird-daemon
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Obsoletes:      gated
34 Obsoletes:      mrt
35 Obsoletes:      zebra
36 Obsoletes:      zebra-guile
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
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):    Demon dynamicznego routingu IPv4
53 Group:          Networking/Daemons
54 PreReq:         rc-scripts
55 Requires(post,preun):   /sbin/chkconfig
56 Provides:       routingdaemon
57 Provides:       bird-daemon
58 Obsoletes:      gated
59 Obsoletes:      mrt
60 Obsoletes:      zebra
61 Obsoletes:      zebra-guile
62 Requires:       %{name} = %{version}-%{release}
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
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):    Demon dynamicznego routingu IPv6
79 Group:          Networking/Daemons
80 PreReq:         rc-scripts
81 Requires(post,preun):   /sbin/chkconfig
82 Provides:       routingdaemon
83 Provides:       bird-daemon
84 Obsoletes:      gated
85 Obsoletes:      mrt
86 Obsoletes:      zebra
87 Obsoletes:      zebra-guile
88 Requires:       %{name} = %{version}-%{release}
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
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 %patch1 -p1
106
107 %build
108 cp -f /usr/share/automake/config.* tools
109
110 %if %{with ipv6}
111 %{__autoconf}
112 %configure \
113         --disable-memcheck \
114         --enable-client \
115         --enable-ipv6
116 %{__make}
117
118 mv bird bird-6
119
120 %{__make} clean
121 %endif
122
123 %if %{with ipv4}
124 %configure \
125         --disable-memcheck \
126         --enable-client \
127         --disable-ipv6
128 %{__make}
129 %endif
130
131 %install
132 rm -rf $RPM_BUILD_ROOT
133 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}}
134
135 install birdc $RPM_BUILD_ROOT%{_sbindir}
136
137 %if %{with ipv6}
138 install bird $RPM_BUILD_ROOT%{_sbindir}
139 install doc/bird.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
140 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv4
141 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv4
142 %endif
143
144 %if %{with ipv6}
145 install bird-6 $RPM_BUILD_ROOT%{_sbindir}
146 cat <<EOF > $RPM_BUILD_ROOT%{_sbindir}/birdc-6
147 #!/bin/sh
148 exec %{_sbindir}/birdc -s /var/run/bird-6.ctl
149 EOF
150 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv6
151 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv6
152 %endif
153
154 %clean
155 rm -rf $RPM_BUILD_ROOT
156
157 %post ipv4
158 /sbin/chkconfig --add %{name}-ipv4 >&2
159
160 if [ -f /var/lock/subsys/%{name}-ipv4 ]; then
161         /etc/rc.d/init.d/%{name}-ipv4 restart >&2
162 else
163         echo "Run '/etc/rc.d/init.d/%{name}-ipv4 start' to start routing deamon." >&2
164 fi
165
166 %preun ipv4
167 if [ "$1" = "0" ]; then
168         if [ -f /var/lock/subsys/%{name}-ipv4 ]; then
169                 /etc/rc.d/init.d/%{name}-ipv4 stop >&2
170         fi
171         /sbin/chkconfig --del %{name}-ipv4 >&2
172 fi
173
174 %post ipv6
175 /sbin/chkconfig --add %{name}-ipv6 >&2
176
177 if [ -f /var/lock/subsys/%{name}-ipv6 ]; then
178         /etc/rc.d/init.d/%{name}-ipv6 restart >&2
179 else
180         echo "Run '/etc/rc.d/init.d/%{name}-ipv6 start' to start routing deamon." >&2
181 fi
182
183 %preun ipv6
184 if [ "$1" = "0" ]; then
185         if [ -f /var/lock/subsys/%{name}-ipv6 ]; then
186                 /etc/rc.d/init.d/%{name}-ipv6 stop >&2
187         fi
188         /sbin/chkconfig --del %{name}-ipv6 >&2
189 fi
190
191 %files
192 %defattr(644,root,root,755)
193 %doc doc/*.html TODO README
194 %attr(755,root,root) %{_sbindir}/birdc
195
196 %if %{with ipv4}
197 %files ipv4
198 %defattr(644,root,root,755)
199 %attr(755,root,root) %{_sbindir}/bird
200 %attr(754,root,root) /etc/rc.d/init.d/bird-ipv4
201 %attr(754,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv4
202 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf
203 %endif
204
205 %if %{with ipv6}
206 %files ipv6
207 %defattr(644,root,root,755)
208 %attr(755,root,root) %{_sbindir}/bird-6
209 %attr(755,root,root) %{_sbindir}/birdc-6
210 %attr(754,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv6
211 %attr(754,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/rc.d/init.d/bird-ipv6
212 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird-6.conf
213 %endif
This page took 0.035476 seconds and 3 git commands to generate.