68fac4
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
68fac4
68fac4
#====================================================================#
68fac4
68fac4
Name:           python-netaddr
68fac4
Version:        0.7.5
68fac4
Release:        9%{?dist}
68fac4
Summary:        A pure Python network address representation and manipulation library
68fac4
68fac4
Group:          Development/Libraries
68fac4
License:        BSD
68fac4
URL:            http://github.com/drkjam/netaddr
68fac4
Source0:        http://github.com/downloads/drkjam/netaddr/netaddr-%{version}.tar.gz
68fac4
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
68fac4
68fac4
BuildArch:      noarch
68fac4
BuildRequires:  python-devel >= 2.4
68fac4
68fac4
Patch0:         0001-Fixed-github-Issue-no.-2.-Thanks-keesbos.patch
68fac4
Patch1:         0002-Exclude-39.0.0.0-8-network-from-reserved-set.patch
68fac4
Patch2:         0003-Adapt-IPV4_RESERVED-according-to-RFC-5735-Appendix-A.patch
68fac4
Patch3:         0004-Add-range-from-RFC-6598.patch
68fac4
Patch4:         0005-Add-range-from-RFC-6890.patch
68fac4
Patch5:         0006-Add-range-from-RFC-2544.patch
68fac4
Patch6:         0007-Add-range-from-RFC-5737.patch
68fac4
Patch7:         0008-Move-some-from-IPV4_PRIVATE-to-IPV4_RESERVED.patch
68fac4
Patch8:         0009-Fixed-71.-Updated-IPv4-reserved-networks.patch
68fac4
68fac4
68fac4
%description
68fac4
A pure Python network address representation and manipulation library.
68fac4
68fac4
netaddr provides a Pythonic way of working with :-
68fac4
68fac4
- IPv4 and IPv6 addresses and subnets
68fac4
- MAC addresses, OUI and IAB identifiers, IEEE EUI-64 identifiers
68fac4
- arbitrary (non-aligned) IP address ranges and IP address sets
68fac4
- various non-CIDR IP range formats such as nmap and glob-style formats
68fac4
68fac4
Included are routines for :-
68fac4
68fac4
- generating, sorting and summarizing IP addresses and networks
68fac4
- performing easy conversions between address notations and formats
68fac4
- detecting, parsing and formatting network address representations
68fac4
- performing set-based operations on groups of IP addresses and subnets
68fac4
- working with arbitrary IP address ranges and formats
68fac4
- accessing OUI and IAB organisational information published by IEEE
68fac4
- accessing IP address and block information published by IANA
68fac4
68fac4
For details on the latest updates and changes, see :-
68fac4
68fac4
    http://github.com/drkjam/netaddr/blob/rel-0.7.x/CHANGELOG
68fac4
68fac4
API documentation for the latest release is available here :-
68fac4
68fac4
    http://packages.python.org/netaddr/
68fac4
68fac4
68fac4
%prep
68fac4
%setup -q -n netaddr-%{version}
68fac4
68fac4
%patch0 -p1 -b .invalid_ip_network
68fac4
%patch1 -p1
68fac4
%patch2 -p1
68fac4
%patch3 -p1
68fac4
%patch4 -p1
68fac4
%patch5 -p1
68fac4
%patch6 -p1
68fac4
%patch7 -p1
68fac4
%patch8 -p1
68fac4
68fac4
# Make rpmlint happy, get rid of DOS line endings
68fac4
%{__sed} -i 's/\r//' netaddr/*.py
68fac4
%{__sed} -i 's/\r//' netaddr/ip/*.py
68fac4
%{__sed} -i 's/\r//' netaddr/eui/*.idx
68fac4
68fac4
# Make rpmlint happy, rip out python shebang lines from most python
68fac4
# modules
68fac4
find netaddr -name "*.py" | \
68fac4
  xargs %{__perl} -ni -e 'print unless /usr\/bin\/python|env\s+python/'
68fac4
68fac4
# Make rpmlint happy, fix permissions on documentation files
68fac4
chmod 0644 README AUTHORS CHANGELOG COPYRIGHT INSTALL LICENSE PKG-INFO
68fac4
68fac4
%build
68fac4
%{__python} setup.py build
68fac4
68fac4
68fac4
%install
68fac4
rm -rf %{buildroot}
68fac4
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
68fac4
68fac4
68fac4
%check
68fac4
%{__python} netaddr/tests/__init__.py
68fac4
68fac4
%clean
68fac4
rm -rf %{buildroot}
68fac4
68fac4
68fac4
%files
68fac4
%defattr(-,root,root,-)
68fac4
%doc AUTHORS CHANGELOG COPYRIGHT INSTALL LICENSE PKG-INFO
68fac4
%doc README docs/api/
68fac4
%{python_sitelib}/*
68fac4
%{_bindir}/netaddr
68fac4
68fac4
%changelog
68fac4
* Thu Nov 2 2017 Pavel Vomacka <pvomacka@redhat.com> - 0.7.5-9
68fac4
- Adding commands to apply new patches added in previous release 0.7.5-8
68fac4
68fac4
* Fri Oct 20 2017 Pavel Vomacka <pvomacka@redhat.com> - 0.7.5-8
68fac4
- Resolves: #1438668 DNS forwarder address added during IPA installation
68fac4
  shouldn't add IP-Address '0.0.0.0'
68fac4
68fac4
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.7.5-7
68fac4
- Mass rebuild 2013-12-27
68fac4
68fac4
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-6
68fac4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
68fac4
68fac4
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-5
68fac4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
68fac4
68fac4
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-4
68fac4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
68fac4
68fac4
* Mon May 30 2011 Jakub Hrozek <jhrozek@redhat.com> - 0.7.5-3
68fac4
- Do not traceback on invalid IPNetwork input (upstream issues #2, #6, #5, #8)
68fac4
- Remove executable bit from documentation files to make rpmlint happy
68fac4
68fac4
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.5-2
68fac4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
68fac4
68fac4
* Tue Oct 05 2010 John Eckersberg <jeckersb@redhat.com> - 0.7.5-1
68fac4
- New upstream release 0.7.5
68fac4
- Updated summary and description to match upstream README
68fac4
- Updated URL and source to reflect upstream move to github
68fac4
68fac4
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.7.4-2
68fac4
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
68fac4
68fac4
* Mon May 17 2010 John Eckersberg <jeckersb@redhat.com> - 0.7.4-1
68fac4
- New upstream release 0.7.4
68fac4
68fac4
* Wed Sep 30 2009 John Eckersberg <jeckersb@redhat.com> - 0.7.3-1
68fac4
- New upstream release 0.7.3
68fac4
68fac4
* Fri Aug 21 2009 John Eckersberg <jeckersb@redhat.com> - 0.7.2-1
68fac4
- New upstream release 0.7.2
68fac4
- Updated Summary and Description with new values provided by upstream
68fac4
68fac4
* Mon Aug 17 2009 John Eckersberg <jeckersb@redhat.com> - 0.7.1-1
68fac4
- New upstream release 0.7.1 fixes naming conflict with 'nash' by
68fac4
  renaming the netaddr shell to 'netaddr'
68fac4
68fac4
* Wed Aug 12 2009 John Eckersberg <jeckersb@redhat.com> - 0.7-1
68fac4
- Upstream release 0.7
68fac4
68fac4
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.3-3
68fac4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
68fac4
68fac4
* Wed Jul 22 2009 John Eckersberg <jeckersb@redhat.com> - 0.6.3-2
68fac4
- Minor tweaks to spec file aligning with latest Fedora packaging guidelines
68fac4
- Enforce python 2.4 dependency as needed by netaddr >= 0.6.2
68fac4
- Drop BR on python-setuptool as it is not imported in setup.py
68fac4
- Drop BR on dos2unix use sed instead
68fac4
- Align description with that of delivered PKG-INFO
68fac4
- Rip out python shebangs
68fac4
- Add %%check section to enable tests
68fac4
- Thanks to Gareth Armstrong <gareth.armstrong@hp.com>
68fac4
68fac4
* Tue Jun 23 2009 John Eckersberg <jeckersb@redhat.com> - 0.6.3-1
68fac4
- New upstream bugfix release
68fac4
68fac4
* Mon Apr 13 2009 John Eckersberg <jeckersb@redhat.com> - 0.6.2-1
68fac4
- New upstream bugfix release
68fac4
68fac4
* Tue Apr 7 2009 John Eckersberg <jeckersb@redhat.com> - 0.6.1-1
68fac4
- New upstream bugfix release
68fac4
68fac4
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-3
68fac4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
68fac4
68fac4
* Wed Feb 18 2009 John Eckersberg <jeckersb@redhat.com> - 0.6-2
68fac4
- Add BuildDepends on dos2unix to clean up some upstream sources
68fac4
68fac4
* Wed Feb 18 2009 John Eckersberg <jeckersb@redhat.com> - 0.6-1
68fac4
- New upstream version
68fac4
68fac4
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5.2-2
68fac4
- Rebuild for Python 2.6
68fac4
68fac4
* Fri Oct 10 2008 John Eckersberg <jeckersb@redhat.com> - 0.5.2-1
68fac4
- New upstream version, bug fixes for 0.5.1
68fac4
68fac4
* Tue Sep 23 2008 John Eckersberg <jeckersb@redhat.com> - 0.5.1-1
68fac4
- New upstream version, bug fixes for 0.5
68fac4
68fac4
* Sun Sep 21 2008 John Eckersberg <jeckersb@redhat.com> - 0.5-1
68fac4
- New upstream version
68fac4
68fac4
* Mon Aug 11 2008 John Eckersberg <jeckersb@redhat.com> - 0.4-1
68fac4
- Initial packaging for Fedora
68fac4