File musescore.spec of Package MuseScore

# spec file for package musescore
# 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.

# norootforbuild

Name:           musescore
Summary:        A free WYSIWYG music score typesetter  
Release:        1
%define         rname mscore
%define         rversion
License:        GPLv2
Group:          Productivity/Multimedia/Sound/Editors and Convertors  
Vendor:         openSUSE-Education
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        MuseScore-%{rversion}.tar.bz2  
Source1:        mscore.desktop
BuildRequires:  alsa-devel 
BuildRequires:  cmake >= 2.6 
BuildRequires:  doxygen 
BuildRequires:  libqt4-devel 
BuildRequires:  libsndfile-devel
BuildRequires:  fluidsynth-devel
BuildRequires:  portaudio-devel
%if 0%{?suse_version} > 1020  
BuildRequires:  texlive 
BuildRequires:  texlive-context 
BuildRequires:  update-desktop-files 
BuildRequires:  jack-devel 
BuildRequires:  fdupes
%if 0%{?suse_version} <= 1020  
BuildRequires:  tetex
%if 0%{?fedora}
BuildRequires: gcc-c++

MuseScore is a graphical music typesetter. It allows for fast  
and easy note entry on a virtual note sheet. It has an  
integrated sequencer to allow for immediate play of the score.  
MuseScore can import and export MusicXml and standard Midi files.  
    Werner Schweer <>  
%setup -q -n %{rname}-%{version}

mkdir build && cd build  
##export CFLAGS="%optflags -fno-strict-aliasing"
%if 0%{?fedora}
LUPDATE=`which lupdate-qt4`
su root -c ln -s $LUPDATE /bin/lupdate
LRELEASE=`which lrelease-qt4`
su root -c ls -s $LRELEASE /bin/lrelease
make lupdate && make lrelease  
make %{?jobs:-j%jobs}  
make doxy  
#make doc  
cp %{SOURCE1} .  

%if 0%{?suse_version}
test -f %buildroot/%{_datadir}/pixmaps/mscore.png || install -D -m644 mscore/mscore/data/mscore.png %buildroot/%{_datadir}/pixmaps/mscore.png
test -f %buildroot/%{_datadir}/pixmaps/mscore.xml && rm test -f %buildroot/%{_datadir}/pixmaps/mscore.xml
test -f ./mscore/packaging/mscore.xml && rm ./mscore/packaging/mscore.xml
%suse_update_desktop_file -n mscore AudioVideo AudioVideoEditing
%fdupes -s %{buildroot}

rm -rf $RPM_BUILD_ROOT  

%dir %{_datadir}/mscore-0.9