%global commit 11c942e2b0a3d2c054df06e6300a2d403607f96a %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: pg_view Version: 1.2.0 Release: 2.20141118git%{shortcommit}%{?dist} Summary: Command-line tool to display the state of the PostgreSQL processes License: ASL 2.0 URL: https://github.com/zalando/pg_view Source0: https://github.com/zalando/pg_view/archive/%{commit}/pg_view-%{commit}.tar.gz Patch0: pg_view-python2-shebang.patch BuildArch: noarch Requires: python-psycopg2 %description pg_view is a command-line tool to display the state of the PostgreSQL processes. It shows the per-process statistics combined with pg_stat_activity output for the processes that have the rows there, global system stats, per-partition information and the memory stats. %prep %setup -qn %{name}-%{commit} %patch0 %build %install install -D -p -m 755 %{_builddir}/%{name}-%{commit}/pg_view.py \ %{buildroot}%{_bindir}/pg_view %files %doc CHANGELOG LICENSE README.md images %{_bindir}/pg_view %changelog * Thu Nov 20 2014 Lorenzo Dalrio - 1.2.0-2.20141118git11c942e - Patched shebang to point to /usr/bin/python2 explicitly. - Corrected package version to reflect script version. * Thu Nov 20 2014 Lorenzo Dalrio - 1.2.0-1.20141118git11c942e - Initial release.