[packages/asciinema] up to 1.2.0, rewritten in go
glen
glen at pld-linux.org
Thu May 26 09:02:48 CEST 2016
commit 4366cd16ae9127e62f47587933247619a9e923f4
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Thu May 26 10:01:43 2016 +0300
up to 1.2.0, rewritten in go
asciinema.spec | 40 +++++++++++++++++++++++-----------------
1 file changed, 23 insertions(+), 17 deletions(-)
---
diff --git a/asciinema.spec b/asciinema.spec
index 46be1fc..06f72c6 100644
--- a/asciinema.spec
+++ b/asciinema.spec
@@ -1,35 +1,42 @@
-Summary: Command line recorder for asciinema.org service
+Summary: Command line client (terminal recorder) for asciinema.org service
Name: asciinema
-Version: 0.9.7
+Version: 1.2.0
Release: 1
License: MIT
Group: Applications/Networking
-Source0: https://pypi.python.org/packages/source/a/asciinema/%{name}-%{version}.tar.gz
-# Source0-md5: df9cde430210db8f054e78e163914ca5
+Source0: https://github.com/asciinema/asciinema/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: f61680ca17328ed43b61a24b1c267e29
URL: http://asciinema.org/docs
+BuildRequires: golang >= 1.3.1
BuildRequires: rpmbuild(macros) >= 1.710
-BuildRequires: rpm-pythonprov
-Requires: python-distribute
-BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _enable_debug_packages 0
+%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
+%define gopath %{_libdir}/golang
+%define import_path github.com/asciinema/asciinema
+
%description
-Command line client for asciinema.org service.
+Asciinema is a free and open source solution for recording the
+terminal sessions and sharing them on the web.
%prep
%setup -q
-# Remove bundled egg-info
-%{__rm} -r %{name}.egg-info
-
%build
-%py_build
+# set up temporary build gopath, and put our directory there
+install -d _build/src/%{import_path}
+ln -s $(pwd)/* _build/src/%{import_path}
+
+export GOPATH=$(pwd)/_build:%{gopath}
+LDFLAGS="-s -linkmode external"
+%gobuild -o "bin/%{name}"
%install
rm -rf $RPM_BUILD_ROOT
-%py_install
-
-%py_postclean
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
+install -p bin/asciinema $RPM_BUILD_ROOT%{_bindir}/asciinema
+cp -p -p man/asciinema.1 $RPM_BUILD_ROOT%{_mandir}/man1
%clean
rm -rf $RPM_BUILD_ROOT
@@ -37,5 +44,4 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/asciinema
-%{py_sitescriptdir}/asciinema
-%{py_sitescriptdir}/asciinema-%{version}-py*.egg-info
+%{_mandir}/man1/asciinema.1*
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/asciinema.git/commitdiff/4366cd16ae9127e62f47587933247619a9e923f4
More information about the pld-cvs-commit
mailing list