]> git.pld-linux.org Git - packages/cura.git/blame - cura.spec
- more fixes, partially works (doesn't generate gcode unfortunately)
[packages/cura.git] / cura.spec
CommitLineData
30bab2a9
AM
1Summary: 3D printer control software
2Name: cura
3Version: 15.02.1
4Release: 0.1
5Group: 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
10License: AGPLv3 and CC-BY-SA
11URL: http://daid.github.com/Cura/
12Source0: https://github.com/daid/Cura/archive/%{version}.tar.gz
13# Source0-md5: f41ba365e5b98907cf55fc70e056c2e8
14Source1: %{name}
15Source2: %{name}.desktop
16# UltimakerPlatforms STLs were stripped from the tarball, don't crash because of that
17Patch0: %{name}-dont-show-nc-stls.patch
18# Use system paths
19Patch1: %{name}-system-paths.patch
20# Rework the logic of determining the version (didn't work)
21Patch2: %{name}-version.patch
22Patch3: %{name}-no-firmware.patch
23Patch4: %{name}-newlines.patch
24BuildRequires: desktop-file-utils
25BuildRequires: dos2unix
26BuildRequires: gettext
27BuildRequires: python-devel
28Requires: CuraEngine >= 14.12.1
da393406
AM
29#?
30#Requires: pypy
30bab2a9
AM
31Requires: python-PyOpenGL
32Requires: python-numpy
33Requires: python-power
34Requires: python-serial
da393406 35Requires: python-wxPython
30bab2a9
AM
36BuildArch: noarch
37
38%description
39Cura is a project which aims to be an single software solution for 3D
40printing. While it is developed to be used with the Ultimaker 3D
41printer, it can be used with other RepRap based designs.
42
43Cura helps you to setup an Ultimaker, shows your 3D model, allows for
44scaling / positioning, can slice the model to G-Code, with sane
45editable configuration settings and send this G-Code to the 3D printer
46for 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
57FILES=$(grep -Ir "UltimakerRobot_support.stl" . | cut -f1 -d: | sort | uniq | grep -v Attribution.txt | tr '\n' ' ')
58sed -i 's/UltimakerRobot_support.stl/UltimakerHandle.stl/g' $FILES
59
60dos2unix resources/example/Attribution.txt
61
62sed -i 's/REPLACE_THIS_IN_SPEC/%{version}/' Cura/util/version.py
63
64mv resources/locale/{zh,zh_CN}
65rm -rf resources/locale/po
66
67%build
68# rebuild locales
69cd resources/locale
70rm *.in *.pot
71for FILE in *
72 do msgfmt $FILE/LC_MESSAGES/Cura.po -o $FILE/LC_MESSAGES/Cura.mo
73 rm $FILE/LC_MESSAGES/Cura.po
74done
75cd -
76
77%install
78rm -rf $RPM_BUILD_ROOT
79install -d $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura
80install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/firmware
81install -d $RPM_BUILD_ROOT%{_pixmapsdir}
82install -d $RPM_BUILD_ROOT%{_localedir}
83install -d $RPM_BUILD_ROOT%{_bindir}
84
85cp -apr Cura/* $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura
86rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura/LICENSE
87cp -apr resources/* $RPM_BUILD_ROOT%{_datadir}/%{name}
88cp -apr plugins $RPM_BUILD_ROOT%{_datadir}/%{name}
89cp -ap %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}
90ln -s %{_datadir}/%{name} $RPM_BUILD_ROOT%{py_sitescriptdir}/Cura/resources
91ln -s %{_datadir}/%{name}/%{name}.ico $RPM_BUILD_ROOT%{_pixmapsdir}
92
93# locales
94cp -a $RPM_BUILD_ROOT%{_datadir}/%{name}/locale/* $RPM_BUILD_ROOT%{_localedir}
95rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/locale
96ln -s -f %{_localedir}/ $RPM_BUILD_ROOT%{_datadir}/%{name}/ # the app expects the locale folder in here
97
98desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} %{SOURCE2}
99
100%{find_lang} Cura
101
102%clean
103rm -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.081876 seconds and 4 git commands to generate.