From: daid Date: Sat, 18 Jan 2014 08:24:17 +0000 (-0800) Subject: Merge pull request #707 from hg42/debian-i386-amd64-packages X-Git-Tag: 14.02-RC1~17^2~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=de68470d48df758fa42c90523f1195c687413b99;hp=f395f7e33ee4f62fe851389b529cdf10108f7cf1;p=cura.git Merge pull request #707 from hg42/debian-i386-amd64-packages Debian i386 amd64 packages --- diff --git a/.hgignore b/.hgignore index 0c6e597c..6c5514cb 100644 --- a/.hgignore +++ b/.hgignore @@ -1,8 +1,10 @@ syntax: glob +*.pyc +*.deb +*.bak *.tar.bz2 *.tar.gz *.7z -*.pyc *.zip *.exe *.po~ @@ -28,11 +30,9 @@ scripts/darwin/dist/ scripts/darwin/build/ scripts/darwin/Cura.dmg.sparseimage scripts/win32/dist/ -scripts/linux/debian/usr/ +scripts/linux/debian*/usr/ log.txt output.txt -*.bak -*.deb .git .hgignore .hgsubstate diff --git a/package.sh b/package.sh index 14d3009f..c5414c63 100755 --- a/package.sh +++ b/package.sh @@ -12,7 +12,8 @@ BUILD_TARGET=${1:-all} #BUILD_TARGET=win32 #BUILD_TARGET=linux #BUILD_TARGET=darwin -#BUILD_TARGET=debian +#BUILD_TARGET=debian_i386 +#BUILD_TARGET=debian_amd64 ##Do we need to create the final archive ARCHIVE_FOR_DISTRIBUTION=1 @@ -139,10 +140,11 @@ if [ "$BUILD_TARGET" = "darwin" ]; then fi ############################# -# Debian .deb +# Debian 32bit .deb ############################# -if [ "$BUILD_TARGET" = "debian" ]; then +if [ "$BUILD_TARGET" = "debian_i386" ]; then + export CXX="g++ -m32" if [ ! -d "Power" ]; then git clone https://github.com/GreatFruitOmsk/Power else @@ -153,22 +155,55 @@ if [ "$BUILD_TARGET" = "debian" ]; then rm -rf CuraEngine git clone ${CURA_ENGINE_REPO} make -C CuraEngine - rm -rf scripts/linux/debian/usr/share/cura - mkdir -p scripts/linux/debian/usr/share/cura - cp -a Cura scripts/linux/debian/usr/share/cura/ - cp -a CuraEngine/CuraEngine scripts/linux/debian/usr/share/cura/ - cp scripts/linux/cura.py scripts/linux/debian/usr/share/cura/ - cp -a Power/power scripts/linux/debian/usr/share/cura/ - echo $BUILD_NAME > scripts/linux/debian/usr/share/cura/Cura/version - sudo chown root:root scripts/linux/debian -R - sudo chmod 755 scripts/linux/debian/usr -R - sudo chmod 755 scripts/linux/debian/DEBIAN -R + 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 CuraEngine/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 debian ${TARGET_DIR}.deb - sudo chown `id -un`:`id -gn` debian -R + 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 +############################# +# Debian 64bit .deb +############################# + +if [ "$BUILD_TARGET" = "debian_amd64" ]; then + export CXX="g++ -m64" + 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} + make -C CuraEngine + 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 CuraEngine/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/usr/bin/cura b/scripts/linux/debian/usr/bin/cura deleted file mode 100755 index bd9ef0e1..00000000 --- a/scripts/linux/debian/usr/bin/cura +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -PYTHONPATH=$PYTHONPATH:/usr/share/cura/ /usr/bin/python /usr/share/cura/cura.py "$@" diff --git a/scripts/linux/debian/usr/share/applications/cura.desktop b/scripts/linux/debian/usr/share/applications/cura.desktop deleted file mode 100755 index 23ff2d1a..00000000 --- a/scripts/linux/debian/usr/share/applications/cura.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Cura -Comment=Cura -Icon=/usr/share/cura/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; diff --git a/scripts/linux/debian_amd64/DEBIAN/control b/scripts/linux/debian_amd64/DEBIAN/control new file mode 100644 index 00000000..eff38868 --- /dev/null +++ b/scripts/linux/debian_amd64/DEBIAN/control @@ -0,0 +1,14 @@ +Package: cura +Version: 14.01 +Section: misc +Priority: optional +Architecture: amd64 +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/DEBIAN/postinst b/scripts/linux/debian_amd64/DEBIAN/postinst old mode 100755 new mode 100644 similarity index 100% rename from scripts/linux/debian/DEBIAN/postinst rename to scripts/linux/debian_amd64/DEBIAN/postinst diff --git a/scripts/linux/debian/DEBIAN/control b/scripts/linux/debian_i386/DEBIAN/control old mode 100755 new mode 100644 similarity index 100% rename from scripts/linux/debian/DEBIAN/control rename to scripts/linux/debian_i386/DEBIAN/control diff --git a/scripts/linux/debian_i386/DEBIAN/postinst b/scripts/linux/debian_i386/DEBIAN/postinst new file mode 100644 index 00000000..1a248525 --- /dev/null +++ b/scripts/linux/debian_i386/DEBIAN/postinst @@ -0,0 +1 @@ +#!/bin/sh