## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Feature toggles: Python bindings disabled by default %bcond_without python %global soversion 3 %global forgeurl https://github.com/elalish/manifold %global pypiname manifold3d Version: 3.2.1 %forgemeta Name: manifold Release: %autorelease Summary: Geometry library for topological robustness License: Apache-2.0 URL: %{forgeurl} Source0: %{forgesource} # Build dependencies # Manifold requires static files BuildRequires: polyclipping2-static BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: openvdb-devel >= 11 BuildRequires: pkgconfig(assimp) BuildRequires: pkgconfig(gtest) BuildRequires: pkgconfig(tbb) %if %{with python} BuildRequires: python3-devel BuildRequires: python3-nanobind-devel BuildRequires: python3-pip BuildRequires: python3-scikit-build-core # tests BuildRequires: python3-pytest BuildRequires: python3-trimesh %endif # Documentation BuildRequires: doxygen ExcludeArch: i686 %description Manifold provides robust operations on watertight triangle meshes with guaranteed manifold output. Features include parallelized algorithms, support for arbitrary vertex attributes, and material mapping for rendering applications. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development files for %{name}, including headers, CMake config, and pkg-config files. %if %{with python} %package -n python3-%{pypiname} Summary: Python bindings for %{name} Requires: %{name}%{?_isa}=%{version}-%{release} %description -n python3-%{pypiname} Python interface for %{name} geometry library %endif %package doc Summary: Documentation for %{name} %description doc Docbook documentation for %{name}. %prep %forgeautosetup #Use macro instead of hardcoded line sed -i "s|python|%{python3}|" \ bindings/python/CMakeLists.txt # Generate docbook documentation instead of html sed -i "s|GENERATE_HTML = YES|GENERATE_HTML = NO|" \ Doxyfile sed -i "s|GENERATE_DOCBOOK = NO|GENERATE_DOCBOOK = YES|" \ Doxyfile # Use shared library in Python sed -i 's|"-DMANIFOLD_PYBIND=ON", "-DMANIFOLD_CBIND=OFF", "-DMANIFOLD_PAR=ON", "-DMANIFOLD_TEST=OFF", "-DBUILD_SHARED_LIBS=OFF"|"-DMANIFOLD_PYBIND=ON", "-DMANIFOLD_CBIND=ON", "-DMANIFOLD_PAR=ON", "-DMANIFOLD_TEST=ON", "-DBUILD_SHARED_LIBS=ON", "-DBUILD_SHARED_LIBS=ON", "-DCMAKE_SKIP_BUILD_RPATH=ON", "-DCMAKE_SKIP_INSTALL_RPATH=ON", "-DMANIFOLD_EXPORT=ON"|' pyproject.toml %build %if %{with python} %pyproject_wheel %endif %cmake \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_SKIP_BUILD_RPATH=ON \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DMANIFOLD_EXPORT=ON \ -DMANIFOLD_PAR=ON \ -DMANIFOLD_TEST=ON \ -DMANIFOLD_PYBIND=%{?with_python:ON}%{!?with_python:OFF} \ -DMANIFOLD_CBIND=ON %cmake_build doxygen %install %cmake_install %if %{with python} %pyproject_install %pyproject_save_files -L manifold3d %endif find docs/docbook/ -type f -exec install -pDm0644 "{}" \ "%{buildroot}%{_datadir}/help/en/manifold/{}" \; %check %ctest --test-dir %{_vpath_builddir} %if %{with python} LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{py3_test_envvars} %{python3} bindings/python/examples/run_all.py -e LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{pytest} %endif %files %license LICENSE %{_libdir}/libmanifold.so.%{soversion}* %{_libdir}/libmanifoldc.so.%{soversion}* %files devel %doc README.md CONTRIBUTING.md %{_includedir}/%{name}/ %{_libdir}/libmanifold.so %{_libdir}/libmanifoldc.so %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/cmake/%{name}/ %if %{with python} %files -n python3-%{pypiname} -f %{pyproject_files} %license LICENSE %{python3_sitearch}/manifold3d.pyi %endif %files doc %license LICENSE %dir %{_datadir}/help/en %lang(en) %{_datadir}/help/en/manifold %changelog ## START: Generated by rpmautospec * Thu Aug 14 2025 John Doe - 3.2.1-1 - Uncommitted changes ## END: Generated by rpmautospec