]> git.pld-linux.org Git - packages/asciinema.git/commitdiff
up to 1.2.0, rewritten in go auto/th/asciinema-1.2.0-1
authorElan Ruusamäe <glen@delfi.ee>
Thu, 26 May 2016 07:01:43 +0000 (10:01 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 26 May 2016 07:02:08 +0000 (10:02 +0300)
asciinema.spec

index 46be1fcd8caef8530be76b5c5dc619e90649faae..06f72c6a43c0ee98b5bc69c15994675ee5532e9e 100644 (file)
@@ -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*
This page took 0.153439 seconds and 4 git commands to generate.