]>
Commit | Line | Data |
---|---|---|
30bab2a9 AM |
1 | Summary: 3D printer control software |
2 | Name: cura | |
bb32f111 JR |
3 | Version: 2.5.0 |
4 | Release: 1 | |
5 | Epoch: 1 | |
30bab2a9 AM |
6 | Group: Applications/Engineering |
7 | # Code is AGPLv3 | |
8 | # Icons AGPLv3 https://github.com/daid/Cura/issues/231#issuecomment-12209683 | |
9 | # Example models are CC-BY-SA | |
10 | # TweakAtZ.py is CC-BY-SA | |
11 | License: AGPLv3 and CC-BY-SA | |
bb32f111 JR |
12 | Source0: https://github.com/Ultimaker/Cura/archive/%{version}/%{name}-%{version}.tar.gz |
13 | # Source0-md5: ebe1b78c8b9ce77c289a266c9e732dc8 | |
30bab2a9 | 14 | Source1: %{name} |
bb32f111 JR |
15 | Patch0: plugins-path.patch |
16 | URL: https://ultimaker.com/en/products/cura-software | |
17 | BuildRequires: cmake | |
30bab2a9 AM |
18 | BuildRequires: desktop-file-utils |
19 | BuildRequires: dos2unix | |
bb32f111 | 20 | BuildRequires: gettext |
2c51c5a7 | 21 | BuildRequires: gettext-tools |
bb32f111 JR |
22 | BuildRequires: python3-Uranium = %{version} |
23 | BuildRequires: python3-devel | |
24 | BuildRequires: python3-pytest | |
81663a1b ER |
25 | BuildRequires: rpm-pythonprov |
26 | BuildRequires: rpmbuild(macros) >= 1.219 | |
bb32f111 JR |
27 | Requires: CuraEngine = %{epoch}:%{version} |
28 | Requires: Qt5Quick-controls | |
29 | Requires: fonts-TTF-OpenSans | |
30 | Requires: python3-PyOpenGL | |
31 | Requires: python3-PyQt5 | |
32 | Requires: python3-numpy | |
33 | Requires: python3-power | |
34 | Requires: python3-savitar | |
35 | Requires: python3-serial | |
36 | Requires: python3-Uranium = %{version} | |
37 | Requires: python3-zeroconf | |
30bab2a9 | 38 | BuildArch: noarch |
81663a1b | 39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30bab2a9 AM |
40 | |
41 | %description | |
42 | Cura is a project which aims to be an single software solution for 3D | |
43 | printing. While it is developed to be used with the Ultimaker 3D | |
44 | printer, it can be used with other RepRap based designs. | |
45 | ||
46 | Cura helps you to setup an Ultimaker, shows your 3D model, allows for | |
47 | scaling / positioning, can slice the model to G-Code, with sane | |
48 | editable configuration settings and send this G-Code to the 3D printer | |
49 | for printing. | |
50 | ||
51 | %prep | |
bb32f111 | 52 | %setup -q -n Cura-%{version} |
30bab2a9 | 53 | %patch0 -p1 |
30bab2a9 | 54 | |
bb32f111 JR |
55 | # The setup.py is only useful for py2exe, remove it, so noone is tempted to use it |
56 | rm setup.py | |
30bab2a9 | 57 | |
bb32f111 JR |
58 | # https://github.com/Ultimaker/Cura/issues/1784 |
59 | sed -i 's/Version=1/Version=1.1/' cura.desktop.in | |
30bab2a9 | 60 | |
bb32f111 JR |
61 | # Upstream installs to lib/python3/dist-packages |
62 | # We want to install to %%{py3_sitescriptdir} | |
63 | sed -i 's|lib/python${PYTHON_VERSION_MAJOR}/dist-packages|%(echo %{py3_sitescriptdir} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt | |
30bab2a9 | 64 | |
bb32f111 JR |
65 | # Wrong end of line encoding |
66 | dos2unix docs/How_to_use_the_flame_graph_profiler.md | |
67 | ||
68 | # Wrong shebang | |
69 | sed -i '1s=^#!%{_bindir}/\(python\|env python\)3*=#!%{__python3}=' cura_app.py | |
70 | ||
71 | # Invalid locale name ptbr | |
72 | # https://github.com/Ultimaker/Uranium/issues/246 | |
73 | mv resources/i18n/{ptbr,pt_BR} | |
74 | sed -i 's/"Language: ptbr\n"/"Language: pt_BR\n"/' resources/i18n/pt_BR/*.po | |
75 | ||
76 | # Failing test, mixes sets and lists :( | |
77 | # Changed in master, not reporting to upstream | |
78 | sed -i -e '0,/set()/{s/set()/[]/}' \ | |
79 | -e 's/{/[/g' \ | |
80 | -e 's/}/]/g' \ | |
81 | tests/TestMachineAction.py | |
30bab2a9 AM |
82 | |
83 | %build | |
bb32f111 JR |
84 | mkdir build |
85 | cd build | |
86 | %{cmake} .. \ | |
87 | -DCURA_VERSION:STRING=%{version} | |
88 | ||
89 | %{__make} | |
30bab2a9 AM |
90 | |
91 | %install | |
92 | rm -rf $RPM_BUILD_ROOT | |
bb32f111 | 93 | %{__make} -C build install DESTDIR=$RPM_BUILD_ROOT |
30bab2a9 | 94 | |
bb32f111 JR |
95 | # Sanitize the location of locale files |
96 | mv $RPM_BUILD_ROOT%{_datadir}/{cura/resources/i18n,locale} | |
97 | ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/cura/resources/i18n | |
98 | rm $RPM_BUILD_ROOT%{_localedir}/*/*.po | |
99 | rm $RPM_BUILD_ROOT%{_localedir}/*.pot | |
30bab2a9 | 100 | |
bb32f111 JR |
101 | # Unbundle fonts |
102 | rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/resources/themes/cura/fonts/ | |
103 | ln -s %{_datadir}/fonts/open-sans/ $RPM_BUILD_ROOT%{_datadir}/%{name}/resources/themes/cura/fonts | |
7d3e6bb0 AM |
104 | |
105 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
106 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
81663a1b | 107 | %py_postclean |
30bab2a9 | 108 | |
bb32f111 JR |
109 | %find_lang cura --all-name |
110 | ||
30bab2a9 AM |
111 | %clean |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
bb32f111 | 114 | %files -f cura.lang |
30bab2a9 | 115 | %defattr(644,root,root,755) |
81663a1b | 116 | %attr(755,root,root) %{_bindir}/%{name} |
bb32f111 | 117 | %{py3_sitescriptdir}/cura |
30bab2a9 | 118 | %{_desktopdir}/%{name}.desktop |
81663a1b | 119 | %{_datadir}/%{name} |
bb32f111 JR |
120 | %{_datadir}/appdata/cura.appdata.xml |
121 | %{_datadir}/mime/packages/cura.xml |