Blob Blame History Raw
%define python_sitelib %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib()')

%define desktop_vendor fedora

Summary:        Desktop news aggregator
Name:           straw
Version:        0.27
Release:        19%{?dist}
License:        GPLv2+
Group:          Applications/Internet
URL:            http://www.gnome.org/projects/straw/
Source:         http://download.gnome.org/sources/straw/%{version}/%{name}-%{version}.tar.bz2
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

Requires: python >= 2.4
# fix for python >= 2.5
%if 0%{?fedora} > 6
BuildRequires: python-devel
%endif
Requires: gnome-python2-gnome
Requires: gnome-python2-gnomevfs
Requires: gnome-python2-gtkhtml2
Requires: gnome-python2-libegg
Requires: gnome-python2-gconf
Requires: pygtk2-libglade
Requires: mx
Requires: python-adns >= 1.2.1
Requires: dbus-python

Requires(pre): GConf2
Requires(post):GConf2
Requires(preun):GConf2

BuildRequires: dbus-python
BuildRequires: pygtk2-libglade
BuildRequires: pygtk2 >= 2.8.0
BuildRequires: desktop-file-utils
BuildRequires: gnome-python2-gnome
BuildRequires: gnome-python2-gconf
BuildRequires: intltool

BuildArch: noarch


%description
Straw is a desktop news aggregator for the GNOME environment. Its aim
is to be a faster, easier and more accessible way to read news and
blogs than the traditional browser.

%prep
%setup -q

%build
%{__python} setup.py build

%install
%{__rm} -rf %{buildroot}

export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1"
%{__python} setup.py install -O1 --skip-build --root="%{buildroot}" --prefix="%{_prefix}" --sysconfdir="%{_sysconfdir}"

# this is a fix for constants.py to lookup in install dir rather than buildroot
sed -i -e s@${RPM_BUILD_ROOT}@@ ${RPM_BUILD_ROOT}%{python_sitelib}/%{name}/constants.py

%{__python} -Oc 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT%{python_sitelib}/%{name}'")'

%find_lang %{name}

%{__install} -Dp -m0644 data/%{name}.schemas %{buildroot}%{_sysconfdir}/gconf/schemas/%{name}.schemas

desktop-file-install --vendor %{desktop_vendor} --delete-original \
                     --dir %{buildroot}%{_datadir}/applications    \
                     %{buildroot}%{_datadir}/applications/%{name}.desktop

%pre
if [ $1 -gt 1 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  gconftool-2 --makefile-uninstall-rule \
  %{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null || :
fi
%post
export GCONF_CONFIG_SOURCE="$(gconftool-2 --get-default-source)"
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas &>/dev/null 

%preun
if [ $1 -eq 0 ]; then
    export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
    gconftool-2 --makefile-uninstall-rule \
    %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null || :
fi

%clean
%{__rm} -rf %{buildroot}

%files -f %{name}.lang
%defattr(-, root, root, 0755)
%{_sysconfdir}/gconf/schemas/straw.schemas
%doc LICENSE NEWS README TODO ChangeLog AUTHORS
%{_bindir}/%{name}
%{python_sitelib}/straw/
%{python_sitelib}/*egg-info
%{_datadir}/straw/
%{_datadir}/applications/%{desktop_vendor}-%{name}.desktop
%{_datadir}/pixmaps/%{name}.png


%changelog
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.27-19
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Tue Aug 11 2009 Ville Skyttä <ville.skytta@iki.fi> - 0.27-18
- Use bzipped upstream tarball.

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.27-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.27-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.27-15
- Rebuild for Python 2.6

* Thu Nov 20 2008 Jochen Schmitt <Jochen herr-schmitt de> - 0.27-14
- Include egg-info file into package
- Add gnome-python2-gnome as BR and Req.

* Mon Jul  7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.27-13
- fix conditional comparison

* Wed Nov 21 2007 Alex Lancaster <alexlan@fedoraproject.org> - 0.27-12
- Resolve Conflict with python-adns

* Tue Oct 09 2007 Subhodip Biswas <440volt.tux@gmail.com> - 0.27-11
- Bumped up the release to prevent tag conflict in cvs

* Sun Sep 23 2007 Subhodip Biswas <440volt.tux@gmail.com> - 0.27-9
- Fixed dependecies related to pygtk

* Fri Sep 21 2007 Subhodip Biswas <440volt.tux@gmail.com> - 0.27-8
- Fixed dependencies related to gnome-python2

* Mon Sep 17 2007 Subhodip Biswas <440volt.tux@gmail.com> - 0.27-7
- Fixed redundant dependencies 

* Sun Sep 16 2007 Subhodip Biswas <440volt.tux@gmail.com> - 0.27-6
- Fixed usage Gconf.Straw does not support python-adns anymore.
- So removed it. Fixed Spec file indentation warning.

* Thu Sep 14 2007 Subhodip Biswas <440volt.tux@gmail.com> - 0.27-5
- Fixed few major errors and dependencies

* Tue Sep 11 2007 Subhodip Biswas <440volt.tux@gmail.com> - 0.27-4
- Fixed failed dependencies

* Mon Sep 10 2007 Subhodip Biswas <440volt.tux@gmail.com> - 0.27-3
- Fixed few errors 

* Sun Sep 9  2007 Subhodip Biswas <440volt.tux@gmail.com> - 0.27-2
- Some dependencies fixed 

* Tue Aug 27 2007 Subhodip Biswas <440volt.tux@gmail.com> - 0.27-1
- Updated to 0.27