]> git.pld-linux.org Git - packages/cura.git/blob - cura.spec
- more fixes, partially works (doesn't generate gcode unfortunately)
[packages/cura.git] / cura.spec
1 Summary:        3D printer control software
2 Name:           cura
3 Version:        15.02.1
4 Release:        0.1
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
11 URL:            http://daid.github.com/Cura/
12 Source0:        https://github.com/daid/Cura/archive/%{version}.tar.gz
13 # Source0-md5:  f41ba365e5b98907cf55fc70e056c2e8
14 Source1:        %{name}
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
18 # Use system paths
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
29 #?
30 #Requires:      pypy
31 Requires:       python-PyOpenGL
32 Requires:       python-numpy
33 Requires:       python-power
34 Requires:       python-serial
35 Requires:       python-wxPython
36 BuildArch:      noarch
37
38 %description
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.
42
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
46 for printing.
47
48 %prep
49 %setup -qn Cura-%{version}
50 %patch0 -p1
51 %patch1 -p1
52 %patch2 -p1
53 %patch3 -p1
54 %patch4 -p1
55
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
59
60 dos2unix resources/example/Attribution.txt
61
62 sed -i 's/REPLACE_THIS_IN_SPEC/%{version}/' Cura/util/version.py
63
64 mv resources/locale/{zh,zh_CN}
65 rm -rf resources/locale/po
66
67 %build
68 # rebuild locales
69 cd resources/locale
70 rm *.in *.pot
71 for FILE in *
72   do msgfmt $FILE/LC_MESSAGES/Cura.po -o $FILE/LC_MESSAGES/Cura.mo
73   rm $FILE/LC_MESSAGES/Cura.po
74 done
75 cd -
76
77 %install
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}
84
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}
92
93 # locales
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
97
98 desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} %{SOURCE2}
99
100 %{find_lang} Cura
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %files -f Cura.lang
106 %defattr(644,root,root,755)
107 %doc Cura/LICENSE resources/example/Attribution.txt
108 %{py_sitescriptdir}/Cura
109 %{_datadir}/%{name}
110 %{_pixmapsdir}/%{name}.ico
111 %{_desktopdir}/%{name}.desktop
112 %attr(755,root,root) %{_bindir}/%{name}
This page took 0.10128 seconds and 3 git commands to generate.