%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: crunchyfrog Version: 0.4.0 Release: 2%{?dist} Summary: A database front-end for Gnome Group: Applications/Productivity License: GPLv3+ URL: http://code.google.com/p/%{name}/ Source0: http://crunchyfrog.googlecode.com/files/crunchyfrog-%{version}.tar.gz Patch0: crunchyfrog-%{version}-desktop.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-setuptools, python-devel, python-sphinx, desktop-file-utils, pyxdg, gettext Requires: hicolor-icon-theme, pygtk2, python-lxml, python-configobj, pygtk2-libglade Requires: python-sqlite2, python-sexy, python-sphinx, ipython, python-simplejson, gnome-python2 Requires: gnome-python-desktop2, dbus-python, pygtksourceview, gnome-python2-extras, gnome-python2-gconf %description CrunchyFrog is a database front-end for Gnome. * Supports various databases (PostreSQL, MySQL, SQLite, Oracle, SQLServer, LDAP). * Lightweight user interface for daily tasks. * SQL editor with syntax highlighting. * Export results to CSV and OpenOffice. * Inspect database objects. * Supports multiple database connections at once (e.g. for switching between development and production environments). %prep %setup -q -n %{name}-%{version} %patch0 -p1 -b .crunchyfrog_desktop %build python setup.py build %install rm -rf $RPM_BUILD_ROOT python setup.py install --root $RPM_BUILD_ROOT %find_lang %{name} install -p -dm 755 %{buildroot}%{_datadir}/pixmaps install -p -m 644 data/%{name}.png %{buildroot}%{_datadir}/pixmaps desktop-file-install --vendor="fedora" \ --dir=$RPM_BUILD_ROOT%{_datadir}/applications \ $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name} rm $RPM_BUILD_ROOT%{_datadir}/applications/fedora-%{name}.desktop rm $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png # Remove unwanted files in docs folder find docs -name '.static' -type d -print | xargs rm -rf find docs -name '.templates' -type d -print | xargs rm -rf find docs -name '_static' -type d -print | xargs rm -rf find docs -name '.*' -type f -print | xargs rm %clean rm -rf $RPM_BUILD_ROOT %post touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi %postun touch --no-create %{_datadir}/icons/hicolor if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi %files -f %{name}.lang %defattr(-,root,root,-) %{python_sitelib}/* %doc docs/* %{_bindir}/%{name} %{_datadir}/icons/hicolor/24x24/apps/%{name}.png %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_datadir}/%{name} %{_datadir}/man/man1/*.1.gz %{_datadir}/pixmaps/%{name}.svg %{_datadir}/applications/%{name}.desktop %changelog * Thu Oct 08 2009 Rakesh Pandit 0.4.0-2 - Added missing build require pyxdg & gettext * Wed Sep 30 2009 Rakesh Pandit 0.4.0-1 - Updated to 0.4.0 * Sun May 10 2009 Rakesh Pandit 0.3.4-1 - Initial package