]> 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:        4.5.0
4 Release:        4
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:  b02b95a4669110cff62f96e1bb00b1b5
14 Source1:        https://github.com/Ultimaker/fdm_materials/archive/%{version}/fdm_materials-%{version}.tar.gz
15 # Source1-md5:  449b2301efb4a4616c5c610bae173d0d
16 Patch0:         plugins-path.patch
17 URL:            https://ultimaker.com/en/products/cura-software
18 BuildRequires:  cmake
19 BuildRequires:  desktop-file-utils
20 BuildRequires:  gettext
21 BuildRequires:  gettext-tools
22 BuildRequires:  python3-Uranium = %{version}
23 BuildRequires:  python3-devel
24 BuildRequires:  python3-pytest
25 BuildRequires:  rpm-pythonprov
26 BuildRequires:  rpmbuild(macros) >= 1.219
27 Requires:       CuraEngine = %{epoch}:%{version}
28 Requires:       Qt5Quick-controls
29 Requires:       fonts-TTF-OpenSans
30 Requires:       python3-PyOpenGL
31 Requires:       python3-PyQt5
32 Requires:       python3-Uranium = %{version}
33 Requires:       python3-numpy
34 Requires:       python3-power
35 Requires:       python3-savitar >= 2.7.0
36 Requires:       python3-serial
37 Requires:       python3-zeroconf
38 BuildArch:      noarch
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
42 Cura is a project which aims to be an single software solution for 3D
43 printing. While it is developed to be used with the Ultimaker 3D
44 printer, it can be used with other RepRap based designs.
45
46 Cura helps you to setup an Ultimaker, shows your 3D model, allows for
47 scaling / positioning, can slice the model to G-Code, with sane
48 editable configuration settings and send this G-Code to the 3D printer
49 for printing.
50
51 %prep
52 %setup -q -n Cura-%{version} -a1
53 %patch0 -p1
54
55 for bad_lang in de_DE es_ES fi_FI fr_FR it_IT ja_JP ko_KR nl_NL pl_PL pt_PT ru_RU tr_TR ; do
56         lang="$(echo $bad_lang | sed 's/_.*//')"
57         %{__mv} "resources/i18n/$bad_lang" "resources/i18n/$lang"
58 done
59
60 # Upstream installs to lib/python3/dist-packages
61 # We want to install to %{py3_sitescriptdir}
62 %{__sed} -i 's|lib${LIB_SUFFIX}/python${Python3_VERSION_MAJOR}.*/.*-packages|%(echo %{py3_sitescriptdir} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt
63
64 # Wrong shebang
65 %{__sed} -i '1s=^#!%{_bindir}/\(python\|env python\)3*=#!%{__python3}=' cura_app.py
66
67 %build
68 mkdir build
69 cd build
70 %{cmake} .. \
71         -DCURA_VERSION:STRING=%{version}
72
73 %{__make}
74
75 cd ../fdm_materials-%{version}
76 mkdir build
77 cd build
78 %{cmake} ..
79
80 %{__make}
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 %{__make} -C build install DESTDIR=$RPM_BUILD_ROOT
86 %{__make} -C fdm_materials-%{version}/build install DESTDIR=$RPM_BUILD_ROOT
87
88 # Sanitize the location of locale files
89 %{__mv} $RPM_BUILD_ROOT%{_datadir}/{cura/resources/i18n,locale}
90 ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/cura/resources/i18n
91 %{__rm} $RPM_BUILD_ROOT%{_localedir}/*/*.po
92 %{__rm} $RPM_BUILD_ROOT%{_localedir}/*.pot
93
94 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
95 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
96 %py_postclean
97
98 %find_lang cura --all-name
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %post
104 %update_icon_cache hicolor
105
106 %postun
107 %update_icon_cache hicolor
108
109 %files -f cura.lang
110 %defattr(644,root,root,755)
111 %attr(755,root,root) %{_bindir}/%{name}
112 %{py3_sitescriptdir}/cura
113 %{_desktopdir}/%{name}.desktop
114 %{_datadir}/%{name}
115 %{_datadir}/metainfo/cura.appdata.xml
116 %{_datadir}/mime/packages/cura.xml
117 %{_iconsdir}/hicolor/*x*/apps/cura-icon.png
This page took 0.1024 seconds and 3 git commands to generate.