]>
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 | |
913bfb50 | 7 | Version: 2.5.0 |
efa3bdeb | 8 | Release: 2 |
913bfb50 | 9 | Epoch: 1 |
fd41772a AM |
10 | License: AGPLv3 |
11 | Group: Applications/Engineering | |
913bfb50 JR |
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 | |
880c7dcc | 17 | URL: https://github.com/Ultimaker/CuraEngine |
913bfb50 JR |
18 | BuildRequires: cmake |
19 | BuildRequires: libArcus-devel = %{version} | |
880c7dcc | 20 | BuildRequires: libstdc++-devel |
fd41772a | 21 | BuildRequires: polyclipping-devel >= 6.1.2 |
913bfb50 | 22 | BuildRequires: protobuf-devel |
fd41772a | 23 | %{?with_tests:BuildRequires: python} |
913bfb50 | 24 | BuildRequires: rapidjson-devel |
880c7dcc | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
fd41772a AM |
26 | |
27 | %description | |
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. | |
31 | ||
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 | |
34 | %{name}. | |
35 | ||
36 | %prep | |
37 | %setup -q | |
913bfb50 JR |
38 | %patch0 -p1 |
39 | %patch1 -p1 | |
40 | %patch2 -p1 | |
fd41772a | 41 | |
913bfb50 JR |
42 | # bundled libraries |
43 | rm -rf libs | |
44 | sed -i 's|#include <clipper/clipper.hpp>|#include <polyclipping/clipper.hpp>|' src/utils/*.h src/*.cpp | |
fd41772a | 45 | |
913bfb50 JR |
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 | |
fd41772a AM |
48 | |
49 | %build | |
913bfb50 JR |
50 | mkdir build |
51 | cd build | |
52 | %{cmake} .. \ | |
53 | -DBUILD_SHARED_LIBS:BOOL=OFF \ | |
54 | -DCURA_ENGINE_VERSION:STRING=%{version} | |
55 | ||
56 | %{__make} | |
fd41772a AM |
57 | |
58 | %{?with_tests:%{__make} test} | |
59 | ||
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
913bfb50 JR |
62 | |
63 | %{__make} -C build install \ | |
64 | DESTDIR=$RPM_BUILD_ROOT | |
fd41772a AM |
65 | |
66 | %clean | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %files | |
70 | %defattr(644,root,root,755) | |
71 | %doc LICENSE README.md | |
72 | %attr(755,root,root) %{_bindir}/%{name} |