]> git.pld-linux.org Git - packages/cura.git/blame - cura.spec
- up to 3.5.1
[packages/cura.git] / cura.spec
CommitLineData
30bab2a9
AM
1Summary: 3D printer control software
2Name: cura
8ab26971
JR
3Version: 3.5.1
4Release: 1
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
8ab26971 13# Source0-md5: a8b1de1bb8cfc043aa1d742f2cc78911
e6494e81 14Source1: https://github.com/Ultimaker/fdm_materials/archive/%{version}/fdm_materials-%{version}.tar.gz
8ab26971 15# Source1-md5: 7d0bcfe67173f8fd616ac5ca55eb815b
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
b631bce2
JR
60# The setup.py is only useful for py2exe, remove it, so noone is tempted to use it
61%{__rm} setup.py
30bab2a9 62
bb32f111 63# Upstream installs to lib/python3/dist-packages
b631bce2 64# We want to install to %{py3_sitescriptdir}
8ab26971 65%{__sed} -i 's|lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR}.*/.*-packages|%(echo %{py3_sitescriptdir} | sed -e s@%{_prefix}/@@)|g' CMakeLists.txt
bb32f111
JR
66
67# Wrong shebang
b631bce2 68%{__sed} -i '1s=^#!%{_bindir}/\(python\|env python\)3*=#!%{__python3}=' cura_app.py
30bab2a9
AM
69
70%build
bb32f111
JR
71mkdir build
72cd build
73%{cmake} .. \
74 -DCURA_VERSION:STRING=%{version}
75
76%{__make}
30bab2a9 77
e6494e81
JR
78cd ../fdm_materials-%{version}
79mkdir build
80cd build
81%{cmake} ..
82
83%{__make}
84
30bab2a9
AM
85%install
86rm -rf $RPM_BUILD_ROOT
e6494e81 87
bb32f111 88%{__make} -C build install DESTDIR=$RPM_BUILD_ROOT
e6494e81 89%{__make} -C fdm_materials-%{version}/build install DESTDIR=$RPM_BUILD_ROOT
30bab2a9 90
bb32f111 91# Sanitize the location of locale files
b631bce2 92%{__mv} $RPM_BUILD_ROOT%{_datadir}/{cura/resources/i18n,locale}
bb32f111 93ln -s ../../locale $RPM_BUILD_ROOT%{_datadir}/cura/resources/i18n
b631bce2
JR
94%{__rm} $RPM_BUILD_ROOT%{_localedir}/*/*.po
95%{__rm} $RPM_BUILD_ROOT%{_localedir}/*.pot
30bab2a9 96
7d3e6bb0
AM
97%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
98%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
81663a1b 99%py_postclean
30bab2a9 100
bb32f111
JR
101%find_lang cura --all-name
102
30bab2a9
AM
103%clean
104rm -rf $RPM_BUILD_ROOT
105
8ab26971
JR
106%post
107%update_icon_cache hicolor
108
109%postun
110%update_icon_cache hicolor
111
bb32f111 112%files -f cura.lang
30bab2a9 113%defattr(644,root,root,755)
81663a1b 114%attr(755,root,root) %{_bindir}/%{name}
bb32f111 115%{py3_sitescriptdir}/cura
30bab2a9 116%{_desktopdir}/%{name}.desktop
81663a1b 117%{_datadir}/%{name}
8ab26971 118%{_datadir}/metainfo/cura.appdata.xml
bb32f111 119%{_datadir}/mime/packages/cura.xml
8ab26971 120%{_iconsdir}/hicolor/*x*/apps/cura-icon.png
This page took 0.054544 seconds and 4 git commands to generate.