# Get post-release fixes %global owner freetdi %global srcname tdlib %global gittag e8ec9114377574f22ff4447cf29e66411b491b7e %global shorttag %(cut -b -7 <<< %{gittag}) %global gitdate 20210929 Name: python-%{srcname} Version: 0.9.2 Release: 4.%{gitdate}.%{shorttag}%{?dist} Summary: Tree decomposition algorithms License: GPLv2+ URL: https://github.com/%{owner}/%{srcname} Source0: %{url}/archive/%{gittag}/%{srcname}-%{shorttag}.tar.gz # Fix a broken test to find the python header files Patch0: %{name}-python-includes.patch # Fix FTBFS on 32-bit systems Patch1: %{name}-32bit.patch BuildRequires: boost-devel BuildRequires: freetdi-gala-devel BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: make BuildRequires: python3-devel BuildRequires: %{py3_dist cython} %global _description %{expand: This package provides tree decomposition algorithms. A tree decomposition of a simple, loopless, undirected graph G is a tree T with bags at its nodes containing vertices from G. The usual conditions apply. By convention, a tree is an acyclic graph with exactly one connected component. The bagsize of T is the size of the biggest bag, which is a notion for the (width of T)+1.} %description %_description %package -n python3-%{srcname} Summary: Tree decomposition algorithms for python 3 Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python3-%{srcname} %_description %package -n python3-%{srcname}-devel Summary: Headers for python3-%{srcname} BuildArch: noarch Requires: python3-%{srcname} = %{version}-%{release} Requires: freetdi-gala-devel %description -n python3-%{srcname}-devel Headers for developing applications that use python3-%{srcname}. %prep %autosetup -p1 -n %{srcname}-%{gittag} # Tell cython to generate python 3 code sed -i 's/--cplus/-3 &/' cython.am # Install into the arch-specific python directory sed -i 's/pythondir/pyexecdir/' tdlib/Makefile.am # Do not override Fedora build flags sed -i 's/ -Os -march=native//' examples/Makefile.am # Generate the configure script and Makefile.in files autoreconf -fi . %build %configure --disable-static # Get rid of undesirable hardcoded rpaths; workaround libtool reordering # -Wl,--as-needed after all the libraries. sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ -e 's|CC="\(g..\)"|CC="\1 -Wl,--as-needed"|' \ -i libtool %make_build %install %make_install rm -f %{buildroot}%{python3_sitearch}/tdlib/*.la %check %py3_check_import tdlib %files %license COPYING GPL-2 GPL-3 %doc AUTHORS BUGS NEWS README THANKS TODO %{_libexecdir}/treedec/ %files -n python3-%{srcname} %{python3_sitearch}/tdlib/ %files -n python3-%{srcname}-devel %{_includedir}/treedec/ %changelog * Mon Jun 13 2022 Python Maint - 0.9.2-4.20210929.e8ec911 - Rebuilt for Python 3.11 * Wed May 04 2022 Thomas Rodgers - 0.9.2-3.20210929.e8ec911 - Rebuilt for Boost 1.78 * Fri Jan 21 2022 Fedora Release Engineering - 0.9.2-2.20210929.e8ec911 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Oct 7 2021 Jerry James - 0.9.2-1.20210929.e8ec911 - Version 0.9.2 * Tue Aug 17 2021 Jerry James - 0.9.1-1.20210812.55906e9 - Version 0.9.1 plus bug fixes from git - Drop upstreamed -gcc11 patch * Sat Aug 07 2021 Jonathan Wakely - 0.9.0-12.20200404.4c6109e - Rebuilt for Boost 1.76 * Fri Jul 23 2021 Fedora Release Engineering - 0.9.0-11.20200404.4c6109e - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.9.0-10.20200404.4c6109e - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.9.0-9.20200404.4c6109e - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Fri Jan 22 2021 Jonathan Wakely - 0.9.0-8.20200404.4c6109e - Rebuilt for Boost 1.75 * Fri Oct 16 2020 Jeff Law - 0.9.0-7.20200404.4c6109e - Fix missing #include for gcc-11 * Wed Jul 29 2020 Fedora Release Engineering - 0.9.0-6.20200404.4c6109e - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Thu Jun 4 2020 Jerry James - 0.9.0-5.20200404.4c6109e - Update to latest git snapshot * Tue May 26 2020 Miro HronĨok - 0.9.0-4.20191218.6611c7c - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 0.9.0-3.20191218.6611c7c - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Tue Jan 7 2020 Jerry James - 0.9.0-2.20191218.6611c7c - Install into the arch-specific directory * Thu Dec 19 2019 Jerry James - 0.9.0-1.20191218.6611c7c - Initial RPM