1 Summary: 3D printer control software
5 Group: Applications/Engineering
7 # Icons AGPLv3 https://github.com/daid/Cura/issues/231#issuecomment-12209683
8 # Example models are CC-BY-SA
9 # TweakAtZ.py is CC-BY-SA
10 License: AGPLv3 and CC-BY-SA
11 URL: http://daid.github.com/Cura/
12 Source0: https://github.com/daid/Cura/archive/%{version}.tar.gz
13 # Source0-md5: f41ba365e5b98907cf55fc70e056c2e8
15 Source2: %{name}.desktop
16 # UltimakerPlatforms STLs were stripped from the tarball, don't crash because of that
17 Patch0: %{name}-dont-show-nc-stls.patch
19 Patch1: %{name}-system-paths.patch
20 # Rework the logic of determining the version (didn't work)
21 Patch2: %{name}-version.patch
22 Patch3: %{name}-no-firmware.patch
23 Patch4: %{name}-newlines.patch
24 BuildRequires: desktop-file-utils
25 BuildRequires: dos2unix
26 BuildRequires: gettext
27 BuildRequires: python-devel
28 Requires: CuraEngine >= 14.12.1
31 Requires: python-PyOpenGL
32 Requires: python-numpy
33 Requires: python-power
34 Requires: python-serial
35 Requires: python-wxPython
39 Cura is a project which aims to be an single software solution for 3D
40 printing. While it is developed to be used with the Ultimaker 3D
41 printer, it can be used with other RepRap based designs.
43 Cura helps you to setup an Ultimaker, shows your 3D model, allows for
44 scaling / positioning, can slice the model to G-Code, with sane
45 editable configuration settings and send this G-Code to the 3D printer
49 %setup -qn Cura-%{version}
56 # Use free UltimakerHandle.stl instead of UltimakerRobot_support.stl
57 FILES=$(grep -Ir "UltimakerRobot_support.stl" . | cut -f1 -d: | sort | uniq | grep -v Attribution.txt | tr '\n' ' ')
58 sed -i 's/UltimakerRobot_support.stl/UltimakerHandle.stl/g' $FILES
60 dos2unix resources/example/Attribution.txt
62 sed -i 's/REPLACE_THIS_IN_SPEC/%{version}/' Cura/util/version.py
64 mv resources/locale/{zh,zh_CN}
65 rm -rf resources/locale/po
72 do msgfmt $FILE/LC_MESSAGES/Cura.po -o $FILE/LC_MESSAGES/Cura.mo
73 rm $FILE/LC_MESSAGES/Cura.po
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura
80 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/firmware
81 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
82 install -d $RPM_BUILD_ROOT%{_localedir}
83 install -d $RPM_BUILD_ROOT%{_bindir}
85 cp -apr Cura/* $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura
86 rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura/LICENSE
87 cp -apr resources/* $RPM_BUILD_ROOT%{_datadir}/%{name}
88 cp -apr plugins $RPM_BUILD_ROOT%{_datadir}/%{name}
89 cp -ap %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
90 ln -s %{_datadir}/%{name} $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura/resources
91 ln -s %{_datadir}/%{name}/%{name}.ico $RPM_BUILD_ROOT%{_pixmapsdir}
94 cp -a $RPM_BUILD_ROOT%{_datadir}/%{name}/locale/* $RPM_BUILD_ROOT%{_localedir}
95 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/locale
96 ln -s -f %{_localedir}/ $RPM_BUILD_ROOT%{_datadir}/%{name}/ # the app expects the locale folder in here
98 desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} %{SOURCE2}
103 rm -rf $RPM_BUILD_ROOT
106 %defattr(644,root,root,755)
107 %doc Cura/LICENSE resources/example/Attribution.txt
108 %{py_sitescriptdir}/Cura
110 %{_pixmapsdir}/%{name}.ico
111 %{_desktopdir}/%{name}.desktop
112 %attr(755,root,root) %{_bindir}/%{name}