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