summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Stark2017-07-21 00:58:18 +0100
committerDavid Stark2017-07-21 00:58:18 +0100
commit2ef7c0e2874aea6463b5d335c9b50e8a65a2421b (patch)
tree9c463bcd8f4eef8f7aed6d516dd132aaa2b20158
parentcc18d47a94a3c154d80f92aed800dbda16888980 (diff)
downloadaur-2ef7c0e2874aea6463b5d335c9b50e8a65a2421b.tar.gz
updated deployment per: https://github.com/datawire/telepresence/issues/135
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore4
-rw-r--r--Makefile9
-rw-r--r--PKGBUILD33
-rwxr-xr-xupdate.sh26
5 files changed, 69 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8d18ab01ef3..ae8168be4cb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,17 @@
pkgbase = telepresence
pkgdesc = Local development against a remote Kubernetes or OpenShift cluster - http://www.telepresence.io
pkgver = 0.61
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/datawire/telepresence
arch = any
- license = GPL3
- makedepends = git
+ license = Apache
+ depends = git
depends = python
- source = telepresence::git+https://github.com/datawire/telepresence.git
+ depends = python-virtualenv
+ depends = socat
+ depends = sshfs
+ depends = torsocks
+ source = https://github.com/datawire/telepresence/archive/0.61.tar.gz
md5sums = SKIP
pkgname = telepresence
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..fed487ceae7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+src/**
+pkg/**
+**.pkg.tar.xz
+*.tar.gz
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000000..93ca95007c0
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,9 @@
+
+VERSION ?= $(shell stty -echo; read -p "Latest release: " pwd; stty echo; echo $$pwd)
+
+
+update:
+ ./update.sh $(VERSION)
+
+clean:
+ rm -rf src pkg *.tar.xz *.gz
diff --git a/PKGBUILD b/PKGBUILD
index d57eab226af..9d7b7ab1787 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,34 @@
# Maintainer: David Stark <david@starkers.org>
-pkgname=telepresence
pkgver=0.61
-pkgrel=1
+pkgrel=2
+pkgname=telepresence
pkgdesc="Local development against a remote Kubernetes or OpenShift cluster - http://www.telepresence.io"
arch=('any')
-license=('GPL3')
+license=('Apache')
url="https://github.com/datawire/telepresence"
-depends=('python')
-makedepends=('git')
-source=("$pkgname::git+https://github.com/datawire/telepresence.git")
-md5sums=('SKIP')
+makedepends=()
+backup=()
+depends=(
+ 'git'
+ 'python'
+ 'python-virtualenv'
+ 'socat'
+ 'sshfs'
+ 'torsocks'
+ )
+source=("https://github.com/datawire/telepresence/archive/${pkgver}.tar.gz")
+md5sums=('SKIP')
-pkgver() {
- cd $pkgname
- git describe --tags
+build(){
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make virtualenv/bin/sshuttle-telepresence
}
package(){
- install -Dm 755 "$srcdir/telepresence/cli/telepresence" "$pkgdir/usr/bin/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"
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/update.sh b/update.sh
new file mode 100755
index 00000000000..5b77c53183d
--- /dev/null
+++ b/update.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+oldver="$(grep ^pkgver= PKGBUILD | cut -d "=" -f 2)"
+oldrel="$(grep ^pkgrel= PKGBUILD | cut -d "=" -f 2)"
+newrel=$(($oldrel + 1))
+
+newver="$1"
+
+if [ ! X${newver} == X ]; then
+ echo "updating from ${oldver} to ${newver}"
+else
+ echo "please specify a release number.. see: https://github.com/datawire/telepresence/releases"
+ exit 1
+fi
+
+set -eu
+
+#update the buildfile
+sed "s+pkgver=${oldver}+pkgver=${newver}+g" -i PKGBUILD
+sed "s+pkgrel=${oldrel}+pkgrel=${newrel}+g" -i PKGBUILD
+
+makepkg -f
+
+#update srcinfo
+makepkg --printsrcinfo > .SRCINFO
+