1 Summary: Command line client (terminal recorder) for asciinema.org service
6 Group: Applications/Networking
7 Source0: https://github.com/asciinema/asciinema/archive/v%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5: f61680ca17328ed43b61a24b1c267e29
9 URL: http://asciinema.org/docs
10 BuildRequires: golang >= 1.3.1
11 BuildRequires: rpmbuild(macros) >= 1.710
12 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
20 Asciinema is a free and open source solution for recording the
21 terminal sessions and sharing them on the web.
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}
31 export GOPATH=$(pwd)/_build:%{gopath}
32 LDFLAGS="-s -linkmode external"
33 %gobuild -o "bin/%{name}"
36 rm -rf $RPM_BUILD_ROOT
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
42 rm -rf $RPM_BUILD_ROOT
45 %defattr(644,root,root,755)
46 %attr(755,root,root) %{_bindir}/asciinema
47 %{_mandir}/man1/asciinema.1*