]> git.pld-linux.org Git - SPECS.git/blob - sish.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / sish.spec
1 #
2 # Conditional build:
3 %bcond_with     prebuilt                # use prebuilt binary
4
5 %define         revision        58fc3ee5f
6 Summary:        An open source serveo/ngrok alternative
7 Name:           sish
8 Version:        0.0.1
9 Release:        1
10 License:        MIT
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)
19
20 # go stuff
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
24
25 %description
26 An open source serveo/ngrok alternative. HTTP(S)/WS(S)/TCP Tunnels to
27 localhost using only SSH.
28
29 %prep
30 %setup -qc
31
32 # for doc
33 mv %{name}-*/*.md .
34
35 # don't you love go?
36 install -d src/$(dirname %{import_path})
37 mv %{name}-* src/%{import_path}
38
39 %build
40 export GOPATH=$(pwd)
41 cd src/%{import_path}
42
43 go get ./...
44 %gobuild ./...
45
46 %install
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT%{_bindir}
49 install -p bin/%{name} $RPM_BUILD_ROOT%{_bindir}
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %files
55 %defattr(644,root,root,755)
56 %doc README.md
57 %attr(755,root,root) %{_bindir}/sish
This page took 0.327829 seconds and 3 git commands to generate.