Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > dbac27fa86713299afdd3eeef68be647 > files > 3

pychess-0.10-1.fc13.src.rpm

%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%endif

Name:           pychess
Version:        0.10
Release:        1%{?dist}
Summary:        Chess game for GNOME

Group:          Amusements/Games
License:        GPLv2
URL:            http://pychess.googlepages.com
# hgsnapshot created with:
# hg archive -t tbz2 -r %%{rev} pychess-%%{rev}.tar.bz2
#Source0:        pychess-%%{rev}.tar.bz2
Source0:        http://pychess.googlecode.com/files/%{name}-%{version}%{?prerel}.tar.gz
# install data files to gtksourceview2 datadir, since that's
# what Fedora ships
Patch0:         pychess-0.10rc1-gtksourceview2.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
   
BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  desktop-file-utils, gettext

# gnome-settings-daemon
Requires:       pygtk2-libglade
Requires:       gnome-python2-desktop
Requires:       gnome-python2-rsvg
Requires:       gnome-icon-theme
Requires:       gstreamer-python
# not in Fedora (yet?)
#Requires:      gmpy
# for editing .pgn files
Requires:       pygtksourceview

%description
PyChess is a GTK+ chess game for Linux. It is designed to at the same time
be easy to use, beautiful to look at, and provide advanced functions for
advanced players.


%prep
%setup -q -n %{name}-%{version}%{?prerel}
%patch0 -p1 -b .gtksourceview2

# strip shebang from files not meant to be run
cd lib/pychess
sed -i '1d' Players/PyChess.py

%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

desktop-file-install --vendor fedora --delete-original  \
        --dir $RPM_BUILD_ROOT%{_datadir}/applications   \
        --remove-category Application \
        $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop

%find_lang %{name}

%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
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 || :
 
%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README LICENSE AUTHORS TRANSLATORS
%{python_sitelib}/*
%{_bindir}/*
%{_datadir}/pychess
%{_datadir}/gtksourceview-2.0/language-specs/pgn.lang
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/pixmaps/*
%{_mandir}/man?/*

%changelog
* Wed May 18 2011 Christopher Aillon <caillon@redhat.com> - 0.10-1
- Update to 0.10

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-0.9.rc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Nov 15 2010 Michel Salim <salimma@fedoraproject.org> - 0.10-0.8.rc1
- Update to 0.10rc1
- Install PGN language spec in correct location
- Properly update icon cache

* Sun Aug 15 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.10-0.7.20100815hg
- update to new version (fixes bug #598062)

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.10-0.6.20100511hg
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Wed May 12 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.10-0.5.20100511hg
- new hg snapshot to fix #591165

* Tue May  4 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.10-0.4.20100504hg
- new hg snapshot to get it working again (#577570)

* Sun Feb 14 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.10-0.3.20100214svn
- update svnsnapshot to fix some fedora bugs
  (562895,565225,563330)

* Fri Feb  5 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.10-0.2.20100203svn
- add R: gnome-python2-rsvg (#551475)

* Wed Feb  3 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.10-0.1.20100203svn
- update to svn snapshot (the rest is currently non working)
- %%global and not %%define
- delete the patches, all upstream or solved upstream differently
- remove R python-sqlite2

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

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

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

* Tue Aug 26 2008 Michel Salim <salimma@fedoraproject.org> - 0.8.2-1
- Update to 0.8.2

* Mon Mar 17 2008 Sindre Pedersen Bjørdal <sindrepb@fedoraproject.org> - 0.8-2
- Bump release

* Tue Feb 21 2008 Sindre Pedersen Bjordal <foolish@guezz.net> - 0.8-1
- Final 0.8 release

* Mon Dec  3 2007 Michel Salim <michel.sylvan@gmail.com> - 0.8-0.1.beta2
- Update to 0.8beta2

* Sun Nov 11 2007 Michel Salim <michel.sylvan@gmail.com> - 0.8-0.1.beta1
- Update to 0.8beta1

* Thu Apr 19 2007 Sindre Pedersen Bjørdal <foolish[AT]guezz.net> - 0.6.0-1
- Update to 0.6.0 final

* Sun Jan 14 2007 Sindre Pedersen Bjørdal <foolish[AT]guezz.net> - 0.6.0-0.3.beta5
- Update description

* Sun Jan 14 2007 Sindre Pedersen Bjørdal <foolish[AT]guezz.net> - 0.6.0-0.2.beta5
- Fix permissions
- Fix quiet %%setup

* Sun Jan 14 2007 Sindre Pedersen Bjørdal <foolish[AT]guezz.net> - 0.6.0-0.1.beta5
- Initial build