%global commit 084303928c4476cf50b3f33ac56a81d1113369f9 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global checkoutdate 20130224 %global checkout %{checkoutdate}git%{shortcommit} Name: gitstats Version: 0.2 Release: %{checkout}%{?dist} Summary: Generates statistics based on GIT repository activity Group: Development/Tools # All code and content other than sortable.js is available under the GPLv2 # and GPLv3 licenses. The sortable.js file is available under the MIT license. License: GPLv2 and GPLv3 and MIT URL: http://%{name}.sourceforge.net Source0: https://github.com/hoxu/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz BuildArch: noarch BuildRequires: /usr/bin/pod2man BuildRequires: gzip Requires: python >= 2.4.4 Requires: gnuplot >= 4.0.0 Requires: git >= 1.5.2.4 %description GitStats is a statistics generator for git (a distributed revision control system) repositories. It examines the repository and produces some interesting statistics from the history of it. Currently HTML is the only output format. %prep %setup -qn %{name}-%{commit} %build # Use pod2man directly instead of 'make man' as Makefile task expects to be # running from a git clone (and generates the --release value based on this # rather than the tarball. pod2man --center "User Commands" -r "%{name}-%{version}-%{checkoutdate}git%{shortcommit}" doc/%{name}.pod doc/%{name}.1 gzip doc/%{name}.1 %install make install PREFIX=%{buildroot}%{_prefix} mkdir -p %{buildroot}%{_docdir}/%{name} mkdir -p %{buildroot}%{_mandir}/man1/ install -m 0644 $RPM_BUILD_DIR/%{name}-%{commit}/doc/AUTHOR %{buildroot}%{_docdir}/%{name}/AUTHOR install -m 0644 $RPM_BUILD_DIR/%{name}-%{commit}/doc/GPLv2 %{buildroot}%{_docdir}/%{name}/GPLv2 install -m 0644 $RPM_BUILD_DIR/%{name}-%{commit}/doc/GPLv3 %{buildroot}%{_docdir}/%{name}/GPLv3 install -m 0644 $RPM_BUILD_DIR/%{name}-%{commit}/doc/LICENSE %{buildroot}%{_docdir}/%{name}/LICENSE install -m 0644 $RPM_BUILD_DIR/%{name}-%{commit}/doc/README %{buildroot}%{_docdir}/%{name}/README install -m 0644 $RPM_BUILD_DIR/%{name}-%{commit}/doc/%{name}.1.gz %{buildroot}%{_mandir}/man1/%{name}.1.gz %files %attr(755, root, root) %{_bindir}/%{name} %attr(644, root, root) %{_datarootdir}/%{name}/arrow-down.gif %attr(644, root, root) %{_datarootdir}/%{name}/arrow-none.gif %attr(644, root, root) %{_datarootdir}/%{name}/arrow-up.gif %attr(644, root, root) %{_datarootdir}/%{name}/%{name}.css %attr(644, root, root) %{_datarootdir}/%{name}/sortable.js %doc %{_docdir}/%{name} %doc %{_mandir}/man1/%{name}.1.gz %changelog * Sun Feb 24 2013 Stephen Gordon 0.2-20130224git0843039 - Updated file names to match upstream: s/license/LICENSE/ s/author.txt/AUTHOR/ - Added required build dependencies (gzip, pod2man) to build manual page. - Added build and install of manual page. * Sat Feb 23 2013 Stephen Gordon 0.1-20130223gitaa77a89 - Initial package submission.