From 8da1c607a688520f4db965ae289ce2527b5b86dc Mon Sep 17 00:00:00 2001 From: Rui Carmo Date: Sun, 19 Oct 2014 16:47:57 +0100 Subject: [PATCH] Working armhf build on ODROID-U3 running Ubuntu 14.04.1 --- package.sh | 38 +++++++++++++++++++ scripts/linux/debian_armhf/DEBIAN/control | 14 +++++++ scripts/linux/debian_armhf/DEBIAN/postinst | 1 + scripts/linux/debian_armhf/usr/bin/cura | 2 + .../usr/share/applications/cura.desktop | 10 +++++ 5 files changed, 65 insertions(+) create mode 100644 scripts/linux/debian_armhf/DEBIAN/control create mode 100644 scripts/linux/debian_armhf/DEBIAN/postinst create mode 100755 scripts/linux/debian_armhf/usr/bin/cura create mode 100755 scripts/linux/debian_armhf/usr/share/applications/cura.desktop diff --git a/package.sh b/package.sh index eb78dae2..57e101c2 100755 --- a/package.sh +++ b/package.sh @@ -13,6 +13,7 @@ BUILD_TARGET=${1:-none} #BUILD_TARGET=darwin #BUILD_TARGET=debian_i386 #BUILD_TARGET=debian_amd64 +#BUILD_TARGET=debian_armhf #BUILD_TARGET=freebsd ##Do we need to create the final archive @@ -80,6 +81,7 @@ if [ "$BUILD_TARGET" = "none" ]; then echo "$0 win32" echo "$0 debian_i386" echo "$0 debian_amd64" + echo "$0 debian_armhf" echo "$0 darwin" echo "$0 freebsd" exit 0 @@ -280,6 +282,42 @@ if [ "$BUILD_TARGET" = "debian_amd64" ]; then exit fi +############################# +# Debian armhf .deb +############################# + +if [ "$BUILD_TARGET" = "debian_armhf" ]; then + export CXX="g++" + if [ ! -d "Power" ]; then + git clone https://github.com/GreatFruitOmsk/Power + else + cd Power + git pull + cd .. + fi + rm -rf CuraEngine + git clone ${CURA_ENGINE_REPO} + if [ $? != 0 ]; then echo "Failed to clone CuraEngine"; exit 1; fi + make -C CuraEngine VERSION=${BUILD_NAME} + if [ $? != 0 ]; then echo "Failed to build CuraEngine"; exit 1; fi + rm -rf scripts/linux/${BUILD_TARGET}/usr/share/cura + mkdir -p scripts/linux/${BUILD_TARGET}/usr/share/cura + cp -a Cura scripts/linux/${BUILD_TARGET}/usr/share/cura/ + cp -a resources scripts/linux/${BUILD_TARGET}/usr/share/cura/ + cp -a plugins scripts/linux/${BUILD_TARGET}/usr/share/cura/ + cp -a CuraEngine/build/CuraEngine scripts/linux/${BUILD_TARGET}/usr/share/cura/ + cp scripts/linux/cura.py scripts/linux/${BUILD_TARGET}/usr/share/cura/ + cp -a Power/power scripts/linux/${BUILD_TARGET}/usr/share/cura/ + echo $BUILD_NAME > scripts/linux/${BUILD_TARGET}/usr/share/cura/Cura/version + sudo chown root:root scripts/linux/${BUILD_TARGET} -R + sudo chmod 755 scripts/linux/${BUILD_TARGET}/usr -R + sudo chmod 755 scripts/linux/${BUILD_TARGET}/DEBIAN -R + cd scripts/linux + dpkg-deb --build ${BUILD_TARGET} $(dirname ${TARGET_DIR})/cura_${BUILD_NAME}-${BUILD_TARGET}.deb + sudo chown `id -un`:`id -gn` ${BUILD_TARGET} -R + exit +fi + ############################# # Rest ############################# diff --git a/scripts/linux/debian_armhf/DEBIAN/control b/scripts/linux/debian_armhf/DEBIAN/control new file mode 100644 index 00000000..05029d00 --- /dev/null +++ b/scripts/linux/debian_armhf/DEBIAN/control @@ -0,0 +1,14 @@ +Package: cura +Version: 14.01 +Section: misc +Priority: optional +Architecture: armhf +Essential: no +Depends: python-wxgtk2.8, python-opengl, python-serial, python-numpy +Maintainer: Daid +Provides: cura +Installed-Size: 10000 +Description: Cura is a full software solution for 3D printing, + aimed at RepRaps and the Ultimaker. It's free software payed for + and maintained by Ultimaker. + diff --git a/scripts/linux/debian_armhf/DEBIAN/postinst b/scripts/linux/debian_armhf/DEBIAN/postinst new file mode 100644 index 00000000..1a248525 --- /dev/null +++ b/scripts/linux/debian_armhf/DEBIAN/postinst @@ -0,0 +1 @@ +#!/bin/sh diff --git a/scripts/linux/debian_armhf/usr/bin/cura b/scripts/linux/debian_armhf/usr/bin/cura new file mode 100755 index 00000000..bd9ef0e1 --- /dev/null +++ b/scripts/linux/debian_armhf/usr/bin/cura @@ -0,0 +1,2 @@ +#!/bin/sh +PYTHONPATH=$PYTHONPATH:/usr/share/cura/ /usr/bin/python /usr/share/cura/cura.py "$@" diff --git a/scripts/linux/debian_armhf/usr/share/applications/cura.desktop b/scripts/linux/debian_armhf/usr/share/applications/cura.desktop new file mode 100755 index 00000000..b7f665a4 --- /dev/null +++ b/scripts/linux/debian_armhf/usr/share/applications/cura.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=Cura +Comment=Cura +Icon=/usr/share/cura/resources/images/c.png +Exec=/usr/bin/python /usr/share/cura/cura.py +Path=/usr/share/cura/ +StartupNotify=true +Terminal=false +Categories=GNOME;GTK;Utility; -- 2.30.2