Blob Blame History Raw
Name:           cura
Version:        15.04.4
%global commit 95c2af21db7fdda8c4324a923fa004859f6c5b9c
Release:        6%{?dist}
Summary:        3D printer control software

# Code is AGPLv3
# Icons AGPLv3 https://github.com/daid/Cura/issues/231#issuecomment-12209683
# Example models are CC-BY-SA
# TweakAtZ.py is CC-BY-SA
License:        AGPLv3 and CC-BY-SA

URL:            http://daid.github.com/Cura/

# I've stripped the source with the script in Source3
# To remove CC BY-NC content
# Upstream not willing to ship free package
Source0:        Cura-%{commit}-fedora.tar.gz
Source1:        %{name}
Source2:        %{name}.desktop
Source3:        %{name}-stripper.sh

# UltimakerPlatforms STLs were stripped from the tarball, don't crash because of that
Patch0:         %{name}-dont-show-nc-stls.patch

# Use system paths
Patch1:         %{name}-system-paths.patch

# Rework the logic of determining the version (didn't work)
Patch2:         %{name}-version.patch

# Disable installation of firmwares Fedora doesn't ship
Patch3:         %{name}-no-firmware.patch

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  dos2unix
BuildRequires:  desktop-file-utils
BuildRequires:  gettext
Requires:       PyOpenGL
Requires:       wxPython
Requires:       pyserial
Requires:       numpy
Requires:       python-power
Requires:       CuraEngine >= 15.04
# So that it just works
Requires:	      3dprinter-udev-rules

%description
Cura is a project which aims to be an single software solution for 3D printing.
While it is developed to be used with the Ultimaker 3D printer, it can be used
with other RepRap based designs.

Cura helps you to setup an Ultimaker, shows your 3D model, allows for scaling /
positioning, can slice the model to G-Code, with sane editable configuration
settings and send this G-Code to the 3D printer for printing.

%prep
%setup -qn Cura-%{commit}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

dos2unix resources/example/Attribution.txt

sed -i 's/REPLACE_THIS_IN_SPEC/%{version}/' Cura/util/version.py

%build
# rebuild locales
cd resources/locale
rm *.in *.pot
for FILE in *
  do msgfmt $FILE/LC_MESSAGES/Cura.po -o $FILE/LC_MESSAGES/Cura.mo
  rm $FILE/LC_MESSAGES/Cura.po
done
cd -

%install
mkdir -p %{buildroot}%{python_sitelib}/Cura
mkdir -p %{buildroot}%{_datadir}/%{name}/firmware
mkdir -p %{buildroot}%{_datadir}/pixmaps
mkdir -p %{buildroot}%{_datadir}/locale
mkdir -p %{buildroot}%{_bindir}

cp -apr Cura/* %{buildroot}%{python_sitelib}/Cura
rm -rf %{buildroot}%{python_sitelib}/Cura/LICENSE
cp -apr resources/* %{buildroot}%{_datadir}/%{name}
cp -apr plugins %{buildroot}%{_datadir}/%{name}
cp -ap %{SOURCE1} %{buildroot}%{_bindir}
ln -s %{_datadir}/%{name} %{buildroot}%{python_sitelib}/Cura/resources
ln -s %{_datadir}/%{name}/%{name}.ico %{buildroot}%{_datadir}/pixmaps

# locales
cp -ar %{buildroot}%{_datadir}/%{name}/locale/* %{buildroot}%{_datadir}/locale
rm -rf %{buildroot}%{_datadir}/%{name}/locale
ln -s -f %{_datadir}/locale/ %{buildroot}%{_datadir}/%{name}/ # the app expects the locale folder in here

desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2}

%{find_lang} Cura

%files -f Cura.lang
%doc Cura/LICENSE resources/example/Attribution.txt
%{python_sitelib}/Cura
%{_datadir}/%{name}
%{_datadir}/pixmaps/%{name}.ico
%{_datadir}/applications/%{name}.desktop
%{_bindir}/%{name}

%changelog
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.04.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Thu Nov 03 2016 Miro Hrončok <mhroncok@redhat.com> - 15.04.4-5
- Explicitly run cura on X11 GDK backend (#1388953)

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.04.4-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Fri Mar 25 2016 Miro Hrončok <mhroncok@redhat.com> - 15.04.4-3
- Require 3dprinter-udev-rules

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 15.04.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sat Jan 30 2016 Miro Hrončok <mhroncok@redhat.com> - 15.04.4-1
- New version

* Wed Jul 08 2015 Miro Hrončok <mhroncok@redhat.com> - 15.02.1-4
- No longer depend on pypy
- Simplify the launcher

* Mon Jul 06 2015 Miro Hrončok <mhroncok@redhat.com> - 15.02.1-3
- Patch for #1230281

* Mon Jul 06 2015 Miro Hrončok <mhroncok@redhat.com> - 15.02.1-2
- Require latest CuraEngine

* Mon Jul 06 2015 Miro Hrončok <mhroncok@redhat.com> - 15.02.1-1
- Update to 15.02.1

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.12.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri May 29 2015 Miro Hrončok <mhroncok@redhat.com> - 14.12.1-4
- Patch: Open directories with xdg-open (#1217961)

* Mon Apr 20 2015 Miro Hrončok <mhroncok@redhat.com> - 14.12.1-3
- Handle files from the command line (#1213220)

* Mon Mar 30 2015 Miro Hrončok <mhroncok@redhat.com> - 14.12.1-2
- Update the no firmware patch according to communication with Cura upstream

* Mon Dec 29 2014 Miro Hrončok <mhroncok@redhat.com> - 14.12.1-1
- Updated to 14.12.1
- No longer depend on firmware

* Sat Oct 25 2014 Miro Hrončok <mhroncok@redhat.com> - 14.09-1
- New version 14.09

* Tue Jun 24 2014 Miro Hrončok <mhroncok@redhat.com> - 14.06-2
- Require at least the firmware version originally bundled in git

* Mon Jun 23 2014 Miro Hrončok <mhroncok@redhat.com> - 14.06-1
- New version 14.06

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 13.11.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Dec 14 2013 Miro Hrončok <mhroncok@redhat.com> - 13.11.2-1
- New version 13.11.2

* Wed Oct 16 2013 Miro Hrončok <mhroncok@redhat.com> - 13.10-1
- New upstream release with CuraEngine

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 13.04-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Tue May 07 2013 Miro Hrončok <mhroncok@redhat.com> - 13.04-2
- Remove resources directory before trying to create a symlink there

* Sat May 04 2013 Miro Hrončok <mhroncok@redhat.com> - 13.04-1
- New upstream release
- Fixed missing slice module

* Sat Apr 20 2013 Miro Hrončok <mhroncok@redhat.com> - 13.03-1
- New upstream release

* Tue Feb 19 2013 Miro Hrončok <mhroncok@redhat.com> - 12.12-3
- chmod 755 cura-stripper.sh
- Use firmware from ultimaker-marlin-firmware package
- removed bundling note

* Sun Jan 20 2013 Miro Hrončok <mhroncok@redhat.com> - 12.12-2
- Launcher is in Python now

* Sun Jan 13 2013 Miro Hrončok <mhroncok@redhat.com> - 12.12-1
- First version