]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with tests # build with tests | |
4 | ||
5 | Summary: Engine for processing 3D models into G-code instructions for 3D printers | |
6 | Summary(pl.UTF-8): Silnik do przetwarzania modeli 3D na instrukcje G-code dla drukarek 3D | |
7 | Name: CuraEngine | |
8 | Version: 3.5.1 | |
9 | Release: 6 | |
10 | Epoch: 1 | |
11 | License: AGPL v3 | |
12 | Group: Applications/Engineering | |
13 | #Source0Download: https://github.com/Ultimaker/CuraEngine/releases | |
14 | Source0: https://github.com/Ultimaker/CuraEngine/archive/%{version}/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: 54800673b165c69dff2978e7b7a58e70 | |
16 | Source1: https://raw.githubusercontent.com/nothings/stb/master/stb_image.h | |
17 | # Source1-md5: 2a512ad9f82f104b8120e52babd37cc7 | |
18 | Patch0: %{name}-rpath.patch | |
19 | Patch1: %{name}-static-libstdcpp.patch | |
20 | Patch2: local-stb.patch | |
21 | URL: https://github.com/Ultimaker/CuraEngine | |
22 | BuildRequires: cmake >= 2.8.12 | |
23 | BuildRequires: libArcus-devel = %{version} | |
24 | BuildRequires: libgomp-devel | |
25 | BuildRequires: libstdc++-devel >= 6:4.7 | |
26 | BuildRequires: polyclipping-devel >= 6.1.2 | |
27 | BuildRequires: protobuf-devel >= 3.0.0 | |
28 | %{?with_tests:BuildRequires: python3 >= 1:3} | |
29 | BuildRequires: rapidjson-devel | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | CuraEngine is a C++ console application for 3D printing G-code | |
34 | generation. It has been made as a better and faster alternative to the | |
35 | old Skeinforge engine. | |
36 | ||
37 | This is just a console application for G-code generation. For a full | |
38 | graphical application look at cura with is the graphical frontend for | |
39 | CuraEngine. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | CuraEngine to aplikacja konsolowa C++ do generowania intrukcji G-code | |
43 | dla drukarek 3D. Powstała jako lepsza i szybsza alternatywa dla | |
44 | starego silnika Skeinforge. | |
45 | ||
46 | To jest tylko aplikacja konsolowa do generowania kodu. Pełna graficzna | |
47 | aplikacja, będąca graficznym interfejsem do CuraEngine, znajduje się w | |
48 | pakiecie cura. | |
49 | ||
50 | %prep | |
51 | %setup -q | |
52 | %patch0 -p1 | |
53 | %patch1 -p1 | |
54 | %patch2 -p1 | |
55 | ||
56 | mkdir stb | |
57 | cp -p %{SOURCE1} stb/ | |
58 | ||
59 | # bundled libraries | |
60 | %{__rm} -rf libs | |
61 | %{__sed} -i 's|#include <clipper/clipper.hpp>|#include <polyclipping/clipper.hpp>|' src/utils/*.h src/*.cpp | |
62 | ||
63 | # The -DCURA_ENGINE_VERSION does not work, so we sed-change the default value | |
64 | %{__sed} -i 's/"DEV"/"%{version}"/' src/settings/settings.h | |
65 | ||
66 | %build | |
67 | mkdir build | |
68 | cd build | |
69 | %cmake .. \ | |
70 | -DStb_INCLUDE_DIRS:STRING="$(pwd)/.." \ | |
71 | -DUSE_SYSTEM_LIBS:BOOL=ON \ | |
72 | -DBUILD_SHARED_LIBS:BOOL=OFF \ | |
73 | -DCURA_ENGINE_VERSION:STRING=%{version} | |
74 | ||
75 | %{__make} | |
76 | ||
77 | %{?with_tests:%{__make} test} | |
78 | ||
79 | %install | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %{__make} -C build install \ | |
83 | DESTDIR=$RPM_BUILD_ROOT | |
84 | ||
85 | %clean | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %files | |
89 | %defattr(644,root,root,755) | |
90 | %doc README.md | |
91 | %attr(755,root,root) %{_bindir}/%{name} |