summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Wambold2017-08-04 16:50:15 -0400
committerTom Wambold2017-08-04 16:50:15 -0400
commit7b752a1586f60a8596ae33486f15553a44295828 (patch)
treead8e79fdfa782ede7928db1318e60b632d89f164
downloadaur-7b752a1586f60a8596ae33486f15553a44295828.tar.gz
Initial commit of version 2.2.
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD39
-rw-r--r--oauth2_proxy.install3
-rw-r--r--oauth2_proxy.service17
5 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5c068e9c6d8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = oauth2_proxy
+ pkgdesc = A reverse proxy that provides authentication with Google, Github or other providers.
+ pkgver = 2.2
+ pkgrel = 1
+ url = https://github.com/bitly/oauth2_proxy
+ install = oauth2_proxy.install
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ makedepends = go-gpm
+ backup = etc/oath2_proxy.cfg
+ source = https://github.com/bitly/oauth2_proxy/archive/v2.2.tar.gz
+ source = oauth2_proxy.service
+ md5sums = 90e746e2931bedb3208f48b82081719d
+ md5sums = 810f64058c2af8fe2f81614f09dbe3c6
+
+pkgname = oauth2_proxy
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..dd38fa22d95
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.tar*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9532ecb617e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Tom Wambold <tom5760@gmail.com>
+pkgname=oauth2_proxy
+pkgver=2.2
+pkgrel=1
+pkgdesc="A reverse proxy that provides authentication with Google, Github or other providers."
+arch=('i686' 'x86_64')
+url="https://github.com/bitly/oauth2_proxy"
+license=('MIT')
+makedepends=(go go-gpm)
+backup=('etc/oath2_proxy.cfg')
+install=oauth2_proxy.install
+source=("https://github.com/bitly/$pkgname/archive/v$pkgver.tar.gz"
+ 'oauth2_proxy.service')
+md5sums=('90e746e2931bedb3208f48b82081719d'
+ '810f64058c2af8fe2f81614f09dbe3c6')
+
+build() {
+ mkdir -p github.com/bitly
+
+ mv "$pkgname-$pkgver" github.com/bitly/oauth2_proxy
+
+ mkdir -p deps
+ mkdir -p dist
+
+ export GOPATH="$(pwd)/deps:$(realpath $(pwd)/..)"
+
+ cd github.com/bitly/oauth2_proxy
+ go-gpm install
+
+ go build -o ../../../dist/oauth2_proxy
+}
+
+package() {
+ mkdir -p "$pkgdir/usr/bin"
+ mkdir -p "$pkgdir/etc"
+
+ install dist/oauth2_proxy "$pkgdir/usr/bin/oauth2_proxy"
+ install github.com/bitly/oauth2_proxy/contrib/oauth2_proxy.cfg.example "$pkgdir/etc/oauth2_proxy.cfg"
+}
diff --git a/oauth2_proxy.install b/oauth2_proxy.install
new file mode 100644
index 00000000000..3a906af7c44
--- /dev/null
+++ b/oauth2_proxy.install
@@ -0,0 +1,3 @@
+post_install() {
+ useradd --home-dir / --shell /usr/bin/nologin
+}
diff --git a/oauth2_proxy.service b/oauth2_proxy.service
new file mode 100644
index 00000000000..791aec768a5
--- /dev/null
+++ b/oauth2_proxy.service
@@ -0,0 +1,17 @@
+# Systemd service file for oauth2_proxy daemon
+#
+# Date: Feb 9, 2016
+# Author: Srdjan Grubor <sgnn7@sgnn7.org>
+
+[Unit]
+Description=oauth2_proxy daemon service
+
+[Service]
+User=oauth2_proxy
+Group=oauth2_proxy
+
+ExecStart=/usr/bin/oauth2_proxy -config=/etc/oauth2_proxy.cfg
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target