%global pypi_name sip Name: mingw-%{pypi_name} Summary: MinGW Windows SIP6 Version: 6.7.5 Release: 1%{?dist} # sipgen/parser.{c.h} is GPLv3+ with exceptions (bison) License: (GPLv2 or GPLv3) and (GPLv3+ with exceptions) Url: http://www.riverbankcomputing.com/software/sip/intro Source0: %{pypi_source} BuildRequires: gcc BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: mingw32-filesystem >= 102 BuildRequires: mingw32-gcc BuildRequires: mingw32-dlfcn BuildRequires: mingw32-python3 BuildRequires: mingw32-python3-build BuildRequires: mingw64-filesystem >= 102 BuildRequires: mingw64-gcc BuildRequires: mingw64-dlfcn BuildRequires: mingw64-python3 BuildRequires: mingw64-python3-build %description MinGW Windows SIP6. %package -n mingw32-%{pypi_name} Summary: MinGW Windows SIP6 %description -n mingw32-%{pypi_name} MinGW Windows SIP6. %package -n mingw64-%{pypi_name} Summary: MinGW Windows SIP6 %description -n mingw64-%{pypi_name} MinGW Windows SIP6. %prep %autosetup -p1 -n %{pypi_name}-%{version} %build # Host build %{mingw32_py3_build_host_wheel} %{mingw64_py3_build_host_wheel} # Target build %{mingw32_py3_build_wheel} %{mingw64_py3_build_wheel} %install # Host build %{mingw32_py3_install_host_wheel} %{mingw64_py3_install_host_wheel} # Target build %{mingw32_py3_install_wheel} %{mingw64_py3_install_wheel} # Fix extension mv %{buildroot}%{mingw32_python3_sitearch}/sipbuild/code_generator.abi3.so %{buildroot}%{mingw32_python3_sitearch}/sipbuild/code_generator.abi3.pyd mv %{buildroot}%{mingw64_python3_sitearch}/sipbuild/code_generator.abi3.so %{buildroot}%{mingw64_python3_sitearch}/sipbuild/code_generator.abi3.pyd # Wrappers mkdir -p %{buildroot}%{_bindir} for file in %{buildroot}%{_prefix}/%{mingw32_target}/bin/sip-*; do mv $file $file.py cat << EOF > $file #!/bin/sh mingw32-python3 %{_prefix}/%{mingw32_target}/bin/`basename $file`.py "\$@" EOF chmod +x $file ln -s %{_prefix}/%{mingw32_target}/bin/`basename $file` %{buildroot}%{_bindir}/mingw32-`basename $file` done for file in %{buildroot}%{_prefix}/%{mingw64_target}/bin/sip-*; do mv $file $file.py cat << EOF > $file #!/bin/sh mingw64-python3 %{_prefix}/%{mingw64_target}/bin/`basename $file`.py "\$@" EOF chmod +x $file ln -s %{_prefix}/%{mingw64_target}/bin/`basename $file` %{buildroot}%{_bindir}/mingw64-`basename $file` done %files -n mingw32-%{pypi_name} %license LICENSE LICENSE-GPL2 LICENSE-GPL3 %{_bindir}/mingw32-sip-* %{mingw32_bindir}/sip-* %{mingw32_python3_sitearch}/sipbuild/ %{mingw32_python3_sitearch}/%{pypi_name}-%{version}.dist-info/ %{_prefix}/%{mingw32_target}/bin/sip-* %{mingw32_python3_hostsitearch}/sipbuild/ %{mingw32_python3_hostsitearch}/%{pypi_name}-%{version}.dist-info/ %files -n mingw64-%{pypi_name} %license LICENSE LICENSE-GPL2 LICENSE-GPL3 %{_bindir}/mingw64-sip-* %{mingw64_bindir}/sip-* %{mingw64_python3_sitearch}/sipbuild/ %{mingw64_python3_sitearch}/%{pypi_name}-%{version}.dist-info/ %{_prefix}/%{mingw64_target}/bin/sip-* %{mingw64_python3_hostsitearch}/sipbuild/ %{mingw64_python3_hostsitearch}/%{pypi_name}-%{version}.dist-info/ %changelog * Mon Dec 05 2022 Sandro Mani - 6.7.5-1 - Update to 6.7.5 * Wed Oct 19 2022 Sandro Mani - 6.6.2-6 - Switch to python3-build * Tue Aug 09 2022 Sandro Mani - 6.6.2-5 - Backport fix for the instantiation of template values * Wed Aug 03 2022 Sandro Mani - 6.6.2-4 - Proper host build * Sat Jul 30 2022 Sandro Mani - 6.6.2-3 - Don't use expanded mingw-python macros in wrapper scripts * Fri Jul 29 2022 Sandro Mani - 6.6.2-2 - Rebuild for mingw-filesystem-140 * Fri Jul 22 2022 Sandro Mani - 6.6.2-1 - Update to 6.6.2 * Thu Jul 21 2022 Fedora Release Engineering - 6.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Feb 18 2022 Sandro Mani - 6.5.1-1 - Update to 6.5.1 * Fri Feb 11 2022 Sandro Mani - 6.5.0-4 - Also build/install target build, drop manually specified requires * Fri Feb 11 2022 Sandro Mani - 6.5.0-3 - Rebuild for new python dependency generator * Thu Jan 20 2022 Fedora Release Engineering - 6.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Dec 23 2021 Sandro Mani - 6.5.0-1 - Update to 6.5.0 * Mon Nov 01 2021 Sandro Mani - 6.4.0-1 - Update to 6.4.0 * Wed Oct 13 2021 Sandro Mani - 6.3.1-1 - Update to 6.3.1 * Wed Oct 13 2021 Sandro Mani - 6.3.0-1 - Update to 6.3.0 * Tue Oct 05 2021 Sandro Mani - 6.2.0-2 - Require mingw-python-setuptools * Tue Oct 05 2021 Sandro Mani - 6.2.0-1 - Update to 6.2.0 * Tue Sep 14 2021 Sandro Mani - 6.1.1-1 - Initial package