[cura] Initial import (#901659)

Miro Hrončok churchyard at fedoraproject.org
Wed Apr 24 18:04:52 UTC 2013


commit 07a9f8fdcf4923de311e9806300b28c39bc6daf6
Author: Miro Hrončok <miro at hroncok.cz>
Date:   Wed Apr 24 20:04:21 2013 +0200

    Initial import (#901659)

 .gitignore       |    1 +
 cura             |    5 +++
 cura-stripper.sh |   35 ++++++++++++++++++++
 cura.desktop     |    9 +++++
 cura.spec        |   95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources          |    1 +
 6 files changed, 146 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..109c2aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Cura-13.03-linux-fedora.tar.gz
diff --git a/cura b/cura
new file mode 100755
index 0000000..4e27529
--- /dev/null
+++ b/cura
@@ -0,0 +1,5 @@
+#!/usr/bin/python
+import os
+os.chdir("/usr/lib/python2.7/site-packages/")
+import Cura.cura as cura
+cura.main()
diff --git a/cura-stripper.sh b/cura-stripper.sh
new file mode 100755
index 0000000..648b004
--- /dev/null
+++ b/cura-stripper.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+VERSION=$1
+
+tar -xzf Cura-$VERSION-linux.tar.gz || exit 1
+cd Cura-$VERSION-linux
+
+# Remove pypy
+# It is not nonfree but it is not needed and removing it reduces the filesize
+rm -rf pypy
+
+cd Cura
+
+# Remove *.pyc
+find -name \*.pyc -delete
+
+# Remove CC BY-NC content
+# It cannot be shipped with/in Fedora, as it has use restrictions 
+rm -f resources/meshes/*
+rm -f resources/example/UltimakerRobot_support.stl
+
+# Drop the note about the removal
+echo -e '\n\nPlease note, that files under the terms of CC BY-NC has been removed form this Fedora package for legal reasons.' >> resources/example/Attribution.txt
+
+# Use free UltimakerHandle.stl instead of UltimakerRobot_support.stl
+FILES=`grep -Ir "UltimakerRobot_support.stl" . | cut -f1 -d: | sort | uniq | grep -v Attribution.txt | tr '\n' ' '`
+sed -i 's/UltimakerRobot_support.stl/UltimakerHandle.stl/g' $FILES
+
+# Remove the firmware
+# It is binary, so it is prohibited in Fedora
+rm -rf resources/firmware
+
+cd ../..
+rm -f Cura-$VERSION-linux-fedora.tar.gz
+tar -czf Cura-$VERSION-linux-fedora.tar.gz Cura-$VERSION-linux
diff --git a/cura.desktop b/cura.desktop
new file mode 100644
index 0000000..9debbd2
--- /dev/null
+++ b/cura.desktop
@@ -0,0 +1,9 @@
+
+[Desktop Entry]
+Name=Cura
+GenericName=3D Printer Interface
+Exec=cura
+Icon=/usr/share/pixmaps/cura.ico
+Terminal=false
+Type=Application
+Categories=Graphics;
diff --git a/cura.spec b/cura.spec
new file mode 100644
index 0000000..5ffcb0f
--- /dev/null
+++ b/cura.spec
@@ -0,0 +1,95 @@
+Name:           cura
+Version:        13.03
+Release:        1%{?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
+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 and bundled pypy binaries
+# Already asked upstream to include free package
+#Source0:       http://software.ultimaker.com/current/Cura-%%{version}-linux.tar.gz
+Source0:        Cura-%{version}-linux-fedora.tar.gz
+Source1:        %{name}
+Source2:        %{name}.desktop
+Source3:        %{name}-stripper.sh
+
+BuildArch:      noarch
+BuildRequires:  python2-devel
+BuildRequires:  dos2unix
+BuildRequires:  desktop-file-utils
+Requires:       PyOpenGL
+Requires:       wxPython
+Requires:       pyserial
+Requires:       numpy
+Requires:       python-power
+Requires:       pypy
+Requires:       ultimaker-marlin-firmware >= 12.12-0.5.RC1
+
+%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-%{version}-linux/Cura
+
+dos2unix resources/example/Attribution.txt
+
+# Remove useless shebangs
+cd slice/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins
+for FILE in alteration.py scale.py dimension.py limit.py fill.py inset.py widen.py bottom.py preface.py ../../../../../cura.py ../../../../../util/pymclevel/mce.py; do
+  awk 'FNR>1' $FILE > $FILE.nobang && mv -f $FILE.nobang $FILE
+done
+cd -
+
+%build
+# do nothing
+
+%install
+mkdir -p %{buildroot}%{python_sitelib}/Cura
+mkdir -p %{buildroot}%{_datadir}/%{name}
+mkdir -p %{buildroot}%{_datadir}/pixmaps
+mkdir -p %{buildroot}%{_bindir}
+
+cp -apr [acgpu_]* %{buildroot}%{python_sitelib}/Cura
+cp -apr resources/* %{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
+ln -s %{_datadir}/ultimaker-marlin-firmware %{buildroot}%{_datadir}/%{name}/firmware
+
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2}
+
+%files
+%doc LICENSE resources/example/Attribution.txt
+%{python_sitelib}/Cura
+%{_datadir}/%{name}
+%{_datadir}/pixmaps/%{name}.ico
+%{_datadir}/applications/%{name}.desktop
+%{_bindir}/%{name}
+
+%changelog
+* Sat Apr 20 2013 Miro Hrončok <mhroncok at redhat.com> - 13.03-1
+- New upstream release
+
+* Tue Feb 19 2013 Miro Hrončok <mhroncok at 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 at redhat.com> - 12.12-2
+- Launcher is in Python now
+
+* Sun Jan 13 2013 Miro Hrončok <mhroncok at redhat.com> - 12.12-1
+- First version
+
diff --git a/sources b/sources
index e69de29..151356a 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a67a6f30154ec7173673b20ab9f6a7fb  Cura-13.03-linux-fedora.tar.gz


More information about the scm-commits mailing list