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