1 Summary: 3D printer control software
6 Group: Applications/Engineering
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
12 Source0: https://github.com/Ultimaker/Cura/archive/%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5: ebe1b78c8b9ce77c289a266c9e732dc8
14 Source1: https://github.com/Ultimaker/fdm_materials/archive/%{version}/fdm_materials-%{version}.tar.gz
15 # Source1-md5: bf8f25394273d7b6333a856b6a1c94ce
16 Patch0: plugins-path.patch
20 URL: https://ultimaker.com/en/products/cura-software
22 BuildRequires: desktop-file-utils
23 BuildRequires: gettext
24 BuildRequires: gettext-tools
25 BuildRequires: python3-Uranium = %{version}
26 BuildRequires: python3-devel
27 BuildRequires: python3-pytest
28 BuildRequires: rpm-pythonprov
29 BuildRequires: rpmbuild(macros) >= 1.219
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
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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
55 %setup -q -n Cura-%{version} -a1
61 # Invalid locale names ptbr and jp
62 %{__mv} resources/i18n/{ptbr,pt_BR}
63 %{__mv} resources/i18n/{jp,ja}
65 # The setup.py is only useful for py2exe, remove it, so noone is tempted to use it
68 # Upstream installs to lib/python3/dist-packages
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
73 %{__sed} -i '1s=^#!%{_bindir}/\(python\|env python\)3*=#!%{__python3}=' cura_app.py
79 -DCURA_VERSION:STRING=%{version}
83 cd ../fdm_materials-%{version}
91 rm -rf $RPM_BUILD_ROOT
93 %{__make} -C build install DESTDIR=$RPM_BUILD_ROOT
94 %{__make} -C fdm_materials-%{version}/build install DESTDIR=$RPM_BUILD_ROOT
96 # Sanitize the location of locale files
97 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{cura/resources/i18n,locale}
98 ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/cura/resources/i18n
99 %{__rm} $RPM_BUILD_ROOT%{_localedir}/*/*.po
100 %{__rm} $RPM_BUILD_ROOT%{_localedir}/*.pot
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
106 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
107 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
110 %find_lang cura --all-name
113 rm -rf $RPM_BUILD_ROOT
116 %defattr(644,root,root,755)
117 %attr(755,root,root) %{_bindir}/%{name}
118 %{py3_sitescriptdir}/cura
119 %{_desktopdir}/%{name}.desktop
121 %{_datadir}/appdata/cura.appdata.xml
122 %{_datadir}/mime/packages/cura.xml