]>
Commit | Line | Data |
---|---|---|
30bab2a9 AM |
1 | Summary: 3D printer control software |
2 | Name: cura | |
3 | Version: 15.02.1 | |
eb8492b3 | 4 | Release: 1 |
30bab2a9 AM |
5 | Group: Applications/Engineering |
6 | # Code is AGPLv3 | |
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 | |
30bab2a9 AM |
11 | Source0: https://github.com/daid/Cura/archive/%{version}.tar.gz |
12 | # Source0-md5: f41ba365e5b98907cf55fc70e056c2e8 | |
13 | Source1: %{name} | |
14 | Source2: %{name}.desktop | |
30bab2a9 | 15 | Patch0: %{name}-dont-show-nc-stls.patch |
30bab2a9 | 16 | Patch1: %{name}-system-paths.patch |
30bab2a9 AM |
17 | Patch2: %{name}-version.patch |
18 | Patch3: %{name}-no-firmware.patch | |
19 | Patch4: %{name}-newlines.patch | |
81663a1b | 20 | URL: http://daid.github.com/Cura/ |
30bab2a9 AM |
21 | BuildRequires: desktop-file-utils |
22 | BuildRequires: dos2unix | |
23 | BuildRequires: gettext | |
81663a1b ER |
24 | BuildRequires: rpm-pythonprov |
25 | BuildRequires: rpmbuild(macros) >= 1.219 | |
30bab2a9 | 26 | Requires: CuraEngine >= 14.12.1 |
30bab2a9 AM |
27 | Requires: python-PyOpenGL |
28 | Requires: python-numpy | |
29 | Requires: python-power | |
30 | Requires: python-serial | |
da393406 | 31 | Requires: python-wxPython |
30bab2a9 | 32 | BuildArch: noarch |
81663a1b | 33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30bab2a9 AM |
34 | |
35 | %description | |
36 | Cura is a project which aims to be an single software solution for 3D | |
37 | printing. While it is developed to be used with the Ultimaker 3D | |
38 | printer, it can be used with other RepRap based designs. | |
39 | ||
40 | Cura helps you to setup an Ultimaker, shows your 3D model, allows for | |
41 | scaling / positioning, can slice the model to G-Code, with sane | |
42 | editable configuration settings and send this G-Code to the 3D printer | |
43 | for printing. | |
44 | ||
45 | %prep | |
46 | %setup -qn Cura-%{version} | |
47 | %patch0 -p1 | |
48 | %patch1 -p1 | |
49 | %patch2 -p1 | |
50 | %patch3 -p1 | |
51 | %patch4 -p1 | |
52 | ||
53 | # Use free UltimakerHandle.stl instead of UltimakerRobot_support.stl | |
54 | FILES=$(grep -Ir "UltimakerRobot_support.stl" . | cut -f1 -d: | sort | uniq | grep -v Attribution.txt | tr '\n' ' ') | |
55 | sed -i 's/UltimakerRobot_support.stl/UltimakerHandle.stl/g' $FILES | |
56 | ||
57 | dos2unix resources/example/Attribution.txt | |
58 | ||
59 | sed -i 's/REPLACE_THIS_IN_SPEC/%{version}/' Cura/util/version.py | |
60 | ||
61 | mv resources/locale/{zh,zh_CN} | |
eb8492b3 | 62 | rm -rf resources/locale/{en,po} |
30bab2a9 AM |
63 | |
64 | %build | |
65 | # rebuild locales | |
66 | cd resources/locale | |
67 | rm *.in *.pot | |
81663a1b ER |
68 | for FILE in *; do |
69 | msgfmt $FILE/LC_MESSAGES/Cura.po -o $FILE/LC_MESSAGES/Cura.mo | |
70 | rm $FILE/LC_MESSAGES/Cura.po | |
30bab2a9 | 71 | done |
30bab2a9 AM |
72 | |
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
81663a1b | 75 | install -d $RPM_BUILD_ROOT{%{_bindir},%{py_sitescriptdir}/Cura,%{_datadir}/%{name}/firmware,%{_pixmapsdir},%{_localedir}} |
30bab2a9 | 76 | |
81663a1b ER |
77 | cp -a Cura/* $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura |
78 | rm $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura/LICENSE | |
79 | cp -a resources/* $RPM_BUILD_ROOT%{_datadir}/%{name} | |
80 | cp -a plugins $RPM_BUILD_ROOT%{_datadir}/%{name} | |
81 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir} | |
30bab2a9 AM |
82 | ln -s %{_datadir}/%{name} $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura/resources |
83 | ln -s %{_datadir}/%{name}/%{name}.ico $RPM_BUILD_ROOT%{_pixmapsdir} | |
84 | ||
85 | # locales | |
86 | cp -a $RPM_BUILD_ROOT%{_datadir}/%{name}/locale/* $RPM_BUILD_ROOT%{_localedir} | |
87 | rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/locale | |
81663a1b | 88 | ln -sf %{_localedir}/ $RPM_BUILD_ROOT%{_datadir}/%{name}/ # the app expects the locale folder in here |
30bab2a9 AM |
89 | |
90 | desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} %{SOURCE2} | |
91 | ||
81663a1b ER |
92 | %find_lang Cura |
93 | %py_postclean | |
30bab2a9 AM |
94 | |
95 | %clean | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %files -f Cura.lang | |
99 | %defattr(644,root,root,755) | |
100 | %doc Cura/LICENSE resources/example/Attribution.txt | |
81663a1b | 101 | %attr(755,root,root) %{_bindir}/%{name} |
30bab2a9 | 102 | %{py_sitescriptdir}/Cura |
30bab2a9 AM |
103 | %{_pixmapsdir}/%{name}.ico |
104 | %{_desktopdir}/%{name}.desktop | |
81663a1b | 105 | %{_datadir}/%{name} |