a7ae80
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
2b4f2a
2b4f2a
Name:           nfoview
5c760d
Version:        1.8
4827e8
Release:        1%{?dist}
2b4f2a
Summary:        Viewer for NFO files
2b4f2a
2b4f2a
Group:          Applications/File
2b4f2a
License:        GPLv3+
2b4f2a
URL:            http://home.gna.org/nfoview/
f46d51
Source0:        http://download.gna.org/nfoview/%{version}/%{name}-%{version}.tar.bz2
2b4f2a
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2b4f2a
BuildArch:      noarch
2b4f2a
a7ae80
BuildRequires:  python-devel
a7ae80
BuildRequires:  python-setuptools
2b4f2a
2b4f2a
BuildRequires:  desktop-file-utils
2b4f2a
BuildRequires:  intltool
2b4f2a
2b4f2a
Requires:       pygtk2
5c760d
Requires:       hicolor-icon-theme
2b4f2a
4827e8
%if 0%{?fedora} >= 11
2b4f2a
Requires:       terminus-fonts
2b4f2a
%else
2b4f2a
Requires:       terminus-font-x11
2b4f2a
%endif
2b4f2a
2b4f2a
2b4f2a
%description
2b4f2a
NFO Viewer is a simple viewer for NFO files, which are "ASCII" art in
2b4f2a
the CP437 codepage. The advantages of using NFO Viewer instead of a
2b4f2a
text editor are preset font and encoding settings, automatic window
2b4f2a
size and clickable hyperlinks.
2b4f2a
2b4f2a
2b4f2a
%prep
2b4f2a
%setup -q
2b4f2a
2b4f2a
2b4f2a
%build
5c760d
%{__python} setup.py build
2b4f2a
2b4f2a
2b4f2a
%install
2b4f2a
rm -rf %{buildroot}
5c760d
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
2b4f2a
%find_lang %{name}
2b4f2a
desktop-file-install                                        \
2b4f2a
    --add-category="TextTools;"                             \
2b4f2a
    --remove-category="Viewer;"                             \
2b4f2a
    --delete-original                                       \
2b4f2a
    --dir=%{buildroot}%{_datadir}/applications              \
2b4f2a
    %{buildroot}%{_datadir}/applications/%{name}.desktop
2b4f2a
2b4f2a
2b4f2a
%clean
2b4f2a
rm -rf %{buildroot}
2b4f2a
2b4f2a
%post
2b4f2a
update-desktop-database &> /dev/null || :
5c760d
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
5c760d
2b4f2a
2b4f2a
%postun
2b4f2a
update-desktop-database &> /dev/null || :
5c760d
if [ $1 -eq 0 ] ; then
5c760d
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
5c760d
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
5c760d
fi
5c760d
5c760d
5c760d
%posttrans
5c760d
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
2b4f2a
2b4f2a
2b4f2a
%files -f %{name}.lang
2b4f2a
%defattr(-,root,root,-)
a33f82
%doc AUTHORS ChangeLog COPYING NEWS README TODO 
2b4f2a
%{_mandir}/man*/%{name}.*
2b4f2a
%{_bindir}/%{name}
2b4f2a
%{_datadir}/%{name}/
2b4f2a
%{python_sitelib}/%{name}/
2b4f2a
%{python_sitelib}/%{name}*.egg-info
2b4f2a
%{_datadir}/applications/%{name}.desktop
5c760d
%{_datadir}/icons/hicolor/*x*/apps/%{name}.png
5c760d
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
2b4f2a
2b4f2a
2b4f2a
%changelog
5c760d
* Sun Oct 18 2009 Fabian Affolter <fabian@bernewireless.net> - 1.8-1
5c760d
- The icons need now hicolor-icon-theme
5c760d
- Updated to new upstream version 1.8
5c760d
a7ae80
* Tue Sep 29 2009 Fabian Affolter <fabian@bernewireless.net> - 1.7-1
a7ae80
- Updated to new upstream version 1.7
a7ae80
4f6893
* Thu Sep 17 2009 Fabian Affolter <fabian@bernewireless.net> - 1.6-1
f46d51
- Use bzipped upstream tarball
4f6893
- Updated to new upstream version 1.6
4f6893
4827e8
* Mon May 11 2009 Christoph Wickert <cwickert@fedoraproject.org> - 1.5-1
4827e8
- Update to 1.5
4827e8
- Fix conditional comparison that caused broken deps in Fedora 9
4827e8
2b4f2a
* Sat May 02 2009 Fabian Affolter <fabian@bernewireless.net> - 1.4-3
2b4f2a
- Small changes around the desktop file
2b4f2a
2b4f2a
* Sat Apr 25 2009 Fabian Affolter <fabian@bernewireless.net> - 1.4-2
2b4f2a
- Removed PKG-INFO from doc
2b4f2a
- Fixed requiements
2b4f2a
- Added update-desktop-database
2b4f2a
- Fixed category for the .desktop file
2b4f2a
- Added patch for German translation
2b4f2a
2b4f2a
* Sun Apr 19 2009 Fabian Affolter <fabian@bernewireless.net> - 1.4-1
2b4f2a
- Initial package for Fedora