abinfo "Installing tailscaled service files..."

install -Dvm644 "${SRCDIR}/cmd/tailscaled/tailscaled.service" \
	-t "${PKGDIR}/usr/lib/systemd/system"
install -Dvm644 "${SRCDIR}/cmd/tailscaled/tailscaled.defaults" \
	"${PKGDIR}/etc/default/tailscaled"


abinfo "Installing tailscale completions..."

"$SRCDIR"/tailscale completion bash > "$SRCDIR"/tailscale.bash
"$SRCDIR"/tailscale completion zsh > "$SRCDIR"/_tailscale
"$SRCDIR"/tailscale completion fish > "$SRCDIR"/tailscale.fish

install -Dvm0644 "$SRCDIR"/tailscale.bash -t "$PKGDIR"/usr/share/bash-completion/completions/
install -Dvm0644 "$SRCDIR"/_tailscale -t "$PKGDIR"/usr/share/zsh/site-functions/
install -Dvm0644 "$SRCDIR"/tailscale.fish -t "$PKGDIR"/usr/share/fish/vendor_completions.d/
