Blob Blame History Raw
%global debug_package   %{nil}
%global provider        github
%global provider_tld    com
%global project         TomasTomecek
%global repo            tmux-top
# https://github.com/TomasTomecek/tmux-top
%global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
%global commit          5061554c690673816fdd056c46828a5686db7fb9
%global shortcommit     %(c=%{commit}; echo ${c:0:7})

Name:           tmux-top
Version:        0.0.1
Release:        5%{?dist}
Summary:        Monitoring information for your tmux status line.
License:        GPLv2+
URL:            https://%{import_path}
Source0:        https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz

BuildRequires:  golang >= 1.2.1-3
Requires:       golang >= 1.2.1-3
BuildRequires:  golang(github.com/codegangsta/cli)

%if 0%{?rhel} == 6
# https://bugzilla.redhat.com/show_bug.cgi?id=1201654#c3
ExclusiveArch:  %{ix86} x86_64 %{arm}
%endif

%description
Monitoring information for your tmux status line.

tmux-top allows you to see your:

 * load
 * memory usage
 * network information
 * I/O

%package devel
BuildRequires:  golang >= 1.2.1-3
BuildRequires:  golang(github.com/codegangsta/cli)
Requires:       golang >= 1.2.1-3
Requires:       golang(github.com/codegangsta/cli)
Summary:        %{summary}
Provides:       golang(%{import_path}/cli) = %{version}-%{release}
Provides:       golang(%{import_path}/conf) = %{version}-%{release}
Provides:       golang(%{import_path}/display) = %{version}-%{release}
Provides:       golang(%{import_path}/humanize) = %{version}-%{release}
Provides:       golang(%{import_path}/io) = %{version}-%{release}
Provides:       golang(%{import_path}/load) = %{version}-%{release}
Provides:       golang(%{import_path}/mem) = %{version}-%{release}
Provides:       golang(%{import_path}/net) = %{version}-%{release}

%description devel
%{summary}

This package contains library source intended for
building other packages which use %{project}/%{repo}.

%prep
%setup -q -n %{repo}-%{commit}

%build
# Make link for tmux-top itself
mkdir -p src/github.com/%{project}
ln -s ../../../ src/github.com/%{project}/%{repo}
export GOPATH=$(pwd):%{gopath}
make

%install
make install DESTDIR=%{buildroot}

install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
cp -rpav cli %{buildroot}/%{gopath}/src/%{import_path}/
cp -rpav conf %{buildroot}/%{gopath}/src/%{import_path}/
cp -rpav display %{buildroot}/%{gopath}/src/%{import_path}/
cp -rpav docs %{buildroot}/%{gopath}/src/%{import_path}/
cp -rpav humanize %{buildroot}/%{gopath}/src/%{import_path}/
cp -rpav io %{buildroot}/%{gopath}/src/%{import_path}/
cp -rpav load %{buildroot}/%{gopath}/src/%{import_path}/
cp -rpav mem %{buildroot}/%{gopath}/src/%{import_path}/
cp -rpav net %{buildroot}/%{gopath}/src/%{import_path}/

%check
export GOPATH=$(pwd):%{gopath}:$GOPATH
make test

%files
%doc README.md LICENSE
%{_bindir}/%{name}

%files devel
%doc README.md LICENSE
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
%{gopath}/src/%{import_path}

%changelog
* Mon Feb 22 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.1-5
- https://fedoraproject.org/wiki/Changes/golang1.6

* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Mar 16 2015 Tomas Tomecek <ttomecek@redhat.com> - 0.0.1-2
- add devel subpackage (patch by jchaloup@redhat.com)

* Fri Mar 13 2015 Tomas Tomecek <ttomecek@redhat.com> - 0.0.1-1
- initial release