summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin McCormack2020-01-15 22:26:03 -0500
committerKevin McCormack2020-01-15 22:26:03 -0500
commitb83e7a70ffec149fcb8fd9e622b56f9ba6d67968 (patch)
tree1fc271913f6bf23d2842e023e0db67e294fca8c8
parent4ff942d5867edd85b21a278230802c08ce6c7411 (diff)
downloadaur-b83e7a70ffec149fcb8fd9e622b56f9ba6d67968.tar.gz
Update PKGBUILD
We are now building from source rather than using the pre-built debian package.
-rw-r--r--.SRCINFO38
-rw-r--r--PKGBUILD107
2 files changed, 127 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 069a24a3969..95b1607bc4d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,40 @@
pkgbase = cura-lulzbot
pkgdesc = Cura LulzBot Edition for LulzBot 3D Printers by Aleph Objects, Inc.
pkgver = 3.6.21
- pkgrel = 1
+ pkgrel = 2
url = https://www.lulzbot.com/cura
arch = x86_64
- license = AGPLv3
- depends = gcc8-fortran
- depends = openssl-1.0
- source = http://download.alephobjects.com/ao/aodeb/dists/buster/main/binary-amd64/cura-lulzbot_3.6.21_amd64.deb
- md5sums = 42f6ee9653f7613df731a3baf6ee4b35
+ license = AGPL3
+ makedepends = cmake
+ makedepends = git
+ makedepends = python-sip
+ makedepends = python-netifaces
+ makedepends = python-pyserial
+ makedepends = python-zeroconf
+ makedepends = qt5-tools
+ makedepends = sip
+ depends = cython
+ depends = gcc-fortran
+ depends = libsavitar
+ depends = openblas
+ depends = python
+ depends = python-nose
+ depends = python-numpy
+ depends = python-numpy-stl
+ depends = python-opengl
+ depends = python-parso
+ depends = python-pyqt5
+ depends = python-scipy
+ depends = python-setuptools
+ depends = python-typing_extensions
+ depends = qt5-graphicaleffects
+ depends = qt5-quickcontrols
+ depends = qt5-quickcontrols2
+ optdepends = python-zeroconf: Detecting mDNS printers
+ optdepends = python-pyserial: USB printing
+ conflicts = cura-lulzbot-git
+ source = git+https://gitlab.com/lulzbot3d/cura-le/curabuild-lulzbot.git#tag=v3.6.21
+ md5sums = SKIP
pkgname = cura-lulzbot
diff --git a/PKGBUILD b/PKGBUILD
index e075262c894..ae1a08ba9d8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,107 @@
# Maintainer: Kevin McCormack <harlemsquirrel@gmail.com>
-# https://code.alephobjects.com/w/cura-lulzbot/
+# https://gitlab.com/lulzbot3d/cura-le/curabuild-lulzbot/
pkgname=cura-lulzbot
pkgver=3.6.21
-pkgrel=1
+pkgrel=2
pkgdesc='Cura LulzBot Edition for LulzBot 3D Printers by Aleph Objects, Inc.'
arch=('x86_64')
url='https://www.lulzbot.com/cura'
-license=('AGPLv3')
-source=("http://download.alephobjects.com/ao/aodeb/dists/buster/main/binary-amd64/cura-lulzbot_${pkgver}_amd64.deb")
-md5sums=('42f6ee9653f7613df731a3baf6ee4b35')
-depends=('gcc8-fortran' 'openssl-1.0')
-
-prepare() {
- # Unpack the tarball containing the 'usr/' directory,
- # where all the essentials reside within the debian package
- tar zxf "${srcdir}/data.tar".gz -C "${srcdir}"
+license=('AGPL3')
+source=("git+https://gitlab.com/lulzbot3d/cura-le/curabuild-lulzbot.git#tag=v$pkgver")
+md5sums=('SKIP')
+conflicts=("cura-lulzbot-git")
+depends=('cython'
+ 'gcc-fortran'
+ 'libsavitar'
+ 'openblas'
+ 'python'
+ 'python-nose'
+ 'python-numpy'
+ 'python-numpy-stl'
+ 'python-opengl'
+ 'python-parso'
+ 'python-pyqt5'
+ 'python-scipy'
+ 'python-setuptools'
+ 'python-typing_extensions'
+ 'qt5-graphicaleffects'
+ 'qt5-quickcontrols'
+ 'qt5-quickcontrols2')
+makedepends=('cmake'
+ 'git'
+ 'python-sip'
+ 'python-netifaces'
+ 'python-pyserial'
+ 'python-zeroconf'
+ 'qt5-tools'
+ 'sip')
+optdepends=('python-zeroconf: Detecting mDNS printers'
+ 'python-pyserial: USB printing')
+
+build() {
+ # Until this is updated, we have to replace the old paths
+ grep -rl 'code.alephobjects.com/source/arcus' . | xargs \
+ sed -i 's/code.alephobjects.com\/source\/arcus/gitlab.com\/lulzbot3d\/cura-le\/libarcus/g'
+ grep -rl 'code.alephobjects.com/diffusion/U/uranium' . | xargs \
+ sed -i 's/code.alephobjects.com\/diffusion\/U\/uranium/gitlab.com\/lulzbot3d\/cura-le\/uranium/g'
+ grep -rl 'code.alephobjects.com/diffusion/CBD/cura-binary-data' . | xargs \
+ sed -i 's/code.alephobjects.com\/diffusion\/CBD\/cura-binary-data/gitlab.com\/lulzbot3d\/cura-le\/cura-binary-data/g'
+ grep -rl 'code.alephobjects.com/source/curaengine-lulzbot' . | xargs \
+ sed -i 's/code.alephobjects.com\/source\/curaengine-lulzbot/gitlab.com\/lulzbot3d\/cura-le\/cura-engine-le/g'
+ grep -rl 'code.alephobjects.com/source' . | xargs \
+ sed -i 's/code.alephobjects.com\/source/gitlab.com\/lulzbot3d\/cura-le/g'
+
+ mkdir -p curabuild-lulzbot/build
+ cd curabuild-lulzbot/build
+ sed -i 's/DCURA_ENGINE_VERSION=${CURA_VERSION}/DCURA_ENGINE_VERSION=${CURA_VERSION} -DENABLE_OPENMP=OFF/' ../CMakeLists.txt
+ sed -i '33,34d' ../setup_linux.py.in #remove missing paths from using system python
+ sed -i '57,58d' ../setup_linux.py.in #remove missing qt plugins when using system version
+ sed -i 's/get_commit_hash("Savitar", cmake_binary_dir)/"4.1.0"/' ../scripts/cura_version.py #fake hash when using system libsavitar
+
+ sed -i 's/6a4ffb2f90ef7bbd3f20f2a1db4948630ad37dc8/v3.11.0/' ../CMakeLists.txt # Protobuf v3.7.0
+
+ sed -i '1216,1233d' ../CMakeLists.txt # Remove external cx_Freeze build
+
+ cmake -DTAG_OR_BRANCH=master ../ \
+ -DBUILD_PYTHON=OFF \
+ -DBUILD_CYTHON=OFF \
+ -DBUILD_QT=OFF \
+ -DBUILD_SIP=OFF \
+ -DBUILD_PYQT=OFF \
+ -DBUILD_OPENBLAS=OFF \
+ -DBUILD_NUMPY=OFF \
+ -DBUILD_SCIPY=OFF \
+ -DBUILD_SCIPY_LITE=OFF \
+ -DBUILD_PYSERIAL=OFF \
+ -DBUILD_NUMPY_STL=OFF \
+ -DBUILD_ZEROCONF=OFF \
+ -DBUILD_TYPING=OFF \
+ -DBUILD_SAVITAR=OFF \
+ -DBUILD_APPDIRS=OFF \
+ -DBUILD_NETIFACES=OFF \
+ -DBUILD_PYTHONSIX=OFF \
+ -DBUILD_PYTHON_SETUPTOOLS=OFF \
+ -DBUILD_PYTHON_PACKAGING=OFF \
+ -DBUILD_PYPARSING=OFF \
+ -DBUILD_PYTHON_NOSE=OFF \
+ -DEXTERNALPROJECT_INSTALL_PREFIX=$pkgdir/usr \
+ -DUSE_SYSTEM_LIBS=ON
+
+ PYTHONPATH=`pwd`/inst/lib/python3/dist-packages make
}
package() {
- cp -r "${srcdir}"/usr "${pkgdir}"/usr
+ cd $srcdir/curabuild-lulzbot/build
+
+ # We have to remove this since it's gone from Python 3.8
+ # https://docs.python.org/3.7/library/platform.html#unix-platforms
+ echo "pwd: $(pwd)"
+ grep -rl 'linux_distro_name = platform.linux_distribution' . | xargs \
+ sed -i 's/linux_distro_name/#linux_distro_name/g'
+
+ PYTHONPATH=`pwd`/inst/lib/python3/dist-packages make package
+
+ cp -r _CPack_Packages/Linux/DEB/cura-lulzbot-*-Linux/usr $pkgdir/
}
# Update md5sum