%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: lorem-ipsum-generator Version: 0.3 Release: 4%{?dist} Summary: Generates random lorem ipsum text BuildArch: noarch Group: Applications/Text License: BSD URL: http://code.google.com/p/lorem-ipsum-generator/ Source0: http://lorem-ipsum-generator.googlecode.com/files/%{name}-%{version}.tar.gz Patch0: lorem-ipsum-generator-0.3-fix-installed-files.patch Patch1: lorem-ipsum-generator-0.3-fix-desktop-file.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Requires: pygtk2 BuildRequires: python-devel python-setuptools desktop-file-utils %description Lorem Ipsum Generator provides a GTK+ graphical user interface, a command-line interface, and a Python module that generate random "lorem ipsum" text. The Lorem Ipsum Generator can produce a given quantity of paragraphs or sentences of "lorem ipsum" text. "Lorem ipsum" text is also known as "lipsum" text. %prep %setup -q %patch0 -p1 %patch1 -p1 chmod -x TODO %build python setup.py build %install rm -rf $RPM_BUILD_ROOT python setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/lorem-ipsum-generator.desktop %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc README COPYING TODO %{_bindir}/lorem-ipsum-generator %{_datadir}/applications/lorem-ipsum-generator.desktop %{python_sitelib}/lipsum/ %{python_sitelib}/lorem_ipsum_generator-0.3-py?.?.egg-info/ %changelog * Fri Jul 23 2010 Jean-Francois Saucier <jfsaucier@infoglobe.ca> - 0.3-4 - Fix for the python 2.7 rebuild * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.3-3 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Fri Jan 15 2010 Jean-Francois Saucier <jfsaucier@infoglobe.ca> - 0.3-2 - Fix as per the recommendations in bug #555376 - Rename patches to reflect the guidelines - Adjust desktop file - Expand the files section to be more explicit * Thu Jan 14 2010 Jean-Francois Saucier <jfsaucier@infoglobe.ca> - 0.3-1 - Initial build for Fedora