Summary:     The routing daemon which maintains routing tables.
Summary(ja): ルーティングテーブルを保持するデーモン
Name: routed
Version: 0.17
Release: 16%{?_dist_release}
License: BSD
Group: System Environment/Daemons
Source: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-devel/netkit-routed-%{version}.tar.bz2
Source1: routed.init
Patch0: netkit-routed-0.16-jbj.patch
Patch1: netkit-routed-0.17-bero.patch
Patch2: netkit-routed-0.17-nonstrip.patch
Prereq: /sbin/chkconfig /etc/init.d
BuildRoot: %{_tmppath}/%{name}-%{version}-root


%description
The routed routing daemon handles incoming RIP traffic and broadcasts
outgoing RIP traffic about network traffic routes, in order to
maintain current routing tables.  These routing tables are essential
for a networked computer, so that it knows where packets need to be
sent.

The routed package should be installed on any networked machine.

%description -l ja
routed ルーティングデーモンは，マシンに入って来たり出てゆく
ネットワーク経路情報である RIP トラフィックを扱い，
ルーティングテーブルを保持します．
ルーティングテーブルはネットワーク接続されたコンピュータにとっては
パケットをどこに送信するべきかを知る上で非常に重要なものです．

routed パッケージはネットワーク接続されたマシンには必ず
インストールされている必要があります．


%prep
%setup -q -n netkit-routed-%{version}
%patch0 -p1 -b .jbj
%patch1 -p1 -b .bero
%patch2 -p1 -b .nonstrip

%build
sh configure
perl -pi -e '
    s,^CC=.*$,CC=cc,;
    s,-O2,\$(RPM_OPT_FLAGS),;
    s,^BINDIR=.*$,BINDIR=%{_bindir},;
    s,^MANDIR=.*$,MANDIR=%{_mandir},;
    s,^SBINDIR=.*$,SBINDIR=%{_sbindir},;
    ' MCONFIG

make


%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
mkdir -p ${RPM_BUILD_ROOT}%{_initdir}

make INSTALLROOT=${RPM_BUILD_ROOT} install
install -m 755 $RPM_SOURCE_DIR/routed.init ${RPM_BUILD_ROOT}%{_initdir}/routed


%clean
rm -rf ${RPM_BUILD_ROOT}


%post
/sbin/chkconfig --add routed


%preun
if [ $1 = 0 ]; then
    /sbin/chkconfig --del routed
fi


%files
%defattr(-,root,root)
%{_sbindir}/routed
#%{_sbindir}/ripquery
%{_mandir}/man8/routed.*
#%{_mandir}/man8/ripquery.*
%config	%{_initdir}/routed


%changelog
* Fri Oct 10 2008 Shu KONNO <owa@bg.wakwak.com> 0.17-16vl5
- applied new versioning policy, spec in utf-8

* Sun Jul 20 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.17-15vl1
- rebuilt with new toolchains
- s/Copyright/License/
- based on 0.17-15 from Rawhide
  - Fri Jul 19 2002 Akira TAGOH <tagoh@redhat.com> 0.17-12
  - netkit-routed-0.17-nonstrip.patch: applied to fix 
    the stripped binary issue.

  - Wed Aug  1 2001 Adrian Havill <havill@redhat.com>
  - init script gettext-friendly fix (bug 26563)

  - Mon Feb  5 2001 Bernhard Rosenkraenzer <bero@redhat.com>
  - i18nize init scripts (#26079)
  - bzip2 source
  - fix "egcs" compiler hardcode in configure script

* Wed Jan 10 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 0.17-5vl1
- based on 0.17-5 from Rawhide
- use better macros (%%{_initdir})
- added Japanese summary and description

* Sat Aug 05 2000 Bill Nottingham <notting@redhat.com>
- condrestart fixes

* Thu Jul 20 2000 Bill Nottingham <notting@redhat.com>
- move initscript back

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Mon Jul 10 2000 Preston Brown <pbrown@redhat.com>
- move initscript

* Sun Jun 18 2000 Jeff Johnson <jbj@redhat.com>
- FHS packaging.
- update to 0.17.

* Thu Feb 10 2000 Jeff Johnson <jbj@redhat.com>
- remove ripquery, the gated ripquery (and gated itself) is preferred.

* Wed Feb  9 2000 Jeff Johnson <jbj@redhat.com>
- init script marked config.

* Mon Feb  7 2000 Jeff Johnson <jbj@redhat.com>
- compress man pages.

* Mon Jan  3 2000 Bill Nottingham <notting@redhat.com>
- fix hang on startup

* Tue Dec 21 1999 Jeff Johnson <jbj@redhat.com>
- update to 0.16.

* Fri Sep 10 1999 Bill Nottingham <notting@redhat.com>
- chkconfig --del in %preun, not %postun

* Mon Aug 16 1999 Bill Nottingham <notting@redhat.com>
- initscript munging

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 14)

* Tue Feb  9 1999 Jeff Johnson <jbj@redhat.com>
- check for /etc/sysconfig/routed before sourcing.

* Tue Dec 22 1998 Jeff Johnson <jbj@redhat.com>
- use stderr if no trace file specified (#423).
- use FD_ISSET not fds_bits (glibc-2.1).

* Tue Jun 16 1998 Jeff Johnson <jbj@redhat.com>
- add offset to get aligned ifreq's on alpha. This should be
  fixed in the kernel eventually.

* Tue May 19 1998 Prospector System <bugs@redhat.com>
- translations modified for de

* Sun May 10 1998 Alan Cox <alan@redhat.com>
- Fixed the trace bug. Traces must now go into /var/log/routed/*

* Mon May 04 1998 Michael K. Johnson <johnsonm@redhat.com>
- Added /etc/sysconfig/routed parsing to init script

* Sat May 02 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Sat May 02 1998 Cristian Gafton <gafton@redhat.com>
- enhanced initscripts

* Tue Oct 28 1997 Erik Troan <ewt@redhat.com>
- fixed init script (wasn't including function library)

* Sun Oct 19 1997 Erik Troan <ewt@redhat.com>
- added init script, chkconfig support

* Tue Jul 15 1997 Erik Troan <ewt@redhat.com>
- initial build
