3 %bcond_with prebuilt # use prebuilt binary
5 %define revision 58fc3ee5f
6 Summary: An open source serveo/ngrok alternative
11 Group: Development/Building
12 Source0: https://github.com/antoniomika/sish/archive/%{revision}/%{revision}.tar.gz
13 # Source0-md5: 878d1a9bee0864181965448869f1c184
14 URL: https://github.com/antoniomika/sish
15 BuildRequires: golang >= 1.11
16 BuildRequires: rpmbuild(macros) >= 1.647
17 ExclusiveArch: %{ix86} %{x8664} %{arm}
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _enable_debug_packages 0
22 %define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v %{?debug:-x} %{?**};
23 %define import_path github.com/antoniomika/sish
26 An open source serveo/ngrok alternative. HTTP(S)/WS(S)/TCP Tunnels to
27 localhost using only SSH.
36 install -d src/$(dirname %{import_path})
37 mv %{name}-* src/%{import_path}
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT%{_bindir}
49 install -p bin/%{name} $RPM_BUILD_ROOT%{_bindir}
52 rm -rf $RPM_BUILD_ROOT
55 %defattr(644,root,root,755)
57 %attr(755,root,root) %{_bindir}/sish