]> git.pld-linux.org Git - packages/cura.git/blob - cura.spec
Release 4 (by relup.sh)
[packages/cura.git] / cura.spec
1 Summary:        3D printer control software
2 Name:           cura
3 Version:        2.5.0
4 Release:        5
5 Epoch:          1
6 Group:          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
11 License:        AGPLv3 and CC-BY-SA
12 Source0:        https://github.com/Ultimaker/Cura/archive/%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5:  ebe1b78c8b9ce77c289a266c9e732dc8
14 Source1:        https://github.com/Ultimaker/fdm_materials/archive/%{version}/fdm_materials-%{version}.tar.gz
15 # Source1-md5:  bf8f25394273d7b6333a856b6a1c94ce
16 Patch0:         plugins-path.patch
17 Patch1:         desktop.patch
18 Patch2:         locale.patch
19 Patch3:         test.patch
20 URL:            https://ultimaker.com/en/products/cura-software
21 BuildRequires:  cmake
22 BuildRequires:  desktop-file-utils
23 BuildRequires:  gettext
24 BuildRequires:  gettext-tools
25 BuildRequires:  python3-Uranium = %{version}
26 BuildRequires:  python3-devel
27 BuildRequires:  python3-pytest
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.219
30 Requires:       CuraEngine = %{epoch}:%{version}
31 Requires:       Qt5Quick-controls
32 Requires:       fonts-TTF-OpenSans
33 Requires:       python3-PyOpenGL
34 Requires:       python3-PyQt5
35 Requires:       python3-numpy
36 Requires:       python3-power
37 Requires:       python3-savitar
38 Requires:       python3-serial
39 Requires:       python3-Uranium = %{version}
40 Requires:       python3-zeroconf
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 Cura is a project which aims to be an single software solution for 3D
46 printing. While it is developed to be used with the Ultimaker 3D
47 printer, it can be used with other RepRap based designs.
48
49 Cura helps you to setup an Ultimaker, shows your 3D model, allows for
50 scaling / positioning, can slice the model to G-Code, with sane
51 editable configuration settings and send this G-Code to the 3D printer
52 for printing.
53
54 %prep
55 %setup -q -n Cura-%{version} -a1
56 %patch0 -p1
57 %patch1 -p1
58 %patch2 -p1
59 %patch3 -p1
60
61 # Invalid locale names ptbr and jp
62 %{__mv} resources/i18n/{ptbr,pt_BR}
63 %{__mv} resources/i18n/{jp,ja}
64
65 # The setup.py is only useful for py2exe, remove it, so noone is tempted to use it
66 %{__rm} setup.py
67
68 # Upstream installs to lib/python3/dist-packages
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
71
72 # Wrong shebang
73 %{__sed} -i '1s=^#!%{_bindir}/\(python\|env python\)3*=#!%{__python3}=' cura_app.py
74
75 %build
76 mkdir build
77 cd build
78 %{cmake} .. \
79         -DCURA_VERSION:STRING=%{version}
80
81 %{__make}
82
83 cd ../fdm_materials-%{version}
84 mkdir build
85 cd build
86 %{cmake} ..
87
88 %{__make}
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %{__make} -C build install DESTDIR=$RPM_BUILD_ROOT
94 %{__make} -C fdm_materials-%{version}/build install DESTDIR=$RPM_BUILD_ROOT
95
96 # Sanitize the location of locale files
97 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{cura/resources/i18n,locale}
98 ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/cura/resources/i18n
99 %{__rm} $RPM_BUILD_ROOT%{_localedir}/*/*.po
100 %{__rm} $RPM_BUILD_ROOT%{_localedir}/*.pot
101
102 # Unbundle fonts
103 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{name}/resources/themes/cura/fonts/
104 ln -s %{_datadir}/fonts/TTF $RPM_BUILD_ROOT%{_datadir}/%{name}/resources/themes/cura/fonts
105
106 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
107 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
108 %py_postclean
109
110 %find_lang cura --all-name
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %files -f cura.lang
116 %defattr(644,root,root,755)
117 %attr(755,root,root) %{_bindir}/%{name}
118 %{py3_sitescriptdir}/cura
119 %{_desktopdir}/%{name}.desktop
120 %{_datadir}/%{name}
121 %{_datadir}/appdata/cura.appdata.xml
122 %{_datadir}/mime/packages/cura.xml
This page took 0.096675 seconds and 3 git commands to generate.