makedeb


tailscale 1.36.2-1


A mesh VPN that makes it easy to connect your devices, wherever they are.

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for tailscale.

# Maintainer: hiddeninthesand <hiddeninthesand at protonmail dot com>

pkgname='tailscale'
_gitname='tailscale'
provides=('tailscale')
replaces=('tailscale-relay')
conflicts=('tailscale-relay')
pkgver='1.36.2'
pkgrel='1'
pkgdesc="A mesh VPN that makes it easy to connect your devices, wherever they are."
arch=('x86_64')
makedepends=('golang-go')
depends=('iptables' 'iproute2')
license=('MIT')
url="https://tailscale.com/"
conflicts=("${_gitname}-bin" "${_gitname}")

source=("git+https://github.com/tailscale/tailscale.git#tag=v${pkgver}")
b2sums=('SKIP')

build() {
	cd "${_gitname}"
	export CGO_CPPFLAGS="${CPPFLAGS}"
    export CGO_CFLAGS="${CFLAGS}"
    export CGO_CXXFLAGS="${CXXFLAGS}"
    export CGO_LDFLAGS="${LDFLAGS}"
	export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -ldflags=-linkmode=external"
	for cmd in ./cmd/tailscale ./cmd/tailscaled; do
        go build -v -tags xversion -ldflags "$GO_LDFLAGS" "$cmd"
    done
}
package() {
	cd "${_gitname}"
	# install binaries
	install -Dm755 "tailscale" -t "${pkgdir}/usr/bin"
	install -Dm755 "tailscaled" -t "${pkgdir}/usr/sbin"
	# configure systemd
	install -Dm644 "./cmd/tailscaled/tailscaled.defaults" "${pkgdir}/etc/default/tailscaled"
	install -Dm644 "./cmd/tailscaled/tailscaled.service" "${pkgdir}/usr/lib/systemd/system/tailscaled.service"
}