]> git.pld-linux.org Git - packages/cura.git/blob - cura.spec
cleanup bogus BR
[packages/cura.git] / cura.spec
1 Summary:        3D printer control software
2 Name:           cura
3 Version:        15.02.1
4 Release:        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 Source0:        https://github.com/daid/Cura/archive/%{version}.tar.gz
12 # Source0-md5:  f41ba365e5b98907cf55fc70e056c2e8
13 Source1:        %{name}
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
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
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.
38
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
42 for printing.
43
44 %prep
45 %setup -qn Cura-%{version}
46 %patch0 -p1
47 %patch1 -p1
48 %patch2 -p1
49 %patch3 -p1
50 %patch4 -p1
51
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
55
56 dos2unix resources/example/Attribution.txt
57
58 sed -i 's/REPLACE_THIS_IN_SPEC/%{version}/' Cura/util/version.py
59
60 mv resources/locale/{zh,zh_CN}
61 rm -rf resources/locale/{en,po}
62
63 %build
64 # rebuild locales
65 cd resources/locale
66 rm *.in *.pot
67 for FILE in *; do
68         msgfmt $FILE/LC_MESSAGES/Cura.po -o $FILE/LC_MESSAGES/Cura.mo
69         rm $FILE/LC_MESSAGES/Cura.po
70 done
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT{%{_bindir},%{py_sitescriptdir}/Cura,%{_datadir}/%{name}/firmware,%{_pixmapsdir},%{_localedir}}
75
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}
83
84 # locales
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
88
89 desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} %{SOURCE2}
90
91 %find_lang Cura
92 %py_postclean
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %files -f Cura.lang
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
104 %{_datadir}/%{name}
This page took 0.069088 seconds and 4 git commands to generate.