]> git.pld-linux.org Git - packages/atftp.git/blobdiff - atftp.spec
- use %useradd/%groupadd macros
[packages/atftp.git] / atftp.spec
index 31df4bc3cfb3fae78ca6c0836c5911f7fc4a94da..ad9236b0cf70c0db91127fdc37ae7df3d39f2e63 100644 (file)
@@ -4,15 +4,19 @@ Summary(fr):  Client pour le 
 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:       4
 License:       GPL
 Group:         Applications/Networking
-# Source0-md5: 37cfd0e85e401980aaab17da49adb3b9
-Source0:       ftp://ftp.debian.org/debian/pool/main/a/%{name}_%{version}.tar.gz
+Source0:       ftp://ftp.mamalinux.com/pub/atftp/%{name}-%{version}.tar.gz
+# Source0-md5: 3b27365772d918050b2251d98a9c7c82
 Source1:       atftpd.inetd
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libwrap-devel
+BuildRequires: libtool
+BuildRequires: rpmbuild(macros) >= 1.202
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Obsoletes:     tftp-hpa tftp
 
 %description
 The Trivial File Transfer Protocol (TFTP) is normally used only for
@@ -51,6 +55,9 @@ Requires(pre):        /bin/id
 Requires(pre): /usr/sbin/useradd
 Requires(postun):      /usr/sbin/userdel
 Provides:      tftpdaemon
+Provides:      user(tftp)
+Obsoletes:     inetutils-tftpd
+Obsoletes:     tftpd
 Obsoletes:     tftpd-hpa
 Obsoletes:     tftp-server
 Obsoletes:     utftpd
@@ -80,16 +87,20 @@ instalowany tylko wtedy, kiedy zachodzi taka konieczno
 nale¿y on do aplikacji o niskim poziomie bezpieczeñstwa.
 
 %prep
-%setup  -q
+%setup -q
 
 %build
-
-./configure
+rm -f missing
+%{__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}
@@ -103,15 +114,7 @@ install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/tftpd
 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
@@ -125,8 +128,7 @@ 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
+       %userremove tftp
 fi
 
 %files
This page took 0.087039 seconds and 4 git commands to generate.