# Generated by go2rpm 1.18.0 %bcond check 1 # https://github.com/juanfont/headscale %global goipath github.com/juanfont/headscale Version: 0.27.0 %global tag v%{version} %gometa -L -f Name: headscale Release: %autorelease Summary: An open source, self-hosted implementation of the Tailscale control server # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-PDDC AND CC0-1.0 AND ISC AND MIT AND MPL-2.0 URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml Source3: headscale.sysusers BuildRequires: go-vendor-tools BuildRequires: systemd-units BuildRequires: systemd-rpm-macros %{?sysusers_requires_compat} Requires: systemd-units %global debug_package %{nil} %description An open source, self-hosted implementation of the Tailscale control server. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on %define tags ts2019 export GOTOOLCHAIN=auto export GOSUMDB="sum.golang.org" export GO_LDFLAGS="-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=%{version}-%{release}" %gobuild -tags %{tags} -o %{gobuilddir}/bin/headscale ./cmd/headscale %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vd %{buildroot}%{_rundir}/headscale install -m 0755 -vd %{buildroot}%{_sharedstatedir}/headscale install -m 0755 -v -p %{gobuilddir}/bin/headscale %{buildroot}%{_bindir}/ install -m 0644 -v -p -D config-example.yaml %{buildroot}%{_sysconfdir}/headscale/config.yaml install -m 0644 -v -p -D packaging/systemd/headscale.service %{buildroot}%{_unitdir}/headscale.service install -m 0644 -v -p -D %{SOURCE3} %{buildroot}%{_sysusersdir}/headscale.conf %check %go_vendor_license_check -c %{S:2} %pre %sysusers_create_compat %{SOURCE3} %post chown -R headscale:headscale %{_rundir}/headscale chown -R headscale:headscale %{_sharedstatedir}/headscale %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc docs CHANGELOG.md CLAUDE.md CODE_OF_CONDUCT.md CONTRIBUTING.md README.md %doc integration/README.md %doc packaging/README.md %{_bindir}/headscale %config(noreplace) %{_sysconfdir}/headscale/config.yaml %{_sysusersdir}/headscale.conf %{_unitdir}/headscale.service %dir %{_rundir}/headscale %dir %{_sharedstatedir}/headscale %changelog %autochangelog