summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenha2016-10-10 17:59:39 +0300
committerRenha2016-10-10 17:59:39 +0300
commit1248f5ca181d7eca84bdd39f5021f07be94f7426 (patch)
tree40b078e9f87c8daf79b104c5ed5ab9f7ee3362d4
downloadaur-1248f5ca181d7eca84bdd39f5021f07be94f7426.tar.gz
initial version of package
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD80
2 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..51007e6f99ea
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = cura-engine-noarcus-git
+ pkgdesc = A C++ console application for 3D printing GCode generation. It's called by Repetier Host and/or other applications. No libArcus or Protobuf needed for that version, and it could be only used as command-line tool.
+ pkgver = 3b8ad5e
+ pkgrel = 1
+ url = https://github.com/Ultimaker/CuraEngine.git
+ arch = i686
+ arch = x86_64
+ arch = arm
+ license = GPL
+ makedepends = gcc
+ makedepends = cmake
+ depends = rapidjson-git
+ depends = polyclipping
+ conflicts = curaengine
+ conflicts = curaengine-git
+ conflicts = cura-engine
+ source = cura-engine-noarcus-git::git+https://github.com/Ultimaker/CuraEngine.git
+ source = cura-git::git+https://github.com/Ultimaker/Cura.git
+ sha1sums = SKIP
+ sha1sums = SKIP
+
+pkgname = cura-engine-noarcus-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..53eb218c0205
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,80 @@
+# Maintainer: Yunhui Fu <yhfudev@gmail.com>
+
+pkgname=cura-engine-noarcus-git
+pkgver=3b8ad5e
+pkgrel=1
+pkgdesc="A C++ console application for 3D printing GCode generation. It's called by
+Repetier Host and/or other applications. No libArcus or Protobuf needed for that version, and it could be only used as command-line tool."
+arch=(i686 x86_64 arm)
+url="https://github.com/Ultimaker/CuraEngine.git"
+license=(GPL)
+depends=(rapidjson-git polyclipping)
+makedepends=(gcc cmake)
+source=(
+ "${pkgname}::git+https://github.com/Ultimaker/CuraEngine.git"
+ "cura-git::git+https://github.com/Ultimaker/Cura.git"
+ )
+sha1sums=(
+ 'SKIP'
+ 'SKIP'
+ )
+conflicts=(curaengine curaengine-git cura-engine)
+
+pkgver_git() {
+ cd "${srcdir}/${pkgname}"
+ local ver="$(git show | grep commit | awk '{print $2}' )"
+ #printf "r%s" "${ver//[[:alpha:]]}"
+ echo ${ver:0:7}
+}
+
+pkgver_svn() {
+ cd "${srcdir}/${pkgname}"
+ local ver="$(svn info | grep Revision | awk '{print $2}' )"
+ #printf "r%s" "${ver//[[:alpha:]]}"
+ echo ${ver:0:7}
+}
+
+pkgver() {
+ pkgver_git
+}
+
+build4git() {
+ cd "${srcdir}/${pkgname}"
+ # add version
+ sed -i -e "s|add_definitions[ \t]*([ \t]*-DVERSION=.*||" CMakeLists.txt
+ echo "add_definitions( -DVERSION=\"git-$(pkgver)\" )" >> CMakeLists.txt
+ # patch default folder
+ sed -i -e "s|loadJSON[ \t]*([ \t]*\"fdmprinter.json|loadJSON(\"/usr/share/${pkgname}/fdmprinter.json|" src/main.cpp
+
+ mkdir -p build
+ cd build
+ cmake -DENABLE_ARCUS=FALSE -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_TESTS=FALSE ..
+ make VERSION="\"git-$pkgver\""
+}
+
+build4release() {
+ cd "${srcdir}/CuraEngine-${pkgver}"
+ make VERSION="\"$pkgver\""
+}
+
+build () {
+ build4git
+}
+
+package4git() {
+ cd "${srcdir}/${pkgname}"
+ mkdir -p ${pkgdir}/usr/bin/
+ cp build/CuraEngine ${pkgdir}/usr/bin/
+ mkdir -p ${pkgdir}/usr/share/${pkgname}/
+ cp "${srcdir}/cura-git/resources/settings/fdmprinter.json" ${pkgdir}/usr/share/${pkgname}/
+}
+
+package4release() {
+ cd "${srcdir}/CuraEngine-${pkgver}"
+ mkdir -p ${pkgdir}/usr/bin/
+ cp build/CuraEngine ${pkgdir}/usr/bin/
+}
+
+package() {
+ package4git
+}