]>
Commit | Line | Data |
---|---|---|
4366cd16 | 1 | Summary: Command line client (terminal recorder) for asciinema.org service |
264f8e53 | 2 | Name: asciinema |
4366cd16 | 3 | Version: 1.2.0 |
264f8e53 ER |
4 | Release: 1 |
5 | License: MIT | |
6 | Group: Applications/Networking | |
4366cd16 ER |
7 | Source0: https://github.com/asciinema/asciinema/archive/v%{version}/%{name}-%{version}.tar.gz |
8 | # Source0-md5: f61680ca17328ed43b61a24b1c267e29 | |
264f8e53 | 9 | URL: http://asciinema.org/docs |
4366cd16 | 10 | BuildRequires: golang >= 1.3.1 |
5b58164f | 11 | BuildRequires: rpmbuild(macros) >= 1.710 |
264f8e53 ER |
12 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
13 | ||
4366cd16 ER |
14 | %define _enable_debug_packages 0 |
15 | %define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**}; | |
16 | %define gopath %{_libdir}/golang | |
17 | %define import_path github.com/asciinema/asciinema | |
18 | ||
264f8e53 | 19 | %description |
4366cd16 ER |
20 | Asciinema is a free and open source solution for recording the |
21 | terminal sessions and sharing them on the web. | |
264f8e53 ER |
22 | |
23 | %prep | |
24 | %setup -q | |
25 | ||
264f8e53 | 26 | %build |
4366cd16 ER |
27 | # set up temporary build gopath, and put our directory there |
28 | install -d _build/src/%{import_path} | |
29 | ln -s $(pwd)/* _build/src/%{import_path} | |
30 | ||
31 | export GOPATH=$(pwd)/_build:%{gopath} | |
32 | LDFLAGS="-s -linkmode external" | |
33 | %gobuild -o "bin/%{name}" | |
264f8e53 ER |
34 | |
35 | %install | |
36 | rm -rf $RPM_BUILD_ROOT | |
4366cd16 ER |
37 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1} |
38 | install -p bin/asciinema $RPM_BUILD_ROOT%{_bindir}/asciinema | |
39 | cp -p -p man/asciinema.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
264f8e53 ER |
40 | |
41 | %clean | |
42 | rm -rf $RPM_BUILD_ROOT | |
43 | ||
44 | %files | |
45 | %defattr(644,root,root,755) | |
46 | %attr(755,root,root) %{_bindir}/asciinema | |
4366cd16 | 47 | %{_mandir}/man1/asciinema.1* |