summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Stark2018-03-17 12:57:07 +0000
committerDavid Stark2018-03-17 12:57:07 +0000
commite96927397ab2d850e8b7ef7c29a1930342a17825 (patch)
treea0ce1c3507e23a7c64c36a8dd1504cf98b0f9024
parent38ffddc42710cf773034ab2b892a1847fe7660cc (diff)
downloadaur-e96927397ab2d850e8b7ef7c29a1930342a17825.tar.gz
updating and attempting to put it into a virtualenv
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD21
-rwxr-xr-xwrapper-stamp-telepresence.sh13
-rwxr-xr-xwrapper-telepresence.sh13
4 files changed, 42 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index fed487ceae7..6b4f9adf708 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ src/**
pkg/**
**.pkg.tar.xz
*.tar.gz
+*.tar
diff --git a/PKGBUILD b/PKGBUILD
index a2bcee32cd9..a7777db620d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: David Stark <david@starkers.org>
-pkgver=0.71
-pkgrel=12
+pkgver=0.75
+pkgrel=13
pkgname=telepresence
pkgdesc="Local development against a remote Kubernetes or OpenShift cluster - http://www.telepresence.io"
arch=('any')
@@ -14,6 +14,7 @@ depends=(
'git'
'python'
'python-virtualenv'
+ 'sshuttle'
'socat'
'sshfs'
'torsocks'
@@ -24,13 +25,21 @@ md5sums=('SKIP')
build(){
cd "${srcdir}/${pkgname}-${pkgver}"
- make virtualenv/bin/sshuttle-telepresence
+ virtualenv --python=python3 telepresence-venv
+ telepresence-venv/bin/pip install -r dev-requirements.txt
+ telepresence-venv/bin/pip install .
+
}
package(){
- install -Dm 755 "${srcdir}/${pkgname}-${pkgver}/cli/stamp-telepresence" "${pkgdir}/usr/bin/stamp-telepresence"
- install -Dm 755 "${srcdir}/${pkgname}-${pkgver}/cli/telepresence" "${pkgdir}/usr/bin/telepresence"
- install -Dm 755 "${srcdir}/${pkgname}-${pkgver}/virtualenv/bin/sshuttle-telepresence" "${pkgdir}/usr/bin/sshuttle-telepresence"
+
+ sed -i "s+${srcdir}/${pkgname}-${pkgver}+/opt/telepresence+g" "${srcdir}/${pkgname}-${pkgver}/telepresence-venv/bin/"*
+ mkdir -p "${pkgdir}/opt/telepresence/telepresence-venv"
+ rsync -ra "${srcdir}/${pkgname}-${pkgver}/telepresence-venv/" "${pkgdir}/opt/telepresence/telepresence-venv/"
+
+ install -Dm 755 "../wrapper-telepresence.sh" "${pkgdir}/usr/bin/telepresence"
+ install -Dm 755 "../wrapper-stamp-telepresence.sh" "${pkgdir}/usr/bin/stamp-telepresence"
+
}
# vim:set ts=2 sw=2 et:
diff --git a/wrapper-stamp-telepresence.sh b/wrapper-stamp-telepresence.sh
new file mode 100755
index 00000000000..10869caa4dc
--- /dev/null
+++ b/wrapper-stamp-telepresence.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# wrap the virtualenv and extend $PATH to include telepresence
+
+export VIRTUAL_ENV=/opt/telepresence/telepresence-venv
+export PATH="${VIRTUAL_ENV}/bin:$PATH"
+
+
+RUNME=stamp-telepresence
+
+
+# pass args on
+"${VIRTUAL_ENV}/bin/${RUNME}" $@
diff --git a/wrapper-telepresence.sh b/wrapper-telepresence.sh
new file mode 100755
index 00000000000..11cadb5bfe1
--- /dev/null
+++ b/wrapper-telepresence.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# wrap the virtualenv and extend $PATH to include telepresence
+
+export VIRTUAL_ENV=/opt/telepresence/telepresence-venv
+export PATH="${VIRTUAL_ENV}/bin:$PATH"
+
+
+RUNME=telepresence
+
+
+# pass args on
+"${VIRTUAL_ENV}/bin/${RUNME}" $@