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