3 %bcond_with tests # build with tests
5 Summary: Engine for processing 3D models into G-code instructions for 3D printers
11 Group: Applications/Engineering
12 Source0: https://github.com/Ultimaker/CuraEngine/archive/%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5: 8d8de8f56fd5831b3b74e8946a26681e
14 Patch0: %{name}-rpath.patch
15 Patch1: %{name}-static-libstdcpp.patch
16 Patch2: %{name}-system-libs.patch
17 URL: https://github.com/Ultimaker/CuraEngine
19 BuildRequires: libArcus-devel = %{version}
20 BuildRequires: libstdc++-devel
21 BuildRequires: polyclipping-devel >= 6.1.2
22 BuildRequires: protobuf-devel
23 %{?with_tests:BuildRequires: python}
24 BuildRequires: rapidjson-devel
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %{name} is a C++ console application for 3D printing G-code
29 generation. It has been made as a better and faster alternative to the
30 old Skeinforge engine.
32 This is just a console application for G-code generation. For a full
33 graphical application look at cura with is the graphical frontend for
44 sed -i 's|#include <clipper/clipper.hpp>|#include <polyclipping/clipper.hpp>|' src/utils/*.h src/*.cpp
46 # The -DCURA_ENGINE_VERSION does not work, so we sed-change the default value
47 sed -i 's/"DEV"/"%{version}"/' src/settings/settings.h
53 -DBUILD_SHARED_LIBS:BOOL=OFF \
54 -DCURA_ENGINE_VERSION:STRING=%{version}
58 %{?with_tests:%{__make} test}
61 rm -rf $RPM_BUILD_ROOT
63 %{__make} -C build install \
64 DESTDIR=$RPM_BUILD_ROOT
67 rm -rf $RPM_BUILD_ROOT
70 %defattr(644,root,root,755)
71 %doc LICENSE README.md
72 %attr(755,root,root) %{_bindir}/%{name}