File solfege.spec of Package solfege

# spec file for package solfege
# Copyright (c) 2011 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

# norootforbuild

Name:           solfege
Summary:        Eartraining program
Version:        3.18.7
Release:        2
License:        GPLv2+
Group:          Productivity/Multimedia/Sound/Utilities
BuildRequires:  docbook-xsl-stylesheets fdupes gnome-doc-utils-devel libxslt
BuildRequires:  lilypond python-devel swig texinfo update-desktop-files
BuildRequires:  python-gtk-devel
%define _use_internal_dependency_generator 0
%define my_provides /tmp/my-provides
Source:         %{name}-%{version}.tar.bz2
Source1:        lessonfile_editor.1
Patch0:         solfege-configure-fix.dif
Patch1:         solfege-python-fixcompile.patch
Requires:       python-gtk
Recommends:     timidity
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Solfege is an eartraining program for X written in python, using
the GTK+ and GNOME libraries. To use this software you need some
basic knowledge about music theory. Using solfege you can learn
to recognise melodic and harmonic intervals, compare interval
sizes, sing the intervals the computer asks for, identify chords,
sing chords, scales, dictation and remember rhythmic patterns.

    Tom Cato Amundsen <>

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

autoreconf -fi
%configure \
make %{?jobs:-j%jobs} all

# exclude plugins from the provide-list
cat << EOF > %{my_provides}
grep -v $RPM_BUILD_ROOT%{_libdir}/%{name} | %{__find_provides}
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 \
# This line caused bnc#664826
#rm -f %%{buildroot}/%%{_datadir}/%%{name}/%%{name}/_version.*
%find_lang %{name}
%fdupes -s $RPM_BUILD_ROOT
# Fix any .py files with shebangs and wrong permissions.
if test -z `find %{buildroot} -name "*.py" -perm 0644 -print0|xargs -0r grep -l '#!'`; \
then break;
else chmod -f 0755 `find %{buildroot} -name "*.py" -perm 0644 -print0|xargs -0r grep -l '#!'`; \

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

rm -f %{my_provides}

%files -f %{name}.lang
%defattr(-, root, root)
%doc %{_mandir}/man?/*
%config %{_sysconfdir}/solfege*

openSUSE Build Service is sponsored by