File pathological.spec of Package pathological

#
# spec file for package pathological (Version 1.1.3)
#
# Copyright 2009 Mario García H.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

%define sforge http://downloads.sourceforge.net/project/pathological

Summary: Enriched python clone of the game "Logical"
Name: pathological
Version: 1.1.3
Release: 1
Source0: %{name}-%{version}.tar.bz2
#Source1: %{sforge}/%{name}/%{version}/%{name}-%{version}.tar.gz
Patch0: %{name}.py.diff
Vendor: %{vendor}
URL: http://pathological.sourceforge.net/
License: GPLv2
Group: Amusements/Games/Logic
Requires: python-pygame
BuildRequires: fdupes
BuildRequires: update-desktop-files
BuildRoot: %{_builddir}/%{name}-%{version}-build

%description
Pathological is an enriched clone of the game
"Logical" by Rainbow Arts. To solve a level, fill
each wheel with four marbles of matching color.

Various board elements such as teleporters,
switches, filters, etc., make the game
interesting and challenging.

New levels can be created using your favorite
text editor.


%prep
%setup -q
%patch0

%build
%{__make}


%install
%{__make} DESTDIR=$RPM_BUILD_ROOT install

# Damaged file descriptors because cpio says so...
%{__rm} -fr %{buildroot}%{_datadir}/doc
%fdupes %{buildroot}
%{__install} -d -m 0755 %{buildroot}%{_docdir}/%{name}
#%{__mv} -f %{buildroot}%{_datadir}/doc/%name \
#%{buildroot}%{_docdir}

%{__install} -d -m 0755 %{buildroot}%{_datadir}/pixmaps
%{__mv} -f %{buildroot}/usr/X11R6/include/X11/pixmaps/%{name}.xpm \
%{buildroot}%{_datadir}/pixmaps

%{__install} -m 0644 README %{buildroot}/%{_docdir}/%{name}
%{__install} -m 0644 LICENSE %{buildroot}/%{_docdir}/%{name}
%{__install} -m 0644 TODO %{buildroot}/%{_docdir}/%{name}
%{__install} -m 0644 changelog %{buildroot}/%{_docdir}/%{name}

#filename name comment exec icon [category]...
%suse_update_desktop_file -c pathological Pathological "Enriched logic game" pathological pathological GNOME GTK Game LogicGame


%clean
%__rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%attr(0755,root,games)/usr/games/%{name}
%attr(0755,root,games)/usr/lib/%{name}/bin/write-highscores

%dir %{_datadir}/games/%{name}
%dir %{_docdir}/%{name}
%dir /usr/lib/%{name}
%dir /usr/lib/%{name}/bin

%{_datadir}/games/%{name}/*
%{_datadir}/pixmaps/%{name}.xpm
%{_localstatedir}/games/%{name}_scores
%{_datadir}/applications/%{name}.desktop
#%doc %{_docdir}/pathological/*

%doc %{_mandir}/man6/%{name}.6.gz
%doc README LICENSE TODO changelog


%changelog
* Fri Jul 31 2009 Mario García H. <code933k@gmail.com> - 1.1.3
- Initial package.
openSUSE Build Service is sponsored by