%define debug_package %{nil} %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=True)") %define python3_sitelib %(python3 -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib(True))") %if 0%{?fedora} || 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?epel} >= 7 %global with_python3 1 %endif %if 0%{?centos}0%{?amzn} == 70 %define python3_pkgversion 36 %endif Name: libvhdi Version: 20240509 Release: 1%{?dist} Summary: Library to access the Virtual Hard Disk (VHD) image format Group: System Environment/Libraries License: LGPLv3+ Source: %{name}-alpha-%{version}.tar.gz URL: https://github.com/libyal/libvhdi/wiki BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf automake pkgconfig gettext-devel libtool gcc %description libvhdi is a library to access the Virtual Hard Disk (VHD) image format %package devel Summary: Header files and libraries for developing applications for libvhdi Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel Header files and libraries for developing applications for libvhdi. %package tools Summary: Several tools for reading Virtual Hard Disk (VHD) image files Group: Applications/System Requires: %{name} = %{version}-%{release} fuse-libs BuildRequires: fuse-devel %description tools Several tools for reading Virtual Hard Disk (VHD) image files %if 0%{?with_python2} %package python2 Summary: Python bindings for libvhdi Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} python2 BuildRequires: python2-devel Obsoletes: %{name}-python < %{version} Provides: %{name}-python = %{version} %description python2 Python bindings for libvhdi %endif %if 0%{?with_python3} %package python%{python3_pkgversion} Summary: Python 3 bindings for libvhdi Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} BuildRequires: python%{python3_pkgversion} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %description python%{python3_pkgversion} Python 3 bindings for libvhdi %endif %prep %setup -q %build %if 0%{?centos} == 7 sudo update-alternatives --set python /usr/bin/python3 %endif if [ -f synclibs.sh ]; then sh synclibs.sh; fi if [ -f autogen.sh ]; then sh autogen.sh; fi %configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} --enable-python make %{?_smp_mflags} %if 0%{?centos} == 7 sudo update-alternatives --set python /usr/bin/python2 %endif %install rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install %clean rm -rf ${RPM_BUILD_ROOT} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %attr(755,root,root) %{_libdir}/*.so.?.?.? %{_libdir}/*.so.? %files devel %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README ChangeLog %{_libdir}/*.a %if 0%{?fedora} >= 36 || 0%{?epel} >= 9 %else %{_libdir}/*.la %endif %{_libdir}/*.so %{_libdir}/pkgconfig/%{name}.pc %{_includedir}/* %{_mandir}/man3/* %files tools %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %attr(755,root,root) %{_bindir}/vhdiinfo %attr(755,root,root) %{_bindir}/vhdimount %{_mandir}/man1/* %if 0%{?with_python2} %files python2 %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %{python2_sitelib}/*.a %if 0%{?fedora} >= 36 || 0%{?epel} >= 9 %else %{python2_sitelib}/*.la %endif %{python2_sitelib}/*.so %endif %if 0%{?with_python3} %files python%{python3_pkgversion} %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %{python3_sitelib}/*.a %if 0%{?fedora} >= 36 || 0%{?epel} >= 9 %else %{python3_sitelib}/*.la %endif %{python3_sitelib}/*.so %endif %changelog * Thu May 30 2024 Arne Reiter 20240509-1 * Release 20240509-1 Version from 20240509 * Mon Nov 27 2023 Lawrence R. Rogers 20231127-1 * Release 20231127-1 Version from 20231127 * Thu Nov 24 2022 Lawrence R. Rogers 20221124-1 * Release 20221124-1 Version from 20221124 * Sun Apr 25 2021 Lawrence R. Rogers 20210425-1 * Release 20210425-1 Version from 20210425 * Fri Dec 4 2020 Lawrence R. Rogers 20201204-1 * Release 20201204-1 Version 20201204 Python2 no longer provided * Sun Oct 18 2020 Lawrence R. Rogers 20201018-1 * Release 20201018-1 Version 20201018 * Wed Oct 14 2020 Lawrence R. Rogers 20201014-1 * Release 20201014-1 Version 20201014 * Sat Sep 26 2020 Lawrence R. Rogers 20200926-1 * Release 20200926-1 Version 20200926 * Mon Aug 10 2020 Lawrence R. Rogers 20200810-1 * Release 20200810-1 Version 20200810 * Sat Dec 21 2019 Lawrence R. Rogers 20191221-1 * Release 20191221-1 Version 20191221 * Mon Nov 4 2019 Lawrence R. Rogers 20191104-1 * Release 20191104-1 Version 20191104 * Sat May 18 2019 Lawrence R. Rogers 20181227-5 * Release 20181227-5 Version 20181227-5: Uses python3_pkgversion for the current version of Python 3. * Tue Apr 9 2019 Lawrence R. Rogers 20181227-4 * Release 20181227-4 Release 4 - Rebuilt for Python 3.6 for CentOS/RHEL 7 * Tue Feb 12 2019 Lawrence R. Rogers 20181227-3 * Release 20181227-3 Release 3 - Removed conflicts when that arise when python2 and python3 versions are attempted to be installed on a system. * Mon Jan 28 2019 Lawrence R. Rogers 20181227-2 * Release 20181227-2 Version as of 20181227 -python packages renamed to -python2 * Thu Dec 27 2018 Lawrence R. Rogers 20181227-1 * Release 20181227-1 Version 20181227 * Sun Nov 25 2018 Lawrence R. Rogers 20181125-1 * Release 20181125-1 Version 20181125. * Sun Nov 18 2018 Lawrence R. Rogers 20181118-1 * Release 20181118-1 Version 20181118. * Mon Jan 23 2017 Lawrence R. Rogers 20170223-1 * Release 20170223-1 Version 20170223. * Sun Apr 24 2016 Lawrence R. Rogers 20160424-1 * Release 20160424-1 20160424 * fixed byte order of identifiers 20160423 * Changes to Python bindings * Worked on tests * Worked on diff image parent support 20160111 * Changes to Python bindings 20160109 * fixes for rpmbuild * Fri Jan 8 2016 Lawrence R. Rogers 20160108-1 * Release 20160108-1 20160108 * 2016 update * worked on Python 3 support * Sun Dec 20 2015 Lawrence R. Rogers 20151220-1 * Release 20151220-1 20151220 * updated dependencies * changes for deployment * Sat Dec 5 2015 Lawrence R. Rogers 20151205-1 * Release 20151205-1 20151205 * worked on Python bindings * Sat Sep 5 2015 Lawrence R. Rogers 20150905-1 * Release 20150905-1 20150905 * updated dependencies 20150125 * vhdiinfo: fix for handling missing parent filename * Sat Jan 10 2015 Lawrence R. Rogers 20150110-1 * Release 20150110-1 20150110 * updated version for release * Mon Jan 5 2015 Lawrence R. Rogers 20150105-1 * Release 20150105-1 20150105 * 2015 update 20141229 * updated dpkg files * updated dependencies * updated .gitignore 20141221 * worked on Python 3 support * worked on tests 20141205 * worked on test scripts 20141129 * code clean up 20141114 * code clean up 20141105 * worked on multi-threading support * removed deprecated functions - libvhdi_file_read_random - pyvhdi file.read_random 20141029 * bug fix in Python-bindings 20141027 * changes for deployment * Tue Oct 21 2014 Lawrence R. Rogers 20141021-1 * Release 20141021-1 20141021 * changes for deployment 20140929 * removed README.macosx * changes for project site move 20140803 * bug fix in Python-bindings * updated dependencies * Sun Mar 30 2014 Joachim Metz 20140330-1 - Auto-generated