]> git.pld-linux.org Git - packages/asciinema.git/blob - asciinema.spec
06f72c6a43c0ee98b5bc69c15994675ee5532e9e
[packages/asciinema.git] / asciinema.spec
1 Summary:        Command line client (terminal recorder) for asciinema.org service
2 Name:           asciinema
3 Version:        1.2.0
4 Release:        1
5 License:        MIT
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)
13
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
19 %description
20 Asciinema is a free and open source solution for recording the
21 terminal sessions and sharing them on the web.
22
23 %prep
24 %setup -q
25
26 %build
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}"
34
35 %install
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
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
47 %{_mandir}/man1/asciinema.1*
This page took 0.048877 seconds and 2 git commands to generate.