[packages/asciinema] up to 1.4.0; back to python from go

glen glen at pld-linux.org
Thu Jun 22 23:55:12 CEST 2017


commit 0afdcf36a88e9aa826dcd318b75026664f2f781a
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Fri Jun 23 00:48:58 2017 +0300

    up to 1.4.0; back to python from go
    
    upstream commits:
    * 9531a11 - Bye golang! (1 year ago) <Marcin Kulik>
    https://github.com/asciinema/asciinema/commit/9531a11
    * 4605040 - Revert "Remove old, python based implementation" (1 year ago) <Marcin Kulik>
    https://github.com/asciinema/asciinema/commit/4605040

 asciinema.spec | 41 ++++++++++++++++++++---------------------
 1 file changed, 20 insertions(+), 21 deletions(-)
---
diff --git a/asciinema.spec b/asciinema.spec
index 06f72c6..e806d1a 100644
--- a/asciinema.spec
+++ b/asciinema.spec
@@ -1,21 +1,24 @@
+%define		module		asciinema
+%define		egg_name	asciinema
+%define		pypi_name	asciinema
 Summary:	Command line client (terminal recorder) for asciinema.org service
 Name:		asciinema
-Version:	1.2.0
+Version:	1.4.0
 Release:	1
-License:	MIT
+License:	GPL v3
 Group:		Applications/Networking
-Source0:	https://github.com/asciinema/asciinema/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	f61680ca17328ed43b61a24b1c267e29
+#Source0:	https://github.com/asciinema/asciinema/archive/v%{version}/%{name}-%{version}.tar.gz
+Source0:	https://files.pythonhosted.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
+# Source0-md5:	507ec769e1e9f8d5146b8c32c5ed54ac
 URL:		http://asciinema.org/docs
-BuildRequires:	golang >= 1.3.1
+BuildRequires:	python3-modules
+BuildRequires:	python3-setuptools
+BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.710
+Requires:	python3-setuptools
+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
 Asciinema is a free and open source solution for recording the
 terminal sessions and sharing them on the web.
@@ -23,20 +26,15 @@ terminal sessions and sharing them on the web.
 %prep
 %setup -q
 
-%build
-# set up temporary build gopath, and put our directory there
-install -d _build/src/%{import_path}
-ln -s $(pwd)/* _build/src/%{import_path}
+# Remove bundled egg-info
+%{__rm} -r %{egg_name}.egg-info
 
-export GOPATH=$(pwd)/_build:%{gopath}
-LDFLAGS="-s -linkmode external"
-%gobuild -o "bin/%{name}"
+%build
+%py3_build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-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
+%py3_install
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -44,4 +42,5 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/asciinema
-%{_mandir}/man1/asciinema.1*
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/asciinema.git/commitdiff/0afdcf36a88e9aa826dcd318b75026664f2f781a



More information about the pld-cvs-commit mailing list