# Generated by go2rpm 1.16.0 %bcond check 1 %bcond bootstrap 0 %if %{with bootstrap} %global debug_package %{nil} %endif %if %{with bootstrap} %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ %endif # https://github.com/sagernet/tailscale %global goihead tailscale %global goipath github.com/sagernet/%{goihead} Version: 1.80.3 %define oldver 1.80.3-mod.4 # REMOVE BEFORE SUBMITTING THIS FOR REVIEW # --- # New Fedora packages should use %%gometa -f, which makes the package # ExclusiveArch to %%golang_arches_future and thus excludes the package from # %%ix86. If the new package is needed as a dependency for another package, # please consider removing that package from %%ix86 in the same way, instead of # building more go packages for i686. If your package is not a leaf package, # you'll need to coordinate the removal of the package's dependents first. # --- # REMOVE BEFORE SUBMITTING THIS FOR REVIEW %{?!tag:%{?!commit:%global tag v%{oldver}}} %gometa -L -f %global common_description %{expand: The easiest, most secure way to use WireGuard and 2FA.} %global golicenses LICENSE PATENTS derp/xdp/headers/LICENSE.BSD-2-Clause\\\ licenses/licenses.go tempfork/gliderlabs/ssh/LICENSE\\\ tempfork/spf13/cobra/LICENSE.txt %global godocs docs ALPINE.txt AUTHORS CODE_OF_CONDUCT.md README.md\\\ SECURITY.md VERSION.txt api.md header.txt example\\\ derp/README.md licenses/android.md licenses/apple.md\\\ licenses/tailscale.md licenses/windows.md example\\\ logtail/README.md logtail/api.md\\\ tempfork/acme/README.md\\\ tempfork/gliderlabs/ssh/README.md\\\ tempfork/spf13/cobra/README.md example\\\ words/scales.txt words/tails.txt Name: golang-github-sagernet-tailscale Release: %autorelease Summary: The easiest, most secure way to use WireGuard and 2FA License: BSD-2-Clause AND Apache-2.0 AND BSD-3-Clause URL: %{gourl} %define scommit %{?commit}%{?!commit:v%{version}} %define stag %{?tag}%{?!tag:%scommit} Source: https://%{goipath}/archive/%{stag}/%{goihead}-%{stag}.tar.gz %description %{common_description} %gopkg %prep %goprep -A shopt -s globstar for i in go.mod go.sum do sed -i "s~github.com/tailscale/xnet~~g;s~github.com/tailscale/netlink~~g;s~github.com/tailscale/wireguard-go~~g;" "${i}" done for i in **/* */* do if test -f ${i} then sed -i "s~github.com/tailscale/wireguard-go~github.com/sagernet/wireguard-go~g;s~github.com/tailscale/netlink~github.com/sagernet/netlink~g;s~github.com/tailscale/xnet~golang.org/x/net~g;s~tailscale.com/util/singleflight~github.com/sagernet/tailscale/util/singleflight~g;s~tailscale.com/atomicfile~github.com/sagernet/tailscale/atomicfile~g;s~github.com/fxamacker/cbor/v2~github.com/fxamacker/cbor~g;s~github.com/illarion/gonotify/v2~github.com/illarion/gonotify~g;s~github.com/jellydator/ttlcache/v3~github.com/jellydator/ttlcache~g;" "${i}" fi done %autopatch -p1 %if %{without bootstrap} %generate_buildrequires %go_generate_buildrequires %endif %if %{without bootstrap} %build for cmd in derp/xdp/headers docs/webhooks net/dnsfallback tempfork/spf13/cobra tool/gocross ; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %endif %install %gopkginstall mkdir -p %{buildroot}%{_datadir}/doc/%{name}/example %if %{without bootstrap} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %endif %if %{without bootstrap} %if %{with check} %check %endif %endif %if %{without bootstrap} %files %license LICENSE PATENTS derp/xdp/headers/LICENSE.BSD-2-Clause %license licenses/licenses.go tempfork/gliderlabs/ssh/LICENSE %license tempfork/spf13/cobra/LICENSE.txt %doc docs ALPINE.txt AUTHORS CODE_OF_CONDUCT.md README.md SECURITY.md %doc VERSION.txt api.md header.txt example derp/README.md licenses/android.md %doc licenses/apple.md licenses/tailscale.md licenses/windows.md example %doc logtail/README.md logtail/api.md tempfork/acme/README.md %doc tempfork/gliderlabs/ssh/README.md tempfork/spf13/cobra/README.md example %doc words/scales.txt words/tails.txt # REMOVE BEFORE SUBMITTING THIS FOR REVIEW # --- # New Fedora packages should not use globs to avoid installing conflicting # binaries. # Write a _bindir line per each of the binaries the package will install. # --- # REMOVE BEFORE SUBMITTING THIS FOR REVIEW %{_bindir}/* %endif %gopkgfiles %changelog %autochangelog