%global commit c0abadf3cd07eb2b5e5ad694f680705c7b1c764e
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global checkout .20161118git%{shortcommit}
Summary: View GPU utilization of AMD/ATI Radeon devices
Name: radeontop
Version: 1.0
Release: 5%{?dist}
License: GPLv3
URL: https://github.com/clbr/%{name}
# wget https://github.com/clbr/radeontop/archive/v1.0/radeontop-1.0.tar.gz
#Source0: %{url}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: %{name}.metainfo.xml
BuildRequires: asciidoc gettext
BuildRequires: libappstream-glib
BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(pciaccess)
BuildRequires: pkgconfig(libdrm)
BuildRequires: libxcb-devel
%description
RadeonTop shows the utilization of your GPU, both in general and by blocks.
Supported cards are R600 and up.
%prep
%autosetup -n %{name}-%{version}
mkdir .git
%build
# configure doesn't exist, but we need the exported CFLAGS and friends
%configure || :
# plain=1 prevents stripping
# CC="..." to also pass -g
# Upstream patch: https://github.com/clbr/radeontop/pull/8
make all %{?_smp_mflags} PREFIX=%{_prefix} plain=1 CC="gcc -g"
%install
%make_install PREFIX=%{_prefix} LIBDIR=%{_lib}
%find_lang %{name}
# Add AppStream metadata
install -Dm 0644 -p %{SOURCE1} \
%{buildroot}%{_datadir}/metainfo/%{name}.metainfo.xml
%check
# Validate Appstream metadata
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/%{name}.metainfo.xml
%files -f %{name}.lang
%doc README.md
%license COPYING
%{_sbindir}/%{name}
# Workaround failure to build on /usr/lib64
%{_libdir}/libradeontop_xcb.so
%{_mandir}/man1/%{name}.1*
#AppStream metadata
%{_datadir}/metainfo/%{name}.metainfo.xml
%changelog
* Sat Aug 05 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 1.0-5
- Add metainfo file
* Thu Jan 19 2017 Luya Tshimbalanga <luya@fedoraproject.org> - 1.0-1
- Update to upstream 1.0
* Fri Nov 18 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 0.9-5.20161118gitc0abadf
- Latest git snapshot
* Thu Aug 25 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 0.9-4.20160825git6fb1c5c
- Latest git snapshot
- Added libxcb dependency
* Wed Jul 20 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 0.9-3.20160704gitbb3ed18
- Latest git snapshot
* Fri May 27 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 0.9-2.20160527git2047d13
- Fix Changelog in prescribed format.
- Remove obsolete Group field from spec
* Fri May 27 2016 Luya Tshimbalanga <luya@fedoraproject.org> - 0.9-1.20160527git2047d13
- Update to upstream 0.9
* Sun Feb 15 2015 Fabian Deutsch <fabiand@fedoraproject.org> - 0.8-1.20150215git281462c
- Update to upstream 0.8
* Thu Apr 24 2014 Fabian Deutsch <fabiand@fedoraproject.org> - 0.7-2.20140421giteadc100
- Fix commit position, BuildRequirements, build, and man page inclusion (thanks mschwendt)
* Mon Apr 21 2014 Fabian Deutsch <fabiand@fedoraproject.org> - 0.7-1.20140421giteadc100
- Initial package