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