]>
Commit | Line | Data |
---|---|---|
880c7dcc ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build with tests | |
4 | ||
fd41772a AM |
5 | Summary: Engine for processing 3D models into G-code instructions for 3D printers |
6 | Name: CuraEngine | |
7 | Version: 15.04 | |
8 | Release: 1 | |
9 | License: AGPLv3 | |
10 | Group: Applications/Engineering | |
fd41772a AM |
11 | Source0: https://github.com/Ultimaker/CuraEngine/archive/%{version}.tar.gz |
12 | # Source0-md5: 75d34492ca18358aa554a56afb2de440 | |
880c7dcc ER |
13 | URL: https://github.com/Ultimaker/CuraEngine |
14 | BuildRequires: libstdc++-devel | |
fd41772a AM |
15 | BuildRequires: polyclipping-devel >= 6.1.2 |
16 | %{?with_tests:BuildRequires: python} | |
880c7dcc | 17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
fd41772a AM |
18 | |
19 | %description | |
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. | |
23 | ||
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 | |
26 | %{name}. | |
27 | ||
28 | %prep | |
29 | %setup -q | |
30 | ||
31 | # bundled clipper | |
880c7dcc | 32 | rm -r clipper |
fd41772a AM |
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 | |
36 | ||
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 | |
40 | ||
41 | %build | |
42 | CXX="%{__cxx}" \ | |
43 | CFLAGS="-I. -Ilibs -c %{rpmcflags} %{rpmcppflags} -std=c++11 -fomit-frame-pointer" \ | |
44 | %{__make} | |
45 | ||
46 | %{?with_tests:%{__make} test} | |
47 | ||
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
880c7dcc ER |
50 | install -d $RPM_BUILD_ROOT%{_bindir}/%{name} |
51 | install -p build/%{name} $RPM_BUILD_ROOT%{_bindir} | |
fd41772a AM |
52 | |
53 | %clean | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %files | |
57 | %defattr(644,root,root,755) | |
58 | %doc LICENSE README.md | |
59 | %attr(755,root,root) %{_bindir}/%{name} |