%global commit 82799874c7fdcb464c39cbae4383f7b451209ca4 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global debug_package %{nil} Name: CuraEngine-lulzbot Version: 20231130 Release: %autorelease Epoch: 1 Summary: Engine for processing 3D models into G-code instructions for 3D printers License: AGPL-3.0-or-later URL: https://code.alephobjects.com/diffusion/CTE/ Source0: https://gitlab.com/lulzbot3d/cura-le/cura-engine-le/-/archive/%{commit}/cura-engine-le-%{commit}.tar.bz2 # The cmake stuff would attempt to git clone this. # TODO: package on its own. %global stb_commit e6afb9cbae4064da8c3e69af3ff5c4629579c1d2 Source1: https://github.com/nothings/stb/archive/%{stb_commit}.tar.gz Provides: bundled(stb) = %stb_commit Conflicts: CuraEngine Patch0: cura-engine-le-20230601-no-static-libstdc++.patch Patch1: cura-engine-le-20230601-stdint.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libarcus-lulzbot-devel BuildRequires: polyclipping-devel >= 6.1.2 BuildRequires: protobuf-devel BuildRequires: rapidjson-devel BuildRequires: cmake BuildRequires: git Requires: libarcus-lulzbot %description %{name} is a C++ console application for 3D printing G-code generation. It has been made as a better and faster alternative to the old Skeinforge engine. This is just a console application for G-code generation. For a full graphical application look at cura-lulzbot which is the graphical frontend for %{name}. %prep %autosetup -p1 -n cura-engine-le-%{commit} tar -xf %{SOURCE1} mv stb-%{stb_commit} stb # bundled libraries rm -rf libs sed -i 's|#include |#include |' src/utils/*.h src/*.cpp # The -DCURA_ENGINE_VERSION does not work, so we sed-change the default value sed -i 's/"DEV"/"%{version}"/' src/settings/Settings.h %build %cmake -DUSE_DISTRO_OPTIMIZATION_FLAGS:BOOL=ON -DUSE_SYSTEM_LIBS:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DStb_INCLUDE_DIRS:PATH=${PWD} -DCURA_ENGINE_VERSION:STRING=%{version} # The lib is only intermediate %cmake_build %install %cmake_install mkdir -p %{buildroot}%{_datadir}/%{name}/ %check # Smoke test %{buildroot}%{_bindir}/CuraEngine help %files %license LICENSE %doc README.md %{_bindir}/CuraEngine %{_datadir}/%{name} %changelog %autochangelog