Summary: The basic tools for setting up networking.
Summary(ja): ネットワークをセットアップするための基本的なツール
Name: net-tools
Version: 1.60
Release: 15%{?_dist_release}
License: GPL
Group: System Environment/Base

Source0: http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-%{version}.tar.bz2
Source1: net-tools-%{version}-config.h
Source2: net-tools-%{version}-config.make
Source3: ether-wake.c

Patch4: net-tools-1.57-bug22040.patch
Patch5: net-tools-1.60-miiioctl.patch
Patch6: net-tools-1.60-manydevs.patch
Patch7: net-tools-1.60-virtualname.patch
Patch8: net-tools-1.60-cycle.patch
Patch9: net-tools-1.60-x25_sr.patch
Patch10: net-tools-1.60-gcc33.patch
Patch11: net-tools-1.60-label.patch
Patch22: net-tools-1.60-parse.patch
Patch64: net-tools-1.60-ec_hw_null.patch
Patch65: net-tools-1.60-statistics_buffer.patch

# source/patch for Vine
Source100: net-tools-1.60-ja.po
Patch100: net-tools-1.54-japo.patch

BuildRoot: %{_tmppath}/%{name}-root
Vendor: Project Vine
Distribution: Vine Linux

%description
The net-tools package contains the basic tools needed for setting up
networking:  ethers, route and others.

%description -l ja
net-tools パッケージはネットワークをセットアップする基本的なツールを
含んでいます: イーサーネット, ルーティングやその他

%prep
%setup -q
%patch4 -p 1 -b .bug22040
%patch5 -p 1 -b .miiioctl
%patch6 -p 0 -b .manydevs
%patch7 -p 1 -b .virtualname
%patch8 -p 1 -b .cycle
%patch9 -p1 -b .x25
%patch10 -p1 -b .gcc33
%patch11 -p0 -b .label
%patch22 -p1 -b .parse
%patch64 -p1 -b .ex_hw_null
%patch65 -p1 -b .buffer

%patch100 -p1 -b .nls

cp %SOURCE1 ./config.h
cp %SOURCE2 ./config.make
cp %SOURCE3 .
cp %SOURCE100 po/ja.po

%build
make
gcc $RPM_OPT_FLAGS -o ether-wake ether-wake.c

%install
rm -rf $RPM_BUILD_ROOT

make BASEDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install

install -m 755 ether-wake %{buildroot}/sbin

rm %{buildroot}/sbin/rarp
rm %{buildroot}%{_mandir}/man8/rarp.8*

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root)
/bin/*
/sbin/*
%{_mandir}/man[158]/*
%lang(de_DE)	%{_mandir}/de_DE/man[158]/*
%lang(fr_FR)	%{_mandir}/fr_FR/man[158]/*
%lang(pt_BR)	%{_mandir}/pt_BR/man[158]/*

%changelog
* Sat Aug 11 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.60-15vl6
- add patch22, 65 to fix <BTS:1329>

* Wed Apr 13 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.60-14
- rebuild for Vine 6

* Wed Sep 10 2008 Shu KONNO <owa@bg.wakwak.com> 1.60-13vl5
- applied new versioning policy, spec in utf-8
- added net-tools-1.60-label.patch

* Fri Aug 18 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 1.60-12vl2
- add patches to build with current environment
  - x25_sr.patch (patch9)
  - gcc33.patch (patch10)
  - update ether-wake.c (source3)

* Sat May 31 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.60-12vl1
- update and replaced ja.po 
- sync with RedHat Rawhide 1.60-12

  - Fri Feb 07 2003 Phil Knirsch <pknirsch@redhat.com>
  - Fixed -s parameter.
  - Fix /proc statistics for -nic operation.
  - Fixed -i operation in general.

  - Tue Dec 17 2002 Phil Knirsch <pknirsch@redhat.com> 1.60-9
  - Copyright -> License.

  - Tue Aug 06 2002 Phil Knirsch <pknirsch@redhat.com> 
  - Added patch from Norm for a corrected output.

  - Fri Apr 12 2002 Jeremy Katz <katzj@redhat.com>
  - fix nstrcmp() to be correct in the case where there are many devices 
    of the same type, eg, "eth10" > "eth1"  (#61436)

  - Tue Jul 31 2001 Bill Nottingham <notting@redhat.com>
  - do *not* use SIOCDEVPRIVATE for MII ioctls

  - Fri Jun  1 2001 Preston Brown <pbrown@redhat.com>
  - include wake-on-lan wakeup utility, ether-wake by Donald Becker

* Sat May 12 2001 <sagami@vinelinux.org>
- 1.60-4vl1: follow up with RH 1.60-1

* Tue May 23 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
- sync with RH 6.2

* Tue Mar  7 2000 Jeff Johnson <jbj@redhat.com>
- rebuild for sparc baud rates > 38400.

* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
- fix description

* Fri Jan 14 2000 Jeff Johnson <jbj@redhat.com>
- fix "netstat -ci" (#6904).
- document more netstat options (#7429).

* Thu Jan 13 2000 Jeff Johnson <jbj@redhat.com>
- update to 1.54.
- enable "everything but DECnet" including IPv6.

* Mon Oct 11 1999 Norihito Ohmori <ohmori@flatout.org>
- ported from net-tools-1.51 with Japanese catalog
  by Yasuyuki Furukawa

* Sun Aug 29 1999 Jeff Johnson <jbj@redhat.com>
- update to 1.53.

* Wed Jul 28 1999 Jeff Johnson <jbj@redhat.com>
- plug "netstat -c" fd leak (#3620).

* Thu Jun 17 1999 Jeff Johnson <jbj@redhat.com>
- plug potential buffer overruns.

* Sat Jun 12 1999 John Hardin <jhardin@wolfenet.com>
- patch to recognize ESP and GRE protocols for VPN masquerade

* Fri Apr 23 1999 Jeff Johnson <jbj@redhat.com>
- update to 1.52.

* Thu Mar 25 1999 Jeff Johnson <jbj@redhat.com>
- update interface statistics continuously (#1323)

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

* Fri Mar 19 1999 Jeff Johnson <jbj@redhat.com>
- update to 1.51.
- strip binaries.

* Tue Feb  2 1999 Jeff Johnson <jbj@redhat.com>
- update to 1.50.
- added slattach/plipconfig/ipmaddr/iptunnel commands.
- enabled translated man pages.

* Tue Dec 15 1998 Jakub Jelinek <jj@ultra.linux.cz>
- update to 1.49.

* Sat Dec  5 1998 Jeff Johnson <jbj@redhat.com>
- update to 1.48.

* Thu Nov 12 1998 Jeff Johnson <jbj@redhat.com>
- update to 1.47.

* Wed Sep  2 1998 Jeff Johnson <jbj@redhat.com>
- update to 1.46

* Thu Jul  9 1998 Jeff Johnson <jbj@redhat.com>
- build root
- include ethers.5

* Thu Jun 11 1998 Aron Griffis <agriffis@coat.com>
- upgraded to 1.45
- patched hostname.c to initialize buffer
- patched ax25.c to use kernel headers

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

* Fri Feb 27 1998 Jason Spangler <jasons@usemail.com>
- added config patch

* Fri Feb 27 1998 Jason Spangler <jasons@usemail.com>
- changed to net-tools 1.432
- removed old glibc 2.1 patch
 
* Wed Oct 22 1997 Erik Troan <ewt@redhat.com>
- added extra patches for glibc 2.1

* Tue Oct 21 1997 Erik Troan <ewt@redhat.com>
- included complete set of network protocols (some were removed for
  initial glibc work)

* Wed Sep 03 1997 Erik Troan <ewt@redhat.com>
- updated glibc patch for glibc 2.0.5

* Thu Jun 19 1997 Erik Troan <ewt@redhat.com>
- built against glibc
- updated to 1.33