Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > main-src > by-pkgid > 3b83b4d6ead9b064ca309a12148fa47f > files > 5

tftp-0.17-7mdk.src.rpm

%define version 0.17
%define release 7mdk
%define hpa_ver	0.20
%define url 	ftp://ftp.uk.linux.org/pub/linux/Networking/netkit

Summary: 	The client and server for the Trivial File Transfer Protocol (TFTP).
Name: 		tftp
Version: 	%version
Release: 	%release
License: 	BSD
Group: 		System/Servers
URL:		ftp://ftp.uk.linux.org/pub/linux/Networking/netkit
Source:		ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-tftp-%{version}.tar.bz2
Source1: 	http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{hpa_ver}.tar.bz2
Source2: 	tftp-xinetd
Patch0: 	tftp-netkit-tftp-0.17-segsize.patch.bz2
BuildRoot: 	%{_tmppath}/%{name}-root

%description
The Trivial File Transfer Protocol (TFTP) is normally used only for
booting diskless workstations.  The tftp package provides the user
interface for TFTP, which allows users to transfer files to and from
a remote machine.  This program, and TFTP, provide very little security,
and should not be enabled unless it is expressly needed. 

%package server
Group: System/Servers
Summary: The server for the Trivial File Transfer Protocol (TFTP).
Requires: xinetd

%description server
The Trivial File Transfer Protocol (TFTP) is normally used only for
booting diskless workstations.  The tftp-server package provides the
server for TFTP, which allows users to transfer files to and from a
remote machine. TFTP provides very little security, and should not be
enabled unless it is expressly needed.  The TFTP server is run from
/etc/xinetd.d/tftp, and is disabled by default on a Mandrake Linux
systems.

%prep
%setup -q -n netkit-tftp-%{version} -a 1
%patch0 -p1

chmod +x  tftp-hpa-%{hpa_ver}/configure

%build

%serverbuild

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

%make

cd tftp-hpa-%{hpa_ver}
sh configure --prefix=/usr
perl -pi -e '
    s,^CC=.*$,CC=cc,;
    s,^BINDIR=.*$,BINDIR=%{_bindir},;
    s,^MANDIR=.*$,MANDIR=%{_mandir},;
    s,^SBINDIR=.*$,SBINDIR=%{_sbindir},;
    ' MCONFIG

%make -C tftpd

%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,8}
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}

make INSTALLROOT=${RPM_BUILD_ROOT} install
make -C tftp-hpa-%{hpa_ver}/tftpd INSTALLROOT=${RPM_BUILD_ROOT} \
    SBINDIR=%{_sbindir} MANDIR=%{_mandir} \
	install
install -m755 -d ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/
install -m644 ${RPM_SOURCE_DIR}/tftp-xinetd ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/tftp

%post server
%_post_service %{name}

%preun server
%_preun_service %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_bindir}/tftp
%{_mandir}/man1/*

%files server
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/xinetd.d/tftp
%{_sbindir}/in.tftpd
%{_mandir}/man8/*

%changelog
* Fri Oct 05 2001 Yves Duret <yduret@mandrakesoft.com> 0.17-7mdk
- s#Linux-?Mandrake#Mandrake Linux# for our new com policy

* Thu Aug 09 2001 Yves Duret <yduret@mandrakesoft.com> 0.17-6mdk
- updated tftp-hpa source to version 0.20
- merged with rh patches

* Mon Jul  2 2001 Yves Duret <yduret@mandrakesoft.com> 0.17-5mdk
- macros
- s#Copyright#License#

* Wed Apr  4 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.17-4mdk
- server_macros_zification.
- Add proto=udp for xinetd.
- Add rh patch on hpa tftp.

* Wed Mar 21 2001 Pixel <pixel@mandrakesoft.com> 0.17-3mdk
- tftp doesn't require xinetd, only tftp-server does

* Sat Sep 23 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.17-2mdk
- Add hpa version of tftp.
- Add xinetd support.
- Split server and client.

* Fri Aug 04 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.17-1mdk
- rebuild with shiny new version
- _sbindir_ macro

* Fri Jul 21 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.16-3mdk
- macros, BM, _spechelper_

* Mon Apr 17 2000 Jeff Garzik <jgarzik@mandrakesoft.com> 0.16-2mdk
- fix changelog, blame me not Chris Molnar for damage...

* Mon Apr 17 2000 Jeff Garzik <jgarzik@mandrakesoft.com> 0.16-1mdk
- version 0.16
- fixed Source URL
- added documentation

* Mon Apr 10 2000 Christopher Molnar <molnarc@mandrakesoft.com> 0.15-2mdk
- Fixed groups

* Sat Nov 06 1999 John Buswell <johnb@mandrakesoft.com>
- 0.15
- Removed version dependencies from spec file
- Build Release

* Wed May 05 1999 Bernhard Rosenkraenzer <bero@mandrakesoft.com>
- Mandrake adaptions

* Wed Apr  7 1999 Jeff Johnson <jbj@redhat.com>
- tftpd should truncate file when overwriting (#412)

* 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.

* Fri Aug  7 1998 Jeff Johnson <jbj@redhat.com>
- build root

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

* Mon Sep 22 1997 Erik Troan <ewt@redhat.com>
- added check for getpwnam() failure

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