]> git.pld-linux.org Git - packages/cura.git/blame - cura.spec
- added TODO
[packages/cura.git] / cura.spec
CommitLineData
c177b629
JR
1#
2# TODO: find out why all Ultimaker printers later than 2 cannot be added
3#
30bab2a9
AM
4Summary: 3D printer control software
5Name: cura
bb32f111
JR
6Version: 2.5.0
7Release: 1
8Epoch: 1
30bab2a9
AM
9Group: Applications/Engineering
10# Code is AGPLv3
11# Icons AGPLv3 https://github.com/daid/Cura/issues/231#issuecomment-12209683
12# Example models are CC-BY-SA
13# TweakAtZ.py is CC-BY-SA
14License: AGPLv3 and CC-BY-SA
bb32f111
JR
15Source0: https://github.com/Ultimaker/Cura/archive/%{version}/%{name}-%{version}.tar.gz
16# Source0-md5: ebe1b78c8b9ce77c289a266c9e732dc8
30bab2a9 17Source1: %{name}
bb32f111
JR
18Patch0: plugins-path.patch
19URL: https://ultimaker.com/en/products/cura-software
20BuildRequires: cmake
30bab2a9
AM
21BuildRequires: desktop-file-utils
22BuildRequires: dos2unix
bb32f111 23BuildRequires: gettext
2c51c5a7 24BuildRequires: gettext-tools
bb32f111
JR
25BuildRequires: python3-Uranium = %{version}
26BuildRequires: python3-devel
27BuildRequires: python3-pytest
81663a1b
ER
28BuildRequires: rpm-pythonprov
29BuildRequires: rpmbuild(macros) >= 1.219
bb32f111
JR
30Requires: CuraEngine = %{epoch}:%{version}
31Requires: Qt5Quick-controls
32Requires: fonts-TTF-OpenSans
33Requires: python3-PyOpenGL
34Requires: python3-PyQt5
35Requires: python3-numpy
36Requires: python3-power
37Requires: python3-savitar
38Requires: python3-serial
39Requires: python3-Uranium = %{version}
40Requires: python3-zeroconf
30bab2a9 41BuildArch: noarch
81663a1b 42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30bab2a9
AM
43
44%description
45Cura is a project which aims to be an single software solution for 3D
46printing. While it is developed to be used with the Ultimaker 3D
47printer, it can be used with other RepRap based designs.
48
49Cura helps you to setup an Ultimaker, shows your 3D model, allows for
50scaling / positioning, can slice the model to G-Code, with sane
51editable configuration settings and send this G-Code to the 3D printer
52for printing.
53
54%prep
bb32f111 55%setup -q -n Cura-%{version}
30bab2a9 56%patch0 -p1
30bab2a9 57
bb32f111
JR
58# The setup.py is only useful for py2exe, remove it, so noone is tempted to use it
59rm setup.py
30bab2a9 60
bb32f111
JR
61# https://github.com/Ultimaker/Cura/issues/1784
62sed -i 's/Version=1/Version=1.1/' cura.desktop.in
30bab2a9 63
bb32f111
JR
64# Upstream installs to lib/python3/dist-packages
65# We want to install to %%{py3_sitescriptdir}
66sed -i 's|lib/python${PYTHON_VERSION_MAJOR}/dist-packages|%(echo %{py3_sitescriptdir} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt
30bab2a9 67
bb32f111
JR
68# Wrong end of line encoding
69dos2unix docs/How_to_use_the_flame_graph_profiler.md
70
71# Wrong shebang
72sed -i '1s=^#!%{_bindir}/\(python\|env python\)3*=#!%{__python3}=' cura_app.py
73
74# Invalid locale name ptbr
75# https://github.com/Ultimaker/Uranium/issues/246
76mv resources/i18n/{ptbr,pt_BR}
77sed -i 's/"Language: ptbr\n"/"Language: pt_BR\n"/' resources/i18n/pt_BR/*.po
78
79# Failing test, mixes sets and lists :(
80# Changed in master, not reporting to upstream
81sed -i -e '0,/set()/{s/set()/[]/}' \
82 -e 's/{/[/g' \
83 -e 's/}/]/g' \
84 tests/TestMachineAction.py
30bab2a9
AM
85
86%build
bb32f111
JR
87mkdir build
88cd build
89%{cmake} .. \
90 -DCURA_VERSION:STRING=%{version}
91
92%{__make}
30bab2a9
AM
93
94%install
95rm -rf $RPM_BUILD_ROOT
bb32f111 96%{__make} -C build install DESTDIR=$RPM_BUILD_ROOT
30bab2a9 97
bb32f111
JR
98# Sanitize the location of locale files
99mv $RPM_BUILD_ROOT%{_datadir}/{cura/resources/i18n,locale}
100ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/cura/resources/i18n
101rm $RPM_BUILD_ROOT%{_localedir}/*/*.po
102rm $RPM_BUILD_ROOT%{_localedir}/*.pot
30bab2a9 103
bb32f111
JR
104# Unbundle fonts
105rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/resources/themes/cura/fonts/
106ln -s %{_datadir}/fonts/open-sans/ $RPM_BUILD_ROOT%{_datadir}/%{name}/resources/themes/cura/fonts
7d3e6bb0
AM
107
108%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
109%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
81663a1b 110%py_postclean
30bab2a9 111
bb32f111
JR
112%find_lang cura --all-name
113
30bab2a9
AM
114%clean
115rm -rf $RPM_BUILD_ROOT
116
bb32f111 117%files -f cura.lang
30bab2a9 118%defattr(644,root,root,755)
81663a1b 119%attr(755,root,root) %{_bindir}/%{name}
bb32f111 120%{py3_sitescriptdir}/cura
30bab2a9 121%{_desktopdir}/%{name}.desktop
81663a1b 122%{_datadir}/%{name}
bb32f111
JR
123%{_datadir}/appdata/cura.appdata.xml
124%{_datadir}/mime/packages/cura.xml
This page took 0.129455 seconds and 4 git commands to generate.