Summary: The standard UNIX FTP (File Transfer Protocol) client.
Summary(ja): 標準的な UNIX FTP (ファイル転送プロトコル) クライアント
Name: ftp
Version: 0.17
Release: 33%{?_dist_release}
License: BSD
Group: Applications/Internet
Source0: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-devel/netkit-ftp-%{version}.tar.bz2
Patch1: netkit-ftp-0.17-pre20000412.pasv-security.patch
Patch2: netkit-ftp-0.17-acct.patch
Patch3: netkit-ftp.usagi-ipv6.patch
Patch4: netkit-ftp-0.17-segv.patch
Patch5: netkit-ftp-0.17-volatile.patch
Patch6: netkit-ftp-0.17-runique_mget.patch
Patch7: netkit-ftp-locale.patch
Patch8: netkit-ftp-0.17-printf.patch
Patch9: netkit-ftp-0.17-longint.patch
Patch10: netkit-ftp-0.17-vsftp165083.patch
Patch11: netkit-ftp-0.17-C-Frame121.patch
Patch12: netkit-ftp-0.17-data.patch
Patch13: netkit-ftp-0.17-multihome.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gcc, glibc-devel, readline-devel, ncurses-devel, perl

%description
The ftp package provides the standard UNIX command-line FTP (File
Transfer Protocol) client.  FTP is a widely used protocol for
transferring files over the Internet and for archiving files.

If your system is on a network, you should install ftp in order to do
file transfers.

%description -l ja
この ftp パッケージは標準的な UNIX コマンドラインベースの FTP (フ
ァイル転送プロトコル) クライアントです。FTP はインターネット経由で
ファイルを転送したり、ファイルを格納したりするのに広く使われている
プロトコルです。

もしあなたのシステムがネットワークに接続されていて、そこにファイ
ルを転送したい場合は、このパッケージをインストールして下さい。

%prep
%setup -q -n netkit-ftp-%{version}
%patch1 -p1
%patch2 -p1 -b .acct
%patch3 -p1 -b .ipv6
%patch4 -p1 -b .segv
%patch5 -p1 -b .volatile
%patch6 -p1 -b .runique_mget
%patch7 -p1 -b .locale
%patch8 -p1 -b .printf
%patch9 -p1 -b .longint
%patch10 -p1 -b .vsftp165083
%patch11 -p1 -b .C-Frame121
%patch12 -p1 -b .data
%patch13 -p1 -b .multihome


%build
sh configure --with-c-compiler=gcc --enable-ipv6
perl -pi -e '
    s,^CC=.*$,CC=cc,;
    s,-O2,\$(RPM_OPT_FLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,;
    s,^BINDIR=.*$,BINDIR=%{_bindir},;
    s,^MANDIR=.*$,MANDIR=%{_mandir},;
    s,^SBINDIR=.*$,SBINDIR=%{_sbindir},;
    ' MCONFIG

make %{?_smp_mflags}


%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man5

make INSTALLROOT=${RPM_BUILD_ROOT} install


%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%{_bindir}/ftp
%{_bindir}/pftp
%{_mandir}/man1/ftp.*
%{_mandir}/man1/pftp.*
%{_mandir}/man5/netrc.*


%changelog
* Tue Aug  5 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.17-33
- rebuilt with readline 5.2
- applied new versioning policy
- spec in UTF-8

* Sat Apr 15 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.17-32vl1
- rebuilt with readline 5.1
- added patches(9-13) from Fedora
  * Thu Jan 12 2006 Petr Raszyk <praszyk@redhat.com> - 0.17-32
  - support for multi-homed clients
    See #171621, netkit-ftp-0.17-multihome.patch
  * Fri Dec 2 2005 Petr Raszyk <praszyk@redhat.com> - 0.17-31
  - ftp does not close socket descriptor (if the remote file
    does not exist).
    See #174599, netkit-ftp-0.17-data.patch
  * Wed Oct 26 2005 Petr Raszyk <praszyk@redhat.com> - 0.17-30
  - The patch netkit-ftp-0.17-C-Frame121.patch adds some
    comments/hints for C-Frame 121. It can be removed any time.
  * Tue Aug 30 2005 Petr Raszyk <praszyk@redhat.com> - 0.17-28
  - This 'hack' will avoid a bug in ftp-server
    (  < vsftpd-2.0.1-5   ). See #165083 (server prints the 
    '150 FILE:...' line twice).
    This patch can be (later ?) removed. 
  * Mon Aug 22 2005 Petr Raszyk <praszyk@redhat.com> - 0.17-27
  - overflow using 'hash mode' (printing '#' but
    not reading data from network - #79367)

* Sat May 28 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.17-26vl1
- added patches from Fedora
  * Tue May 24 2005 Miloslav Trmac <mitr@redhat.com> - 0.17-26
  - Fix passive mode with SELinux (#158234, patch by Nalin Dahyabhai)
  - Fix format string mismatch
  * Wed Dec 15 2004 Tim Waugh <twaugh@redhat.com>
  - Call setlocale() so that readline works correctly (bug #142265).
  * Tue Dec  7 2004 Thomas Woerner <twoerner@redhat.com> 0.17-23
  - fixed mget with runique (#79367)
  * Mon Jun 14 2004 Alan Cox <alan@redhat.com>
  - Re-arranged some totally bogus old bezerkly code that could
    segfault ftp on connection loss. (BZ #122295)
- added Japanese summary and description from spec translation project

* Wed Apr 02 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 0.17-15vl2
- rebuild with readline-4.3

* Wed Dec 04 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.17-15vl1
- based on 0.17-15 from Rawhide and built for Vine Linux

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Fri Apr 12 2002 Bernhard Rosenkraenzer <bero@redhat.com> 0.17-13
- Recompile with support for files > 2 GB

* Mon Jun 25 2001 Bernhard Rosenkraenzer <bero@redhat.com> 0.17-12
- Add some Build dependencies (#45007)

* Fri May 18 2001 Bernhard Rosenkraenzer <bero@redhat.com> 0.17-11
- Actually apply Patch #3

* Fri May 11 2001 Bernhard Rosenkraenzer <bero@redhat.com> 0.17-10
- Rebuild with new readline

* Sun Apr 15 2001 Bernhard Rosenkraenzer <bero@redhat.com>
- Add IPv6 patch (RFE #35642)

* Wed Apr  4 2001 Jakub Jelinek <jakub@redhat.com>
- don't let configure to guess compiler, it can pick up egcs

* Sun Jan 21 2001 Bernhard Rosenkraenzer <bero@redhat.com>
- Update to 0.17 final
- Fix up ACCT support in netrc (Bug #17353)

* Wed Aug 16 2000 Philipp Knirsch <pknirsch@redhat.com>
- Switched the default transfer protocol from PORT to PASV as proposed on
  bugzilla (#16134)
- Fixed a small compiler warning in ftp.c line 886

* Fri Jul 14 2000 Jeff Johnson <jbj@redhat.com>
- add netrc man page (#7443).
- fix possible buffer overflows in ftp client.

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

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

* Wed Apr  5 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- rebuild with current libreadline

* Fri Mar 24 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- 0.17

* Fri Feb  4 2000 Bill Nottingham <notting@redhat.com>
- handle compressed man pages

* Tue Jan  4 2000 Bill Nottingham <notting@redhat.com>
- the ftp client does not require inetd

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

* Mon Aug 30 1999 Jeff Johnson <jbj@redhat.com>
- update to 0.15.
- enable readline support (#3796).

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

* Mon Mar 15 1999 Jeff Johnson <jbj@redhat.com>
- compile for 6.0.

* Tue Aug 11 1998 Jeff Johnson <jbj@redhat.com>
- build root

* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr