summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD40
-rw-r--r--inlets-client.service11
-rw-r--r--inlets-server.service11
4 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b3a34634c96
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = inlets
+ pkgdesc = Expose your local endpoints to the Internet
+ pkgver = 2.0.4
+ pkgrel = 1
+ url = https://github.com/alexellis/inlets
+ arch = any
+ license = MIT
+ options = !strip
+ source = inlets-server.service
+ source = inlets-client.service
+ source = https://github.com/alexellis/inlets/archive/2.0.4.tar.gz
+ sha256sums = 79bad343a925292d0a5cc5164bff28fe95d9512a5dded04568af61d71e1e0a79
+ sha256sums = f7f85bb083b8839a89f715f882bf0e0f556cf183aa7ed653a1c87c5822762163
+ sha256sums = 9ac4cba2d7f862f0d8d79a4d5cedcda0f4826dc2f9746834572ba035e439b4d5
+
+pkgname = inlets
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2c6b414de78
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Thor77 <thor77 at thor77 dot org>
+
+pkgname=inlets
+pkgver=2.0.4
+pkgrel=1
+pkgdesc='Expose your local endpoints to the Internet'
+arch=('any')
+url="https://github.com/alexellis/inlets"
+license=('MIT')
+options=('!strip')
+_repo="github.com/alexellis"
+
+source=('inlets-server.service' 'inlets-client.service' "https://github.com/alexellis/inlets/archive/${pkgver}.tar.gz")
+sha256sums=('79bad343a925292d0a5cc5164bff28fe95d9512a5dded04568af61d71e1e0a79'
+ 'f7f85bb083b8839a89f715f882bf0e0f556cf183aa7ed653a1c87c5822762163'
+ '9ac4cba2d7f862f0d8d79a4d5cedcda0f4826dc2f9746834572ba035e439b4d5')
+
+prepare() {
+ export GOPATH="${srcdir}/gopath"
+ export GOBIN="${GOPATH}/bin"
+
+ mkdir -p "${GOPATH}/src/${_repo}/"
+ ln -fsT "${srcdir}/${pkgname}-${pkgver}" "${GOPATH}/src/${_repo}/${pkgname}"
+}
+
+build() {
+ export GOPATH="${srcdir}/gopath"
+
+ cd "${GOPATH}/src/${_repo}/${pkgname}"
+
+ go build
+}
+
+package() {
+ export GOPATH="${srcdir}/gopath"
+ cd $srcdir
+ install -Dm644 inlets-server.service "$pkgdir/usr/lib/systemd/system/inlets-server.service"
+ install -Dm644 inlets-client.service "$pkgdir/usr/lib/systemd/system/inlets-client.service"
+ install -Dm755 "${GOPATH}/src/${_repo}/${pkgname}/${pkgname}" "$pkgdir/usr/bin/inlets"
+}
diff --git a/inlets-client.service b/inlets-client.service
new file mode 100644
index 00000000000..d3e18d2a8d9
--- /dev/null
+++ b/inlets-client.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Inlets client
+After=network.target
+
+[Service]
+Type=simple
+EnvironmentFile=/etc/default/inlets-client
+ExecStart=/usr/bin/inlets client --remote=$remote --token=$token --upstream=$upstream
+
+[Install]
+WantedBy=multi-user.target
diff --git a/inlets-server.service b/inlets-server.service
new file mode 100644
index 00000000000..dbd77c8c43d
--- /dev/null
+++ b/inlets-server.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Inlets server
+After=network.target
+
+[Service]
+Type=simple
+EnvironmentFile=/etc/default/inlets-server
+ExecStart=/usr/bin/inlets server --port=${port:8080} --token=$token
+
+[Install]
+WantedBy=multi-user.target