%define rev 56 %define python_version %(%{__python} -c 'import sys; print sys.version[:3]') Name: giraffe Version: 0.0.1 Release: 0.1.%{rev}bzr%{?dist} Summary: GIR Documentation Tool Group: Development/Tools License: GPLv3 URL: https://launchpad.net/giraffe # This is a bzr checkout, to obtain the used tarball in this spec : # bzr branch -r %%{rev} lp:giraffe # mv %%{name} %%{name}-%%{version} # tar cjf %%{name}-%%{version}-%%{rev}bzr.tar.bz2 %%{name}-%%{version} Source0: %{name}-%{version}-%{rev}bzr.tar.bz2 Source1: %{name}.1 BuildArch: noarch BuildRequires: python-devel Patch0: %{name}-%{version}-fix-install.patch %description A simple tool to generate HTML API documentation from a repository of GObject Introspection data (GIR XML files). The output is formatted for several different programming languages. %prep %setup -q %patch0 -p1 -b .fix-install %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT for lib in $RPM_BUILD_ROOT%{python_sitelib}/%{name}/*.py; do sed '/\/usr\/bin/d' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib done install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1 %files %doc COPYING README %{python_sitelib}/%{name} %{python_sitelib}/%{name}-%{version}-py%{python_version}.egg-info %{_bindir}/%{name} %{_mandir}/man1/%{name}.1.* %changelog * Sat Jun 11 2011 Hicham HAOUARI - 0.0.1-0.1.56bzr - Initial package