]> git.pld-linux.org Git - packages/cura.git/blob - cura.spec
- initial from FC
[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 Requires:       pypy
30 Requires:       python-PyOpenGL
31 Requires:       python-numpy
32 Requires:       python-power
33 Requires:       python-serial
34 Requires:       wxPython
35 BuildArch:      noarch
36
37 %description
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.
41
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
45 for printing.
46
47 %prep
48 %setup -qn Cura-%{version}
49 %patch0 -p1
50 %patch1 -p1
51 %patch2 -p1
52 %patch3 -p1
53 %patch4 -p1
54
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
58
59 dos2unix resources/example/Attribution.txt
60
61 sed -i 's/REPLACE_THIS_IN_SPEC/%{version}/' Cura/util/version.py
62
63 mv resources/locale/{zh,zh_CN}
64 rm -rf resources/locale/po
65
66 %build
67 # rebuild locales
68 cd resources/locale
69 rm *.in *.pot
70 for FILE in *
71   do msgfmt $FILE/LC_MESSAGES/Cura.po -o $FILE/LC_MESSAGES/Cura.mo
72   rm $FILE/LC_MESSAGES/Cura.po
73 done
74 cd -
75
76 %install
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}
83
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}
91
92 # locales
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
96
97 desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} %{SOURCE2}
98
99 %{find_lang} Cura
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %files -f Cura.lang
105 %defattr(644,root,root,755)
106 %doc Cura/LICENSE resources/example/Attribution.txt
107 %{py_sitescriptdir}/Cura
108 %{_datadir}/%{name}
109 %{_pixmapsdir}/%{name}.ico
110 %{_desktopdir}/%{name}.desktop
111 %attr(755,root,root) %{_bindir}/%{name}
This page took 0.152454 seconds and 4 git commands to generate.