pyelftools/pyelftools.spec

176 lines
6.1 KiB
RPMSpec
Raw Normal View History

%if 0%{?fedora} > 28 || 0%{?rhel} >= 8
%global py2readelf py2readelf
%global py3readelf pyreadelf
2013-10-02 14:35:32 +00:00
%else
%global py2readelf pyreadelf
%global py3readelf py3readelf
2013-10-02 14:35:32 +00:00
%endif
Summary: Pure-Python library for parsing and analyzing ELF files
Name: pyelftools
Version: 0.24
Release: 3%{?dist}
License: Public Domain
URL: https://github.com/eliben/pyelftools
Source0: https://files.pythonhosted.org/packages/source/p/pyelftools/pyelftools-%{version}.tar.gz
Patch0: pyelftools-0.24-construct.patch
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-construct
2014-10-05 08:37:25 +00:00
%if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-construct
2013-08-16 18:14:27 +00:00
%endif
BuildArch: noarch
%global _description \
Pure-Python library for parsing and analyzing ELF files\
2013-08-16 18:14:27 +00:00
and DWARF debugging information.
%description %_description
2013-08-16 18:14:27 +00:00
%package -n python2-%{name}
Summary: %{summary}
Requires: python2-construct
%{?python_provide:%python_provide python2-%{name}}
# Remove before F30
%if 0%{?fedora} < 29
Provides: %{name} = %{version}-%{release}
%endif
%description -n python2-%{name} %_description
2013-08-16 18:14:27 +00:00
2014-10-05 08:37:25 +00:00
%if 0%{?fedora} || 0%{?rhel} >= 8
%package -n python3-%{name}
Summary: %{summary}
2013-08-16 18:14:27 +00:00
Requires: python3-construct
%{?python_provide:%python_provide python3-%{name}}
%description -n python3-%{name} %_description
2013-08-16 18:14:27 +00:00
%endif
%prep
%setup -q
2013-08-16 18:14:27 +00:00
%patch0 -p1
rm -rf elftools/construct
%build
%{py2_build}
2014-10-05 08:37:25 +00:00
%if 0%{?fedora} || 0%{?rhel} >= 8
%{py3_build}
2013-08-16 18:14:27 +00:00
%endif
%install
%{py2_install}
mv %{buildroot}/usr/bin/readelf.py %{buildroot}/usr/bin/%{py2readelf}
2014-10-05 08:37:25 +00:00
%if 0%{?fedora} || 0%{?rhel} >= 8
%{py3_install}
mv %{buildroot}/usr/bin/readelf.py %{buildroot}/usr/bin/%{py3readelf}
2013-08-16 18:14:27 +00:00
%endif
%check
2013-10-02 14:35:32 +00:00
%{__python2} test/run_all_unittests.py
%{__python2} test/run_examples_test.py
2013-08-16 18:14:27 +00:00
# tests may fail because of differences in output-formatting
# from binutils' readelf. See:
# https://github.com/eliben/pyelftools/wiki/Hacking-guide#tests
2013-10-02 14:35:32 +00:00
%{__python2} test/run_readelf_tests.py || :
2013-08-16 18:14:27 +00:00
2014-10-05 08:37:25 +00:00
%if 0%{?fedora} || 0%{?rhel} >= 8
2013-08-16 18:14:27 +00:00
%{__python3} test/run_all_unittests.py
%{__python3} test/run_examples_test.py
# ditto
2013-08-16 18:14:27 +00:00
%{__python3} test/run_readelf_tests.py || :
%endif
%files -n python2-%{name}
%license LICENSE
%doc CHANGES
%{_bindir}/%{py2readelf}
%{python2_sitelib}/elftools
%{python2_sitelib}/pyelftools-*.egg-info
2013-08-16 18:14:27 +00:00
2014-10-05 08:37:25 +00:00
%if 0%{?fedora} || 0%{?rhel} >= 8
2013-08-16 18:14:27 +00:00
%files -n python3-%{name}
%license LICENSE
%doc CHANGES
%{_bindir}/%{py3readelf}
%{python3_sitelib}/elftools
%{python3_sitelib}/pyelftools-*.egg-info
2013-08-16 18:14:27 +00:00
%endif
%changelog
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.24-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2018-06-19 08:50:34 +00:00
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.24-2
- Rebuilt for Python 3.7
* Sun Jun 17 2018 Terje Rosten <terje.rosten@ntnu.no> - 0.24-1
- 0.24
- some clean up
- remove naked provide for Fedora 29 and later
- switch to Python 3 for pyreadelf for Fedora 29 and later
* Wed Feb 21 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.22-0.16.git20130619.a1d9681
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-0.15.git20130619.a1d9681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.22-0.14.git20130619.a1d9681
- Python 2 binary package renamed to python2-pyelftools
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-0.13.git20130619.a1d9681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-0.12.git20130619.a1d9681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-0.11.git20130619.a1d9681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2016-12-19 17:20:36 +00:00
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.22-0.10.git20130619.a1d9681
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-0.9.git20130619.a1d9681
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-0.8.git20130619.a1d9681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-0.7.git20130619.a1d9681
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-0.6.git20130619.a1d9681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-0.5.git20130619.a1d9681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-0.4.git20130619.a1d9681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue May 27 2014 Kalev Lember <kalevlember@gmail.com> - 0.22-0.3.git20130619.a1d9681
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
2013-10-02 14:35:32 +00:00
* Wed Oct 02 2013 Björn Esser <bjoern.esser@gmail.com> - 0.22-0.2.git20130619.a1d9681
- adaptions for new Python-guidelines
2013-08-16 18:14:27 +00:00
* Fri Aug 16 2013 Björn Esser <bjoern.esser@gmail.com> - 0.22-0.1.git20130619.a1d9681
- update to latest pre-release git snapshot
- add python3-package
- build on all arches to get some conclusion from testsuite,
but create noarch pkgs
* Sat Jun 08 2013 Terje Rosten <terje.rosten@ntnu.no> - 0.21-2
- Remove bundled construct lib
* Thu May 09 2013 Terje Rosten <terje.rosten@ntnu.no> - 0.21-1
- 0.21
- Run test
- Updated source url
- Drop defattr
* Wed Jun 06 2012 Kushal Das <kushal@fedoraproject.org> 0.20-1
- Intial package (#829676)