]> git.pld-linux.org Git - packages/bird.git/blobdiff - bird.spec
- added service reload, rel. 2
[packages/bird.git] / bird.spec
index 569725a27589e55835632117c229f9b5886754e3..6055577d8a0534e943baac722b69f33c5a51cff6 100644 (file)
--- a/bird.spec
+++ b/bird.spec
@@ -1,39 +1,44 @@
-
-%bcond_without ipv6    # disable IPv6 support (and building bird-ipv6 package) 
-%bcond_without ipv4    # disable IPv4 support (and building bird-ipv4 package)
-
 # TODO:
 #      - trigger to clean up after old bird package (stop, chkconfig --del)
-
-Summary:       Routing daemon
-Summary(pl):   Demon dynamicznego routingu
+#
+# Conditional build:
+%bcond_without ipv6    # disable IPv6 support (and building bird-ipv6 package)
+%bcond_without ipv4    # disable IPv4 support (and building bird-ipv4 package)
+%bcond_with    alien   # enable possibility to import 'alien' routes import into bird's routing table
+#
+Summary:       The BIRD Internet Routing Daemon
+Summary(pl.UTF-8):     Demon BIRD Internetowego Routingu Dynamicznego
 Name:          bird
-Version:       1.0.11
-Release:       0.1
-License:       GPL
+Version:       1.3.2
+Release:       2
+License:       GPL v2+
 Group:         Networking/Daemons
 Source0:       ftp://bird.network.cz/pub/bird/%{name}-%{version}.tar.gz
-# Source0-md5: 9f9dfe2af0bde45a0adbbd0ebc36f249
+# Source0-md5: 4fa1fc086799227fc823e15ece046951
 Source1:       %{name}-ipv4.init
 Source2:       %{name}-ipv4.sysconfig
 Source3:       %{name}-ipv6.init
 Source4:       %{name}-ipv6.sysconfig
-Patch0:                %{name}-flex.patch
-Patch1:                %{name}-64bit.patch
+Source5:       ftp://bird.network.cz/pub/bird/%{name}-doc-%{version}.tar.gz
+# Source5-md5: 4c1cf73ccb2f52619e96c8bca4c466df
+Patch0:                %{name}-allowalien.patch
 URL:           http://bird.network.cz/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: bison
 BuildRequires: flex
 BuildRequires: readline-devel >= 4.2
-PreReq:                rc-scripts
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
 Requires:      bird-daemon
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Requires:      rc-scripts
+Requires(postun):      /usr/sbin/userdel
+Requires(pre): /usr/sbin/useradd
 Obsoletes:     gated
 Obsoletes:     mrt
 Obsoletes:     zebra
 Obsoletes:     zebra-guile
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 The BIRD project is an attempt to create a routing daemon running on
@@ -41,25 +46,25 @@ UNIX-like systems (but not necessarily limited to them) with full
 support of all modern routing protocols, easy to use configuration
 interface and powerful route filtering language.
 
-%description -l pl
+%description -l pl.UTF-8
 Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
-pracuj±cego na systemach UNIX z pe³nym wsparciem dla nowoczesnych
-protoko³ów routingu, ³atwym interfejsem konfiguracji i jêzykiem
-filtrów o du¿ych mo¿liwo¶ciach.
+pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
+protokołów routingu, łatwym interfejsem konfiguracji i językiem
+filtrów o dużych możliwościach.
 
 %package ipv4
 Summary:       Routing daemon for IPv4
-Summary(pl):   Demon dynamicznego routingu IPv4
+Summary(pl.UTF-8):     Demon dynamicznego routingu IPv4
 Group:         Networking/Daemons
-PreReq:                rc-scripts
 Requires(post,preun):  /sbin/chkconfig
-Provides:      routingdaemon
+Requires:      %{name} = %{version}-%{release}
+Requires:      rc-scripts
 Provides:      bird-daemon
+Provides:      routingdaemon
 Obsoletes:     gated
 Obsoletes:     mrt
 Obsoletes:     zebra
 Obsoletes:     zebra-guile
-Requires:      %{name} = %{version}-%{release}
 
 %description ipv4
 The BIRD project is an attempt to create a routing daemon running on
@@ -67,25 +72,25 @@ UNIX-like systems (but not necessarily limited to them) with full
 support of all modern routing protocols, easy to use configuration
 interface and powerful route filtering language.
 
-%description ipv4 -l pl
+%description ipv4 -l pl.UTF-8
 Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
-pracuj±cego na systemach UNIX z pe³nym wsparciem dla nowoczesnych
-protoko³ów routingu, ³atwym interfejsem konfiguracji i jêzykiem
-filtrów o du¿ych mo¿liwo¶ciach.
+pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
+protokołów routingu, łatwym interfejsem konfiguracji i językiem
+filtrów o dużych możliwościach.
 
 %package ipv6
 Summary:       Routing daemon for IPv6
-Summary(pl):   Demon dynamicznego routingu IPv6
+Summary(pl.UTF-8):     Demon dynamicznego routingu IPv6
 Group:         Networking/Daemons
-PreReq:                rc-scripts
 Requires(post,preun):  /sbin/chkconfig
-Provides:      routingdaemon
+Requires:      %{name} = %{version}-%{release}
+Requires:      rc-scripts
 Provides:      bird-daemon
+Provides:      routingdaemon
 Obsoletes:     gated
 Obsoletes:     mrt
 Obsoletes:     zebra
 Obsoletes:     zebra-guile
-Requires:      %{name} = %{version}-%{release}
 
 %description ipv6
 The BIRD project is an attempt to create a routing daemon running on
@@ -93,27 +98,28 @@ UNIX-like systems (but not necessarily limited to them) with full
 support of all modern routing protocols, easy to use configuration
 interface and powerful route filtering language.
 
-%description ipv6 -l pl
+%description ipv6 -l pl.UTF-8
 Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
-pracuj±cego na systemach UNIX z pe³nym wsparciem dla nowoczesnych
-protoko³ów routingu, ³atwym interfejsem konfiguracji i jêzykiem
-filtrów o du¿ych mo¿liwo¶ciach.
+pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
+protokołów routingu, łatwym interfejsem konfiguracji i językiem
+filtrów o dużych możliwościach.
 
 %prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
+%setup -q -a 5
+%{?with_alien:%patch0 -p1}
 
 %build
 cp -f /usr/share/automake/config.* tools
+%{__autoconf}
+
+export CFLAGS="%{rpmcflags} -I%{_includedir}/ncursesw"
 
 %if %{with ipv6}
-%{__autoconf}
 %configure \
        --disable-memcheck \
        --enable-client \
        --enable-ipv6
-%{__make}
+%{__make} -j1
 
 mv bird bird-6
 
@@ -125,7 +131,7 @@ mv bird bird-6
        --disable-memcheck \
        --enable-client \
        --disable-ipv6
-%{__make}
+%{__make} -j1
 %endif
 
 %install
@@ -154,43 +160,39 @@ install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv6
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post ipv4
-/sbin/chkconfig --add %{name}-ipv4 >&2
+%pre
+%groupadd -g 271 bird
+%useradd -u 271 -d /usr/share/empty -s /bin/false -c "bird routing daemon" -g bird bird
 
-if [ -f /var/lock/subsys/%{name}-ipv4 ]; then
-       /etc/rc.d/init.d/%{name}-ipv4 restart >&2
-else
-       echo "Run '/etc/rc.d/init.d/%{name}-ipv4 start' to start routing deamon." >&2
+%postun
+if [ "$1" = "0" ]; then
+       %userremove bird
+       %groupremove bird
 fi
 
+%post ipv4
+/sbin/chkconfig --add %{name}-ipv4
+%service %{name}-ipv4 restart "routing daemon"
+
 %preun ipv4
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/%{name}-ipv4 ]; then
-               /etc/rc.d/init.d/%{name}-ipv4 stop >&2
-       fi
-       /sbin/chkconfig --del %{name}-ipv4 >&2
+       %service %{name}-ipv4 stop
+       /sbin/chkconfig --del %{name}-ipv4
 fi
 
 %post ipv6
-/sbin/chkconfig --add %{name}-ipv6 >&2
-
-if [ -f /var/lock/subsys/%{name}-ipv6 ]; then
-       /etc/rc.d/init.d/%{name}-ipv6 restart >&2
-else
-       echo "Run '/etc/rc.d/init.d/%{name}-ipv6 start' to start routing deamon." >&2
-fi
+/sbin/chkconfig --add %{name}-ipv6
+%service %{name}-ipv6 restart "routing daemon"
 
 %preun ipv6
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/%{name}-ipv6 ]; then
-               /etc/rc.d/init.d/%{name}-ipv6 stop >&2
-       fi
-       /sbin/chkconfig --del %{name}-ipv6 >&2
+       %service %{name}-ipv6 stop
+       /sbin/chkconfig --del %{name}-ipv6
 fi
 
 %files
 %defattr(644,root,root,755)
-%doc doc/*.html TODO README
+%doc doc/*.html doc/reply_codes %{name}-doc-%{version}/doc/*.ps ChangeLog NEWS README TODO
 %attr(755,root,root) %{_sbindir}/birdc
 
 %if %{with ipv4}
@@ -198,7 +200,7 @@ fi
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/bird
 %attr(754,root,root) /etc/rc.d/init.d/bird-ipv4
-%attr(754,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv4
+%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv4
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf
 %endif
 
@@ -207,7 +209,7 @@ fi
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/bird-6
 %attr(755,root,root) %{_sbindir}/birdc-6
-%attr(754,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv6
-%attr(754,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/rc.d/init.d/bird-ipv6
+%attr(754,root,root) /etc/rc.d/init.d/bird-ipv6
+%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv6
 #%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird-6.conf
 %endif
This page took 0.117437 seconds and 4 git commands to generate.