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: b02b95a4669110cff62f96e1bb00b1b5
14 Source1: https://github.com/Ultimaker/fdm_materials/archive/%{version}/fdm_materials-%{version}.tar.gz
15 # Source1-md5: 449b2301efb4a4616c5c610bae173d0d
16 Patch0: plugins-path.patch
17 URL: https://ultimaker.com/en/products/cura-software
19 BuildRequires: desktop-file-utils
20 BuildRequires: gettext
21 BuildRequires: gettext-tools
22 BuildRequires: python3-Uranium = %{version}
23 BuildRequires: python3-devel
24 BuildRequires: python3-pytest
25 BuildRequires: rpm-pythonprov
26 BuildRequires: rpmbuild(macros) >= 1.219
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-Uranium = %{version}
33 Requires: python3-numpy
34 Requires: python3-power
35 Requires: python3-savitar >= 2.7.0
36 Requires: python3-serial
37 Requires: python3-zeroconf
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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
52 %setup -q -n Cura-%{version} -a1
55 for bad_lang in de_DE es_ES fi_FI fr_FR it_IT ja_JP ko_KR nl_NL pl_PL pt_PT ru_RU tr_TR ; do
56 lang="$(echo $bad_lang | sed 's/_.*//')"
57 %{__mv} "resources/i18n/$bad_lang" "resources/i18n/$lang"
60 # Upstream installs to lib/python3/dist-packages
61 # We want to install to %{py3_sitescriptdir}
62 %{__sed} -i 's|lib${LIB_SUFFIX}/python${Python3_VERSION_MAJOR}.*/.*-packages|%(echo %{py3_sitescriptdir} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt
65 %{__sed} -i '1s=^#!%{_bindir}/\(python\|env python\)3*=#!%{__python3}=' cura_app.py
71 -DCURA_VERSION:STRING=%{version}
75 cd ../fdm_materials-%{version}
83 rm -rf $RPM_BUILD_ROOT
85 %{__make} -C build install DESTDIR=$RPM_BUILD_ROOT
86 %{__make} -C fdm_materials-%{version}/build install DESTDIR=$RPM_BUILD_ROOT
88 # Sanitize the location of locale files
89 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{cura/resources/i18n,locale}
90 ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/cura/resources/i18n
91 %{__rm} $RPM_BUILD_ROOT%{_localedir}/*/*.po
92 %{__rm} $RPM_BUILD_ROOT%{_localedir}/*.pot
94 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
95 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
98 %find_lang cura --all-name
101 rm -rf $RPM_BUILD_ROOT
104 %update_icon_cache hicolor
107 %update_icon_cache hicolor
110 %defattr(644,root,root,755)
111 %attr(755,root,root) %{_bindir}/%{name}
112 %{py3_sitescriptdir}/cura
113 %{_desktopdir}/%{name}.desktop
115 %{_datadir}/metainfo/cura.appdata.xml
116 %{_datadir}/mime/packages/cura.xml
117 %{_iconsdir}/hicolor/*x*/apps/cura-icon.png