db3e4f
%if 0%{?rhel} > 7
db3e4f
# Disable python2 build by default
db3e4f
%bcond_with python2
db3e4f
%else
db3e4f
%bcond_without python2
db3e4f
%endif
db3e4f
db3e4f
Summary: Utilities for working with md5sum implanted in ISO images
db3e4f
Name:    isomd5sum
db3e4f
Version: 1.2.3
db3e4f
Release: 3%{?dist}
db3e4f
Epoch: 1
db3e4f
License: GPLv2+
db3e4f
Group: Applications/System
db3e4f
db3e4f
Url:     https://github.com/rhinstaller/isomd5sum
db3e4f
Source0: https://github.com/rhinstaller/%{name}/archive/%{version}.tar.gz
db3e4f
db3e4f
BuildRequires: gcc
db3e4f
BuildRequires: popt-devel
db3e4f
db3e4f
%description
db3e4f
The isomd5sum package contains utilities for implanting and verifying
db3e4f
an md5sum implanted into an ISO9660 image.
db3e4f
db3e4f
%package devel
db3e4f
Summary: Development headers and library for using isomd5sum 
db3e4f
Group: Development/System
db3e4f
Requires: %{name} = %{epoch}:%{version}-%{release}
db3e4f
Provides: %{name}-static = %{epoch}:%{version}-%{release}
db3e4f
db3e4f
%description devel
db3e4f
This contains header files and a library for working with the isomd5sum
db3e4f
implanting and checking.
db3e4f
db3e4f
%if %{with python2}
db3e4f
%package -n python2-isomd5sum
db3e4f
Summary: Python bindings for isomd5sum
db3e4f
db3e4f
BuildRequires: python2-devel
db3e4f
db3e4f
%{?python_provide:%python_provide python2-isomd5sum}
db3e4f
db3e4f
%description -n python2-isomd5sum
db3e4f
The isomd5sum package contains utilities for implanting and verifying
db3e4f
an md5sum implanted into an ISO9660 image.
db3e4f
%endif # with python2
db3e4f
db3e4f
%package -n python3-isomd5sum
db3e4f
Summary: Python bindings for isomd5sum
db3e4f
%{?python_provide:%python_provide python3-isomd5sum}
db3e4f
db3e4f
BuildRequires: python3-devel
db3e4f
db3e4f
%description -n python3-isomd5sum
db3e4f
The isomd5sum package contains utilities for implanting and verifying
db3e4f
an md5sum implanted into an ISO9660 image.
db3e4f
db3e4f
db3e4f
%prep
db3e4f
%autosetup
db3e4f
db3e4f
%build
db3e4f
CFLAGS="$RPM_OPT_FLAGS -Wno-strict-aliasing"; export CFLAGS
db3e4f
LDFLAGS="$RPM_LD_FLAGS"; export LDFLAGS
db3e4f
%if %{with python2}
db3e4f
PYTHON=%{__python2} make checkisomd5 implantisomd5 pyisomd5sum.so
db3e4f
%endif # with python2
db3e4f
db3e4f
PYTHON=%{__python3} make checkisomd5 implantisomd5 pyisomd5sum.so
db3e4f
db3e4f
%install
db3e4f
%if %{with python2}
db3e4f
PYTHON=%{__python2} make DESTDIR=$RPM_BUILD_ROOT install-bin install-devel install-python
db3e4f
%endif # with python2
db3e4f
db3e4f
PYTHON=%{__python3} make DESTDIR=$RPM_BUILD_ROOT install-bin install-devel install-python
db3e4f
db3e4f
%files
db3e4f
%license COPYING
db3e4f
%{_bindir}/implantisomd5
db3e4f
%{_bindir}/checkisomd5
db3e4f
%{_mandir}/man*/*
db3e4f
db3e4f
%files devel
db3e4f
%{_includedir}/*.h
db3e4f
%{_libdir}/*.a
db3e4f
/usr/share/pkgconfig/isomd5sum.pc
db3e4f
db3e4f
%if %{with python2}
db3e4f
%files -n python2-isomd5sum
db3e4f
%{python2_sitearch}/pyisomd5sum.so
db3e4f
%endif # with python2
db3e4f
db3e4f
%files -n python3-isomd5sum
db3e4f
%{python3_sitearch}/pyisomd5sum.so
db3e4f
db3e4f
%changelog
db3e4f
* Mon May 28 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:1.2.3-3
db3e4f
- Conditionalize the python2 subpackage
db3e4f
db3e4f
* Mon May 28 2018 Charalampos Stratakis <cstratak@redhat.com> - 1:1.2.3-2
db3e4f
- Conditionalize the python2 subpackage
db3e4f
db3e4f
* Tue Apr 10 2018 Brian C. Lane <bcl@redhat.com> - 1:1.2.3-1
db3e4f
- New Version 1.2.3 (bcl)
db3e4f
- Fix 32bit bug on large files (squimrel)
db3e4f
- Don't put DESTDIR in the isomd5sum.pc file (bcl)
db3e4f
db3e4f
* Fri Feb 23 2018 Florian Weimer <fweimer@redhat.com> - 1:1.2.2-4
db3e4f
- Use LDFLAGS from redhat-rpm-config
db3e4f
db3e4f
* Mon Feb 19 2018 Brian C. Lane <bcl@redhat.com> - 1.2.2-3
db3e4f
- Add gcc BuildRequires for future minimal buildroot support
db3e4f
db3e4f
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.2.2-2
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
db3e4f
db3e4f
* Tue Oct 03 2017 Brian C. Lane <bcl@redhat.com> - 1:1.2.2-1
db3e4f
- Don't put DESTDIR in the isomd5sum.pc file
db3e4f
- New Version 1.2.2 (bcl)
db3e4f
- Fix aligned alloc parameters and overflow on 32bit size_t (#1497458) (squimrel)
db3e4f
- Fix memory leak (squimrel)
db3e4f
- Add pkgconfig file (squimrel)
db3e4f
- Remove line-breaks from error messages (squimrel)
db3e4f
- Make library C++ compatible (squimrel)
db3e4f
- Constify function signatures (squimrel)
db3e4f
- Revert checkCallback function signature (squimrel)
db3e4f
db3e4f
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1:1.2.1-4
db3e4f
- Python 2 binary package renamed to python2-isomd5sum
db3e4f
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
db3e4f
db3e4f
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.2.1-3
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
db3e4f
db3e4f
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.2.1-2
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
db3e4f
db3e4f
* Fri Jun 09 2017 Brian C. Lane <bcl@redhat.com> - 1:1.2.1-1
db3e4f
- New Version 1.2.1 (bcl)
db3e4f
- Let the user pass their own file descriptor (squimrel)
db3e4f
- Correct format specifiers (squimrel)
db3e4f
db3e4f
* Thu Jun 08 2017 Brian C. Lane <bcl@redhat.com> - 1:1.2.0-1
db3e4f
- New Version 1.2.0 (bcl)
db3e4f
- Improve the python test and add a test target to the Makefile (bcl)
db3e4f
- Improve error handling of libimplantisomd5 (squimrel)
db3e4f
- Fix popt memory leak and avoid exit in main (squimrel)
db3e4f
- Add derived clang format and editorconfig (squimrel)
db3e4f
- Format, constify, castify, decl-at-use code (squimrel)
db3e4f
- Make libimplantisomd5 use the utilities (squimrel)
db3e4f
- Implement shared utilities (squimrel)
db3e4f
- Refactor libcheckisomd5 (squimrel)
db3e4f
db3e4f
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.0-5
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
db3e4f
db3e4f
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1:1.1.0-4
db3e4f
- Rebuild for Python 3.6
db3e4f
db3e4f
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.1.0-3
db3e4f
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
db3e4f
db3e4f
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.0-2
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
db3e4f
db3e4f
* Fri Dec 04 2015 Brian C. Lane <bcl@redhat.com> 1.1.0-1
db3e4f
- New upstream with Python3 support
db3e4f
db3e4f
* Mon Jul 20 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1:1.0.12-6
db3e4f
- Use github source so it will build
db3e4f
- Cleanup spec
db3e4f
- Use %%license
db3e4f
db3e4f
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.12-5
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
db3e4f
db3e4f
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1:1.0.12-4
db3e4f
- Rebuilt for Fedora 23 Change
db3e4f
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
db3e4f
db3e4f
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.12-3
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
db3e4f
db3e4f
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.12-2
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
db3e4f
db3e4f
* Fri Jan 10 2014 Brian C. Lane <bcl@redhat.com> 1.0.12-1
db3e4f
- Display supported iso status (#1026336) (bcl)
db3e4f
- Add ppc64le (bcl)
db3e4f
db3e4f
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.11-2
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
db3e4f
db3e4f
* Wed Jul 17 2013 Brian C. Lane <bcl@redhat.com> 1.0.11-1
db3e4f
- Add aarch64 (#985568) (bcl)
db3e4f
db3e4f
* Tue Feb 26 2013 Brian C. Lane <bcl@redhat.com> 1.0.10-1
db3e4f
- Fix for gcc type-punned and sizeof pointer warnings. (bcl)
db3e4f
- Add exit code 2 for user abort (#907600) (bcl)
db3e4f
- Cleanup TABs and update Copyrights (bcl)
db3e4f
- Standardize *FLAGS in Makefile (ryan)
db3e4f
db3e4f
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.9-3
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
db3e4f
db3e4f
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.9-2
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
db3e4f
db3e4f
* Fri Mar 09 2012 Brian C. Lane <bcl@redhat.com> 1.0.9-1
db3e4f
- Add python-isomd5sum package with python bindings
db3e4f
- Add callback and interrupt support to the python library
db3e4f
- Add RPM_OPT_FLAGS to CFLAGS and update makefile to use CFLAGS from environment
db3e4f
db3e4f
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.7-2
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
db3e4f
db3e4f
* Fri Apr 8 2011 Radek Vykydal <rvykydal@fedoraproject.org> - 1:1.0.7-1
db3e4f
- Allocate one more char for string sentinel (#692135) (rvykydal)
db3e4f
db3e4f
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.6-3
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
db3e4f
db3e4f
* Wed Jun 30 2010 Michael Schwendt <mschwendt@fedoraproject.org> - 1:1.0.6-2
db3e4f
- Add virtual -static package to -devel package (#609607).
db3e4f
db3e4f
* Fri Mar 26 2010 Radek Vykydal <rvykydal@redhat.com> - 1:1.0.6-1
db3e4f
- Add abort check feature (#555107) (dpierce, rvykydal)
db3e4f
  Changes prototype of exported checkMediaFile function.
db3e4f
- Fix exit value of checkisomd5 (rvykydal)
db3e4f
- Remove output to stderr from library (#576251) (bcl)
db3e4f
- Use separate return value for image not found (#578160) (bcl)
db3e4f
db3e4f
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.5-3
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
db3e4f
db3e4f
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0.5-2
db3e4f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
db3e4f
db3e4f
* Thu Jan  8 2009 Jeremy Katz <katzj@redhat.com> - 1:1.0.5-1
db3e4f
- Don't install the unused python module (#479005)
db3e4f
db3e4f
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1:1.0.4-4
db3e4f
- Rebuild for Python 2.6
db3e4f
db3e4f
* Wed Nov  5 2008 Hans de Goede <hdegoede@redhat.com> - 1:1.0.4-3
db3e4f
- Fix permission on installed manpages (#469936)
db3e4f
db3e4f
* Thu Apr 24 2008 Dennis Gilmore <dennis@ausil.us> - 1:1.0.4-2
db3e4f
- add patch for making libdir /usr/lib64 for sparc64
db3e4f
db3e4f
* Thu Feb  7 2008 Jeremy Katz <katzj@redhat.com> - 1:1.0.4-1
db3e4f
- Add man pages from Ryan Finnie (ryan AT finnie DOT org)
db3e4f
- Use popt in checkisomd5 (Ryan Finnie)
db3e4f
- Fix verbose/gauge interactions (Ryan Finnie)
db3e4f
- A few other little janitorial things (Ryan Finnie)
db3e4f
db3e4f
* Mon Dec 10 2007 Jeremy Katz <katzj@redhat.com> - 1:1.0.2-1
db3e4f
- The "fix the build after changing the API" release
db3e4f
db3e4f
* Mon Dec 10 2007 Jeremy Katz <katzj@redhat.com> - 1:1.0.1-1
db3e4f
- Add some simple callback support in the library
db3e4f
db3e4f
* Fri Dec  7 2007 Jeremy Katz <katzj@redhat.com> - 1.0-1
db3e4f
- Initial build.
db3e4f