File ptftpd.spec of Package ptftpd

#
# spec file for package ptftpd
#
# # Copyright (c) 2017, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/


Name:           ptftpd
Version:        1.2+git.20161204
Release:        0
Summary:        A TFTP/PXE tool suite written in Python
License:        GPL-3.0
Group:          Development/Languages/Python
URL:            https://github.com/mpetazzoni/ptftpd
Source:         %{name}-%{version}.tar.xz
BuildRequires:  fdupes
BuildRequires:  python-setuptools
Requires:       python-netifaces
Requires:       python-ptftplib
BuildArch:      noarch

%description
pTFTPd is a collection of tools related to TFTP. It includes a TFTP server,
a TFTP client, and a complete PXE solution based on this TFTP server and a
micro-DHCP or BOOTP server. All these tools are written in Python and designed
to be fast, RFC compliant and easy to use.

Available tools include:
 * bootpd : a BOOTP server (RFC951 and RFC1497 compliant)
 * dhcpd : a simple, stripped-down DHCP server.
 * ptftpd : the TFTP server (RFC1350, 2347, 2348 and 2349 compliant)
 * pxed : a one-call PXE server using dhcpd and ptftpd.
 * ptftp : a simple TFTP client (RFC1350, 2347, 2348 and 2349 compliant
   and capable)

%package -n python-ptftplib
Summary:        A TFTP/PXE tool suite written in Python (lib files)
Group:          Development/Languages/Python

%description -n python-ptftplib
pTFTPd is a collection of tools related to TFTP. It includes a TFTP server,
a TFTP client, and a complete PXE solution based on this TFTP server and a
micro-DHCP or BOOTP server. All these tools are written in Python and designed
to be fast, RFC compliant and easy to use.

%prep
%setup -q

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
install -d %{buildroot}/%{_mandir}/man1/
install -m 0644 doc/bootpd.1 %{buildroot}/%{_mandir}/man1/
install -m 0644 doc/dhcpd.1 %{buildroot}/%{_mandir}/man1/
install -m 0644 doc/ptftp.1 %{buildroot}/%{_mandir}/man1/
install -m 0644 doc/ptftpd.1 %{buildroot}/%{_mandir}/man1/
install -m 0644 doc/pxed.1 %{buildroot}/%{_mandir}/man1/
%fdupes %{buildroot}/%{python_sitelib}

%files
%doc AUTHORS COPYING README.rst
%{_mandir}/man1/*.1%{ext_man}
%{_bindir}/bootpd
%{_bindir}/dhcpd
%{_bindir}/ptftp
%{_bindir}/ptftpd
%{_bindir}/pxed

%files -n python-ptftplib
%{python_sitelib}/ptftplib
%{python_sitelib}/ptftpd-1.2-py%{py_ver}.egg-info

%changelog
openSUSE Build Service is sponsored by