Summary(pl): Klient TFTP (Trivial File Transfer Protocol)
Summary(tr): Ýlkel dosya aktarým protokolu (TFTP) için sunucu ve istemci
Name: atftp
-Version: 0.6.1.1
-Release: 1
+Version: 0.7
+Release: 7
License: GPL
Group: Applications/Networking
-# Source0-md5: 37cfd0e85e401980aaab17da49adb3b9
-Source0: ftp://ftp.debian.org/debian/pool/main/a/%{name}_%{version}.tar.gz
-Source1: atftpd.inetd
+Source0: ftp://ftp.mamalinux.com/pub/atftp/%{name}-%{version}.tar.gz
+# Source0-md5: 3b27365772d918050b2251d98a9c7c82
+Source1: %{name}d.inetd
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libtool
+BuildRequires: libwrap-devel
+BuildRequires: rpmbuild(macros) >= 1.268
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Obsoletes: tftp-hpa tftp
%description
The Trivial File Transfer Protocol (TFTP) is normally used only for
Summary(pl): Serwer tftp (trivial file transfer protocol)
Summary(tr): Ýlkel dosya aktarým protokolu (TFTP) için sunucu ve istemci
Group: Networking/Daemons
-PreReq: rc-inetd >= 0.8.1
+Requires(postun): /usr/sbin/userdel
Requires(pre): /bin/id
Requires(pre): /usr/sbin/useradd
-Requires(postun): /usr/sbin/userdel
+Requires: rc-inetd >= 0.8.1
Provides: tftpdaemon
-Obsoletes: tftpd-hpa
+Provides: user(tftp)
+Obsoletes: inetutils-tftpd
Obsoletes: tftp-server
+Obsoletes: tftpd
+Obsoletes: tftpd-hpa
Obsoletes: utftpd
%description -n atftpd
nale¿y on do aplikacji o niskim poziomie bezpieczeñstwa.
%prep
-%setup -q
+%setup -q
%build
-
-./configure
+sed -i -e 's#argz.h##g' Makefile*
+rm -f missing argz.h
+%{__libtoolize}
+%{__aclocal}
+%{__automake}
+%{__autoconf}
+%configure
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/{%{_bindir},%{_sbindir},/etc/sysconfig/rc-inetd} \
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},/etc/sysconfig/rc-inetd} \
$RPM_BUILD_ROOT{%{_mandir}/man{1,8},/var/lib/tftp}
install atftpd $RPM_BUILD_ROOT%{_sbindir}
rm -rf $RPM_BUILD_ROOT
%pre -n atftpd
-if [ -n "`id -u tftp 2>/dev/null`" ]; then
- if [ "`id -u tftp`" != "15" ]; then
- echo "Error: user tftp doesn't have uid=15. Correct this before installing tftpd." 1>&2
- exit 1
- fi
-else
- echo "Adding user tftp UID=15."
- /usr/sbin/useradd -u 15 -r -d /var/lib/tftp -s /bin/false -c "TFTP User" -g ftp tftp 1>&2
-fi
+%useradd -u 15 -r -d /var/lib/tftp -s /bin/false -c "TFTP User" -g ftp tftp
%post -n atftpd
-if [ -f /var/lock/subsys/rc-inetd ]; then
- /etc/rc.d/init.d/rc-inetd reload 1>&2
-else
- echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server." 1>&2
-fi
+%service -q rc-inetd reload
%postun -n atftpd
-if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
- /etc/rc.d/init.d/rc-inetd reload
-fi
if [ "$1" = "0" ]; then
- echo "Removing user tftp."
- /usr/sbin/userdel tftp
+ %service -q rc-inetd reload
+ %userremove tftp
fi
%files
%defattr(644,root,root,755)
%doc README FAQ
%attr(755,root,root) %{_sbindir}/*
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rc-inetd/tftpd
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/tftpd
%attr(750,tftp,root) %dir /var/lib/tftp
%{_mandir}/man8/*