summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD12
-rwxr-xr-xbcnc-git21
3 files changed, 22 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 280dd5a4be2f..5256e4ccc1d3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = bcnc-git
pkgdesc = GRBL CNC command sender, autoleveler and g-code editor
- pkgver = r1307.8137b50
+ pkgver = r1524.bb22b26
pkgrel = 1
url = https://github.com/vlachoudis/bCNC
arch = any
@@ -15,7 +15,7 @@ pkgbase = bcnc-git
source = bcnc-git
source = bcnc-git.desktop
md5sums = SKIP
- md5sums = c1887716b5fab2fa566776ed12c1288b
+ md5sums = 56c919f0a53eb5712cb364ffd36b236d
md5sums = ef176d74a7958e03a2ea0164d05291da
pkgname = bcnc-git
diff --git a/PKGBUILD b/PKGBUILD
index 1d0d595e2bba..2ea024a39869 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: h8red <h8red@yandex.ru>
pkgname=bcnc-git
-pkgver=r1307.8137b50
+pkgver=r1524.bb22b26
pkgrel=1
pkgdesc="GRBL CNC command sender, autoleveler and g-code editor"
arch=('any')
@@ -13,12 +13,12 @@ source=("git+https://github.com/vlachoudis/bCNC.git"
"${pkgname}"
"${pkgname}.desktop")
md5sums=('SKIP'
- 'c1887716b5fab2fa566776ed12c1288b'
+ '56c919f0a53eb5712cb364ffd36b236d'
'ef176d74a7958e03a2ea0164d05291da')
pkgver() {
cd "$srcdir/bCNC"
- printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git describe --always)"
+ printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git describe --always)"
}
build() {
@@ -30,9 +30,9 @@ build() {
package() {
install -D -m755 "${pkgname}" "$pkgdir/usr/bin/${pkgname}"
install -D -m644 "${pkgname}.desktop" "$pkgdir/usr/share/applications/${pkgname}.desktop"
- cd "$srcdir/bCNC"
+ cd "$srcdir/bCNC/bCNC"
install -D -m644 "bCNC.png" "$pkgdir/usr/share/pixmaps/${pkgname}.png"
- mkdir -p "${pkgdir}/opt/${pkgname}"
- cp -r * "${pkgdir}/opt/${pkgname}"
+ mkdir -p "${pkgdir}/usr/lib/python2.7/site-packages/bCNC-git"
+ cp -r * "${pkgdir}/usr/lib/python2.7/site-packages/bCNC-git"
} \ No newline at end of file
diff --git a/bcnc-git b/bcnc-git
index 90f9da7a6366..ba20a88a5536 100755
--- a/bcnc-git
+++ b/bcnc-git
@@ -1,9 +1,16 @@
#!/usr/bin/env sh
-DIR=/opt/bcnc-git
-PYTHONPATH=${DIR}:${DIR}/lib:${DIR}/plugins
-export DIR PYTHONPATH
-if [ .$PYTHON = . ]; then
- PYTHON=python2
-fi
-${PYTHON} ${DIR}/bCNC.py $*
+#Autodetect python version
+[ .$PYTHON = . ] && PYTHON=`which python2`
+[ .$PYTHON = . ] && PYTHON=python
+
+#Autodetect bCNC install
+#If this script is placed in directory with bCNC module it will launch it
+#When placed somewhere else (eg. /usr/bin) it will launch bCNC from system
+DIR=`dirname $0`
+[ -f "${DIR}"/bCNC-git/__main__.py ] && cd "${DIR}" &&
+ echo "Launching bCNC from ${DIR}" ||
+ echo "Launching local installation of bCNC"
+
+#Launch
+"$PYTHON" -m bCNC-git $*