%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: cherrytree Version: 0.19 Release: 2%{?dist} Summary: Hierarchical note taking application Group: Applications/Productivity License: GPLv2+ URL: http://www.giuspen.com/cherrytree/ Source0: http://www.giuspen.com/software/%{name}-%{version}.tar.gz Patch0: cherrytree-gtk-dep.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: desktop-file-utils BuildRequires: gettext Requires: pygtk2 Requires: pygobject2 Requires: pygtksourceview %description Cherrytree is a hierarchical note taking application, featuring rich text and syntax highlighting, storing all the data (including images) in a single xml file with extension ".ctd". %prep %setup -q # install into python_sitelib rather than datadir #sed -i 's|/usr/share/cherrytree/modules/|%{python_sitelib}/%{name}|g' %{name} %patch0 -p1 rm glade/cherrytree.glade.h %build %{__python} setup.py build %install rm -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} %find_lang %{name} %clean rm -rf %{buildroot} %post update-desktop-database &> /dev/null || : update-mime-database %{_datadir}/mime &> /dev/null || : touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun update-desktop-database &> /dev/null || : update-mime-database %{_datadir}/mime &> /dev/null || : if [ $1 -eq 0 ] ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.lang %defattr(-,root,root,-) %doc changelog license %{_bindir}/%{name} %{_datadir}/application-registry/%{name}.applications %{_datadir}/applications/%{name}.desktop %{_datadir}/%{name}/ %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_datadir}/mime/packages/%{name}.xml %{_datadir}/mime-info/%{name}.* #%{python_sitelib}/%{name}/ %{python_sitelib}/CherryTree-%{version}-py?.?.egg-info %changelog * Tue Dec 04 2011 Christoph Wickert - 0.19-2 - Drop cherrytree.glade.h * Mon Jan 03 2011 Christoph Wickert - 0.19-1 - Update to 0.19 * Wed Dec 29 2010 Christoph Wickert - 0.18.1-1 - Update to 0.18.1 * Mon Dec 20 2010 Christoph Wickert - 0.17.1-1 - Inital package