]> git.pld-linux.org Git - packages/cura.git/blame - cura.spec
- release 5 (by relup.sh)
[packages/cura.git] / cura.spec
CommitLineData
30bab2a9
AM
1Summary: 3D printer control software
2Name: cura
bb32f111 3Version: 2.5.0
9a4c5d0a 4Release: 5
bb32f111 5Epoch: 1
30bab2a9
AM
6Group: Applications/Engineering
7# Code is AGPLv3
8# Icons AGPLv3 https://github.com/daid/Cura/issues/231#issuecomment-12209683
9# Example models are CC-BY-SA
10# TweakAtZ.py is CC-BY-SA
11License: AGPLv3 and CC-BY-SA
bb32f111
JR
12Source0: https://github.com/Ultimaker/Cura/archive/%{version}/%{name}-%{version}.tar.gz
13# Source0-md5: ebe1b78c8b9ce77c289a266c9e732dc8
e6494e81
JR
14Source1: https://github.com/Ultimaker/fdm_materials/archive/%{version}/fdm_materials-%{version}.tar.gz
15# Source1-md5: bf8f25394273d7b6333a856b6a1c94ce
bb32f111 16Patch0: plugins-path.patch
b631bce2
JR
17Patch1: desktop.patch
18Patch2: locale.patch
19Patch3: test.patch
bb32f111
JR
20URL: https://ultimaker.com/en/products/cura-software
21BuildRequires: cmake
30bab2a9 22BuildRequires: desktop-file-utils
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
e6494e81 55%setup -q -n Cura-%{version} -a1
30bab2a9 56%patch0 -p1
b631bce2
JR
57%patch1 -p1
58%patch2 -p1
59%patch3 -p1
30bab2a9 60
b631bce2
JR
61# Invalid locale names ptbr and jp
62%{__mv} resources/i18n/{ptbr,pt_BR}
63%{__mv} resources/i18n/{jp,ja}
30bab2a9 64
b631bce2
JR
65# The setup.py is only useful for py2exe, remove it, so noone is tempted to use it
66%{__rm} setup.py
30bab2a9 67
bb32f111 68# Upstream installs to lib/python3/dist-packages
b631bce2
JR
69# We want to install to %{py3_sitescriptdir}
70%{__sed} -i 's|lib/python${PYTHON_VERSION_MAJOR}/dist-packages|%(echo %{py3_sitescriptdir} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt
bb32f111
JR
71
72# Wrong shebang
b631bce2 73%{__sed} -i '1s=^#!%{_bindir}/\(python\|env python\)3*=#!%{__python3}=' cura_app.py
30bab2a9
AM
74
75%build
bb32f111
JR
76mkdir build
77cd build
78%{cmake} .. \
79 -DCURA_VERSION:STRING=%{version}
80
81%{__make}
30bab2a9 82
e6494e81
JR
83cd ../fdm_materials-%{version}
84mkdir build
85cd build
86%{cmake} ..
87
88%{__make}
89
30bab2a9
AM
90%install
91rm -rf $RPM_BUILD_ROOT
e6494e81 92
bb32f111 93%{__make} -C build install DESTDIR=$RPM_BUILD_ROOT
e6494e81 94%{__make} -C fdm_materials-%{version}/build install DESTDIR=$RPM_BUILD_ROOT
30bab2a9 95
bb32f111 96# Sanitize the location of locale files
b631bce2 97%{__mv} $RPM_BUILD_ROOT%{_datadir}/{cura/resources/i18n,locale}
bb32f111 98ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/cura/resources/i18n
b631bce2
JR
99%{__rm} $RPM_BUILD_ROOT%{_localedir}/*/*.po
100%{__rm} $RPM_BUILD_ROOT%{_localedir}/*.pot
30bab2a9 101
bb32f111 102# Unbundle fonts
b631bce2
JR
103%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/resources/themes/cura/fonts/
104ln -s %{_datadir}/fonts/TTF $RPM_BUILD_ROOT%{_datadir}/%{name}/resources/themes/cura/fonts
7d3e6bb0
AM
105
106%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
107%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
81663a1b 108%py_postclean
30bab2a9 109
bb32f111
JR
110%find_lang cura --all-name
111
30bab2a9
AM
112%clean
113rm -rf $RPM_BUILD_ROOT
114
bb32f111 115%files -f cura.lang
30bab2a9 116%defattr(644,root,root,755)
81663a1b 117%attr(755,root,root) %{_bindir}/%{name}
bb32f111 118%{py3_sitescriptdir}/cura
30bab2a9 119%{_desktopdir}/%{name}.desktop
81663a1b 120%{_datadir}/%{name}
bb32f111
JR
121%{_datadir}/appdata/cura.appdata.xml
122%{_datadir}/mime/packages/cura.xml
This page took 0.089323 seconds and 4 git commands to generate.