Last active
December 29, 2015 10:09
-
-
Save jakubjedelsky/7654715 to your computer and use it in GitHub Desktop.
asciinema rpm spec file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%global debug_package %{nil} | |
%global provider github | |
%global provider_tld com | |
%global pkgname asciinema | |
%global project %{pkgname}-cli | |
%global import_path %{provider}.%{provider_tld}/%{pkgname}/%{project} | |
%global commit b68b7e6333e971fc1960c647b4ccfb451ca7f39c | |
%global shortcommit %(c=%{commit}; echo ${c:0:7}) | |
Name: %{project} | |
Version: 0.9.9 | |
Release: 1%{?dist} | |
Summary: Command line client (terminal recorder) for asciinema.org service | |
Group: Applications/Internet | |
License: GPLv3 | |
URL: http://asciinema.org | |
Source0: https://github.com/%{pkgname}/%{project}/archive/v%{version}.tar.gz | |
Source1: asciinema.1 | |
Obsoletes: %{pkgname} | |
BuildRequires: golang | |
BuildRequires: golang-src | |
BuildRequires: gcc | |
BuildRequires: golang(github.com/kr/pty) | |
BuildRequires: golang(code.google.com/p/go.crypto/ssh/terminal) | |
BuildRequires: golang(code.google.com/p/gcfg) | |
Requires: glibc | |
%description | |
Asciinema is a free and open source solution for recording the terminal sessions | |
and sharing them on the web. | |
%package devel | |
BuildRequires: golang | |
Requires: golang | |
Provides: %{pkgname}-devel = %{version}-%{release} | |
Summary: A golang registry for global request variables (source libraries) | |
Provides: golang(%{import_path}) = %{version}-%{release} | |
Provides: golang(%{import_path}/api) = %{version}-%{release} | |
Provides: golang(%{import_path}/cli) = %{version}-%{release} | |
Provides: golang(%{import_path}/commands) = %{version}-%{release} | |
Provides: golang(%{import_path}/ptyx) = %{version}-%{release} | |
Provides: golang(%{import_path}/terminal) = %{version}-%{release} | |
Provides: golang(%{import_path}/util) = %{version}-%{release} | |
%description devel | |
%{summary} | |
This package provides the source libraries for asciinema(-cli). | |
%prep | |
%setup -q -n %{project}-%{version} | |
%build | |
# set up temporary build gopath, and put our directory there | |
mkdir -p ./_build/src/%{import_path} | |
ln -s $(pwd)/* ./_build/src/%{import_path}/ | |
export GOPATH=$(pwd)/_build:%{gopath} | |
go build -o "bin/%{project}" -ldflags "-X main.GitCommit %{shortcommit} -s -linkmode external" | |
%install | |
# binary | |
install -d %{buildroot}%{_bindir} | |
install -p -m 755 bin/%{project} %{buildroot}%{_bindir}/%{project} | |
pushd %{buildroot}%{_bindir} | |
ln -s %{project} %{pkgname} | |
popd | |
# man page | |
install -d %{buildroot}%{_mandir}/man1 | |
install -p -m 644 %{SOURCE1} %{buildroot}%{_mandir}/man1/ | |
# devel | |
install -d -p %{buildroot}%{gopath}/src/%{import_path} | |
for dir in api cli commands ptyx terminal util ;do | |
cp -rpav $dir %{buildroot}%{gopath}/src/%{import_path}/ | |
done | |
%files | |
%doc CHANGELOG.md LICENSE README.md | |
%{_bindir}/asciinema-cli | |
%{_bindir}/asciinema | |
%{_mandir}/man1/* | |
%files devel | |
%doc CHANGELOG.md LICENSE README.md | |
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{pkgname}/%{project} | |
%{gopath}/src/%{import_path} | |
%changelog | |
* Sat Dec 27 2014 Jakub Jedelsky <[email protected]> - 0.9.9-1 | |
- Update to new version | |
- Rewritten to Go | |
- License changed to GPLv3 | |
* Mon Feb 10 2014 Jakub Jedelsky <[email protected]> - 0.9.8-1 | |
- Update to new version | |
* Mon Jan 27 2014 Jakub Jedelsky <[email protected]> - 0.9.7-3 | |
- Add check of tests | |
- Add build and common requires | |
- Patch for non-interactive shell | |
* Mon Dec 2 2013 Jakub Jedelsky <[email protected]> - 0.9.7-2 | |
- A few spec file changes | |
- Edit Summary | |
* Mon Nov 25 2013 Jakub Jedelsky <[email protected]> - 0.9.7-1 | |
- Initial package |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment