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