]> git.pld-linux.org Git - packages/CuraEngine.git/blob - CuraEngine.spec
- release 5
[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 Name:           CuraEngine
7 Version:        2.5.0
8 Release:        2
9 Epoch:          1
10 License:        AGPLv3
11 Group:          Applications/Engineering
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
17 URL:            https://github.com/Ultimaker/CuraEngine
18 BuildRequires:  cmake
19 BuildRequires:  libArcus-devel = %{version}
20 BuildRequires:  libstdc++-devel
21 BuildRequires:  polyclipping-devel >= 6.1.2
22 BuildRequires:  protobuf-devel
23 %{?with_tests:BuildRequires:  python}
24 BuildRequires:  rapidjson-devel
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
38 %patch0 -p1
39 %patch1 -p1
40 %patch2 -p1
41
42 # bundled libraries
43 rm -rf libs
44 sed -i 's|#include <clipper/clipper.hpp>|#include <polyclipping/clipper.hpp>|' src/utils/*.h src/*.cpp
45
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
48
49 %build
50 mkdir build
51 cd build
52 %{cmake} .. \
53         -DBUILD_SHARED_LIBS:BOOL=OFF \
54         -DCURA_ENGINE_VERSION:STRING=%{version}
55
56 %{__make}
57
58 %{?with_tests:%{__make} test}
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62
63 %{__make} -C build install \
64         DESTDIR=$RPM_BUILD_ROOT
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}
This page took 0.067678 seconds and 3 git commands to generate.