summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Holden2021-11-04 21:31:39 +0100
committerJoe Holden2021-11-04 21:31:39 +0100
commit44971fda82d599ea1c457e6682ec4ad91368d69e (patch)
treedd452ec769605f215fc1b02b9cf61d49d813cb2e
downloadaur-44971fda82d599ea1c457e6682ec4ad91368d69e.tar.gz
add 0.11.0
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD35
-rw-r--r--headscale.service13
4 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..00030d4cde4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = headscale
+ pkgdesc = An open source, self-hosted implementation of the Tailscale coordination server.
+ pkgver = 0.11.0
+ pkgrel = 1
+ url = https://github.com/juanfont/headscale
+ arch = any
+ license = BSD
+ makedepends = go
+ depends = tailscale
+ optdepends = wireguard-tools: CLI tools for generating keys
+ optdepends = postgresql: alternative database provider
+ conflicts = headscale-git
+ source = headscale-0.11.0.tar.gz::https://github.com/juanfont/headscale/archive/refs/tags/v0.11.0.tar.gz
+ source = headscale.service
+ sha256sums = cce99189eea5ea6e325d259f36ce7f21f59f3fbd48d81350ddbf4b995ddef667
+ sha256sums = db54439a60d6efdc812bc9d1cbe9fecc1d7134398a75f88927b561ebcb8d5cba
+
+pkgname = headscale
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..832a2faf833
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg
+/src
+/headscale
+/*.pkg.tar.*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2f4b94f10f0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+pkgname=headscale
+pkgver=0.11.0
+pkgrel=1
+pkgdesc="An open source, self-hosted implementation of the Tailscale coordination server."
+arch=('any')
+url="https://github.com/juanfont/headscale"
+license=('BSD')
+depends=('tailscale')
+makedepends=('go')
+optdepends=(
+ 'wireguard-tools: CLI tools for generating keys'
+ 'postgresql: alternative database provider'
+)
+conflicts=("${pkgname}-git")
+
+source=(
+ "${pkgname}-${pkgver}.tar.gz::https://github.com/juanfont/headscale/archive/refs/tags/v0.11.0.tar.gz"
+ 'headscale.service'
+)
+sha256sums=('cce99189eea5ea6e325d259f36ce7f21f59f3fbd48d81350ddbf4b995ddef667'
+ 'db54439a60d6efdc812bc9d1cbe9fecc1d7134398a75f88927b561ebcb8d5cba')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ go build -v -o headscale -ldflags "-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=${pkgver}" ./cmd/headscale
+}
+
+package() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ install -D -m755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ install -D -m644 "config-example.yaml" "${pkgdir}/etc/${pkgname}/config.json"
+ install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ install -D -m644 "${srcdir}/${pkgname}.service" "${pkgdir}/etc/systemd/system/${pkgname}.service"
+}
diff --git a/headscale.service b/headscale.service
new file mode 100644
index 00000000000..77bd210dcf9
--- /dev/null
+++ b/headscale.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Headscale server
+After=network.target
+
+[Service]
+Type=simple
+RemainAfterExit=yes
+ExecStart=/usr/bin/headscale serve
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target