3 %bcond_with tests # build with tests
5 Summary: Engine for processing 3D models into G-code instructions for 3D printers
10 Group: Applications/Engineering
11 Source0: https://github.com/Ultimaker/CuraEngine/archive/%{version}.tar.gz
12 # Source0-md5: 75d34492ca18358aa554a56afb2de440
13 URL: https://github.com/Ultimaker/CuraEngine
14 BuildRequires: libstdc++-devel
15 BuildRequires: polyclipping-devel >= 6.1.2
16 %{?with_tests:BuildRequires: python}
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %{name} is a C++ console application for 3D printing G-code
21 generation. It has been made as a better and faster alternative to the
22 old Skeinforge engine.
24 This is just a console application for G-code generation. For a full
25 graphical application look at cura with is the graphical frontend for
33 sed -i 's|#include <clipper/clipper.hpp>|#include <polyclipping/clipper.hpp>|' src/utils/*.h
34 sed -i 's|-lclipper|-lpolyclipping|g' Makefile
35 sed -i 's| $(BUILD_DIR)/libclipper.a||g' Makefile
37 # allow redefinition of CFLAGS and do not build it static
38 sed -i 's|CFLAGS +=|CFLAGS?=|' Makefile
39 sed -i 's|--static||g' Makefile
43 CFLAGS="-I. -Ilibs -c %{rpmcflags} %{rpmcppflags} -std=c++11 -fomit-frame-pointer" \
46 %{?with_tests:%{__make} test}
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT%{_bindir}/%{name}
51 install -p build/%{name} $RPM_BUILD_ROOT%{_bindir}
54 rm -rf $RPM_BUILD_ROOT
57 %defattr(644,root,root,755)
58 %doc LICENSE README.md
59 %attr(755,root,root) %{_bindir}/%{name}