]>
Commit | Line | Data |
---|---|---|
30bab2a9 AM |
1 | Summary: 3D printer control software |
2 | Name: cura | |
91575d31 | 3 | Version: 4.5.0 |
25bcb1cd | 4 | Release: 4 |
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 | 12 | Source0: https://github.com/Ultimaker/Cura/archive/%{version}/%{name}-%{version}.tar.gz |
91575d31 | 13 | # Source0-md5: b02b95a4669110cff62f96e1bb00b1b5 |
e6494e81 | 14 | Source1: https://github.com/Ultimaker/fdm_materials/archive/%{version}/fdm_materials-%{version}.tar.gz |
91575d31 | 15 | # Source1-md5: 449b2301efb4a4616c5c610bae173d0d |
bb32f111 JR |
16 | Patch0: plugins-path.patch |
17 | URL: https://ultimaker.com/en/products/cura-software | |
18 | BuildRequires: cmake | |
30bab2a9 | 19 | BuildRequires: desktop-file-utils |
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 | |
8ab26971 | 32 | Requires: python3-Uranium = %{version} |
bb32f111 JR |
33 | Requires: python3-numpy |
34 | Requires: python3-power | |
8ab26971 | 35 | Requires: python3-savitar >= 2.7.0 |
bb32f111 | 36 | Requires: python3-serial |
bb32f111 | 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 | |
e6494e81 | 52 | %setup -q -n Cura-%{version} -a1 |
30bab2a9 | 53 | %patch0 -p1 |
30bab2a9 | 54 | |
8ab26971 JR |
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" | |
58 | done | |
30bab2a9 | 59 | |
bb32f111 | 60 | # Upstream installs to lib/python3/dist-packages |
b631bce2 | 61 | # We want to install to %{py3_sitescriptdir} |
91575d31 | 62 | %{__sed} -i 's|lib${LIB_SUFFIX}/python${Python3_VERSION_MAJOR}.*/.*-packages|%(echo %{py3_sitescriptdir} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt |
bb32f111 JR |
63 | |
64 | # Wrong shebang | |
b631bce2 | 65 | %{__sed} -i '1s=^#!%{_bindir}/\(python\|env python\)3*=#!%{__python3}=' cura_app.py |
30bab2a9 AM |
66 | |
67 | %build | |
bb32f111 JR |
68 | mkdir build |
69 | cd build | |
70 | %{cmake} .. \ | |
71 | -DCURA_VERSION:STRING=%{version} | |
72 | ||
73 | %{__make} | |
30bab2a9 | 74 | |
e6494e81 JR |
75 | cd ../fdm_materials-%{version} |
76 | mkdir build | |
77 | cd build | |
78 | %{cmake} .. | |
79 | ||
80 | %{__make} | |
81 | ||
30bab2a9 AM |
82 | %install |
83 | rm -rf $RPM_BUILD_ROOT | |
e6494e81 | 84 | |
bb32f111 | 85 | %{__make} -C build install DESTDIR=$RPM_BUILD_ROOT |
e6494e81 | 86 | %{__make} -C fdm_materials-%{version}/build install DESTDIR=$RPM_BUILD_ROOT |
30bab2a9 | 87 | |
bb32f111 | 88 | # Sanitize the location of locale files |
b631bce2 | 89 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/{cura/resources/i18n,locale} |
bb32f111 | 90 | ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/cura/resources/i18n |
b631bce2 JR |
91 | %{__rm} $RPM_BUILD_ROOT%{_localedir}/*/*.po |
92 | %{__rm} $RPM_BUILD_ROOT%{_localedir}/*.pot | |
30bab2a9 | 93 | |
7d3e6bb0 AM |
94 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} |
95 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
81663a1b | 96 | %py_postclean |
30bab2a9 | 97 | |
bb32f111 JR |
98 | %find_lang cura --all-name |
99 | ||
30bab2a9 AM |
100 | %clean |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
8ab26971 JR |
103 | %post |
104 | %update_icon_cache hicolor | |
105 | ||
106 | %postun | |
107 | %update_icon_cache hicolor | |
108 | ||
bb32f111 | 109 | %files -f cura.lang |
30bab2a9 | 110 | %defattr(644,root,root,755) |
81663a1b | 111 | %attr(755,root,root) %{_bindir}/%{name} |
bb32f111 | 112 | %{py3_sitescriptdir}/cura |
30bab2a9 | 113 | %{_desktopdir}/%{name}.desktop |
81663a1b | 114 | %{_datadir}/%{name} |
8ab26971 | 115 | %{_datadir}/metainfo/cura.appdata.xml |
bb32f111 | 116 | %{_datadir}/mime/packages/cura.xml |
8ab26971 | 117 | %{_iconsdir}/hicolor/*x*/apps/cura-icon.png |