File solfege.spec of Package solfege

#
# spec file for package solfege (Version 3.14.5)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           solfege
Summary:        Eartraining program
Version:        3.14.5
Release:        1
License:        GPL v2 or later
Group:          Productivity/Multimedia/Sound/Utilities
Url:            http://www.solfege.org/
BuildRequires:  docbook-xsl-stylesheets fdupes gnome-doc-utils-devel libxslt python-devel update-desktop-files
%if %suse_version > 1010
BuildRequires:  python-gtk-devel
%else
BuildRequires:  gtk2-devel python-gtk
%endif
%define _use_internal_dependency_generator 0
%define my_provides /tmp/my-provides
Source:         %{name}-%{version}.tar.bz2
Source1:        lessonfile_editor.1
Patch:          solfege-configure-fix.dif
Patch1:         solfege-compileall-fix.diff
Requires:       python-gtk 
Recommends:     timidity
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Solfege is an eartraining program for X written in python, using the
GTK+ and GNOME libraries.



Authors:
--------
    Tom Cato Amundsen <tca@gnu.org>

%prep
%setup -q
%patch
%patch1
# hack to avoid txt2man (which is missing in SUSE distro)
touch *.1
cp %{SOURCE1} .

%build
autoreconf -fi
%configure \
    --enable-docbook-stylesheet=/usr/share/xml/docbook/stylesheet/nwalsh/current/html/chunker.xsl
make %{?jobs:-j%jobs}

%install
%makeinstall
# exclude plugins from the provide-list
cat << EOF > %{my_provides}
grep -v $RPM_BUILD_ROOT%{_libdir}/solfege | %{__find_provides}
EOF
chmod 755 %{my_provides}
%define __find_provides %{my_provides}
%suse_update_desktop_file solfege Education X-SuSE-Music
install -m 644 -D graphics/solfege.png \
  $RPM_BUILD_ROOT%{_datadir}/pixmaps/solfege.png
%find_lang %{name}
%fdupes -s $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT
rm -f %{my_provides}

%files -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS COPYING FAQ README changelog
%doc %{_mandir}/man?/*
%{_bindir}/*
%{_datadir}/solfege
%{_libdir}/solfege
%{_sysconfdir}/solfege*
%{_datadir}/pixmaps/*
%{_datadir}/applications/*.desktop

%changelog
openSUSE Build Service is sponsored by