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
30 Requires: python-PyOpenGL
31 Requires: python-numpy
32 Requires: python-power
33 Requires: python-serial
38 Cura is a project which aims to be an single software solution for 3D
39 printing. While it is developed to be used with the Ultimaker 3D
40 printer, it can be used with other RepRap based designs.
42 Cura helps you to setup an Ultimaker, shows your 3D model, allows for
43 scaling / positioning, can slice the model to G-Code, with sane
44 editable configuration settings and send this G-Code to the 3D printer
48 %setup -qn Cura-%{version}
55 # Use free UltimakerHandle.stl instead of UltimakerRobot_support.stl
56 FILES=$(grep -Ir "UltimakerRobot_support.stl" . | cut -f1 -d: | sort | uniq | grep -v Attribution.txt | tr '\n' ' ')
57 sed -i 's/UltimakerRobot_support.stl/UltimakerHandle.stl/g' $FILES
59 dos2unix resources/example/Attribution.txt
61 sed -i 's/REPLACE_THIS_IN_SPEC/%{version}/' Cura/util/version.py
63 mv resources/locale/{zh,zh_CN}
64 rm -rf resources/locale/po
71 do msgfmt $FILE/LC_MESSAGES/Cura.po -o $FILE/LC_MESSAGES/Cura.mo
72 rm $FILE/LC_MESSAGES/Cura.po
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura
79 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/firmware
80 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
81 install -d $RPM_BUILD_ROOT%{_localedir}
82 install -d $RPM_BUILD_ROOT%{_bindir}
84 cp -apr Cura/* $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura
85 rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura/LICENSE
86 cp -apr resources/* $RPM_BUILD_ROOT%{_datadir}/%{name}
87 cp -apr plugins $RPM_BUILD_ROOT%{_datadir}/%{name}
88 cp -ap %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
89 ln -s %{_datadir}/%{name} $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura/resources
90 ln -s %{_datadir}/%{name}/%{name}.ico $RPM_BUILD_ROOT%{_pixmapsdir}
93 cp -a $RPM_BUILD_ROOT%{_datadir}/%{name}/locale/* $RPM_BUILD_ROOT%{_localedir}
94 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/locale
95 ln -s -f %{_localedir}/ $RPM_BUILD_ROOT%{_datadir}/%{name}/ # the app expects the locale folder in here
97 desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} %{SOURCE2}
102 rm -rf $RPM_BUILD_ROOT
105 %defattr(644,root,root,755)
106 %doc Cura/LICENSE resources/example/Attribution.txt
107 %{py_sitescriptdir}/Cura
109 %{_pixmapsdir}/%{name}.ico
110 %{_desktopdir}/%{name}.desktop
111 %attr(755,root,root) %{_bindir}/%{name}