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 Source0: https://github.com/daid/Cura/archive/%{version}.tar.gz
12 # Source0-md5: f41ba365e5b98907cf55fc70e056c2e8
14 Source2: %{name}.desktop
15 Patch0: %{name}-dont-show-nc-stls.patch
16 Patch1: %{name}-system-paths.patch
17 Patch2: %{name}-version.patch
18 Patch3: %{name}-no-firmware.patch
19 Patch4: %{name}-newlines.patch
20 URL: http://daid.github.com/Cura/
21 BuildRequires: desktop-file-utils
22 BuildRequires: dos2unix
23 BuildRequires: rpm-pythonprov
24 BuildRequires: rpmbuild(macros) >= 1.219
25 Requires: CuraEngine >= 14.12.1
26 Requires: python-PyOpenGL
27 Requires: python-numpy
28 Requires: python-power
29 Requires: python-serial
30 Requires: python-wxPython
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Cura is a project which aims to be an single software solution for 3D
36 printing. While it is developed to be used with the Ultimaker 3D
37 printer, it can be used with other RepRap based designs.
39 Cura helps you to setup an Ultimaker, shows your 3D model, allows for
40 scaling / positioning, can slice the model to G-Code, with sane
41 editable configuration settings and send this G-Code to the 3D printer
45 %setup -qn Cura-%{version}
52 # Use free UltimakerHandle.stl instead of UltimakerRobot_support.stl
53 FILES=$(grep -Ir "UltimakerRobot_support.stl" . | cut -f1 -d: | sort | uniq | grep -v Attribution.txt | tr '\n' ' ')
54 sed -i 's/UltimakerRobot_support.stl/UltimakerHandle.stl/g' $FILES
56 dos2unix resources/example/Attribution.txt
58 sed -i 's/REPLACE_THIS_IN_SPEC/%{version}/' Cura/util/version.py
60 mv resources/locale/{zh,zh_CN}
61 rm -rf resources/locale/{en,po}
68 msgfmt $FILE/LC_MESSAGES/Cura.po -o $FILE/LC_MESSAGES/Cura.mo
69 rm $FILE/LC_MESSAGES/Cura.po
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT{%{_bindir},%{py_sitescriptdir}/Cura,%{_datadir}/%{name}/firmware,%{_pixmapsdir},%{_localedir}}
76 cp -a Cura/* $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura
77 rm $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura/LICENSE
78 cp -a resources/* $RPM_BUILD_ROOT%{_datadir}/%{name}
79 cp -a plugins $RPM_BUILD_ROOT%{_datadir}/%{name}
80 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
81 ln -s %{_datadir}/%{name} $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura/resources
82 ln -s %{_datadir}/%{name}/%{name}.ico $RPM_BUILD_ROOT%{_pixmapsdir}
85 cp -a $RPM_BUILD_ROOT%{_datadir}/%{name}/locale/* $RPM_BUILD_ROOT%{_localedir}
86 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/locale
87 ln -sf %{_localedir}/ $RPM_BUILD_ROOT%{_datadir}/%{name}/ # the app expects the locale folder in here
89 desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} %{SOURCE2}
95 rm -rf $RPM_BUILD_ROOT
98 %defattr(644,root,root,755)
99 %doc Cura/LICENSE resources/example/Attribution.txt
100 %attr(755,root,root) %{_bindir}/%{name}
101 %{py_sitescriptdir}/Cura
102 %{_pixmapsdir}/%{name}.ico
103 %{_desktopdir}/%{name}.desktop