%global fontfamilyname %{name}
Name: mscore
Summary: Music Composition & Notation Software
Version: 1.1
Release: 4%{?dist}
# rtf2html is LGPLv2+
# paper4.png paper5.png are LGPLv3
# the rest is GPLv2
License: GPLv2 and LGPLv2+ and LGPLv3
Group: Applications/Multimedia
URL: http://musescore.org/en
# Upstream tarball contains a non-free soundfont "Gort's Minipiano"
# We generate our own tarball by removing this soundfont via:
# wget http://download.sourceforge.net/mscore/mscore-1.1.tar.bz2
# tar jxf mscore-1.1.tar.bz2
# rm -f mscore-*/mscore/mscore/data/piano1.sf2
# tar jcf mscore-1.1-free.tar.bz2 mscore-1.1/
Source0: %{name}-%{version}-free.tar.bz2
# For building the jazz font
Source1: %{name}-ConvertFont.ff
# For mime types
Source2: %{name}.xml
# Use Fedora's default soundfont instead of the removed one:
Patch0: %{name}-use-default-soundfont.patch
# We don't build the common files (font files, wallpapers, demo song, instrument
# list) into the binary executable to reduce its size. This is also useful to
# inform the users about the existence of different choices for common files.
# The font files need to be separated due to the font packaging guidelines.
Patch1: %{name}-separate-commonfiles.patch
# Split the large documentation into a separate package
Patch2: %{name}-split-doc.patch
# qreal is float on arm. getY() expects double:
# http://www.musescore.org/en/node/3726
Patch3: %{name}-arm-buildfix.patch
# Fix some gcc warnings
Patch4: %{name}-fix-gcc-warnings.patch
# Fix DSO linking. Seems to have fixed in trunk, but misssing in the tarball
# http://musescore.org/en/node/5817
Patch5: %{name}-dso-linking.patch
# Use system qtsingleapplication
Patch6: %{name}-system-qtsingleapplication.patch
# gcc-4.6 buid fix
Patch7: %{name}-gcc46.patch
# Fix crash on Accidentals click RHBZ#738044 From upstream trunk rev 3193
Patch8: %{name}-fix-accidentals-crash.patch
BuildRequires: alsa-lib-devel
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: jack-audio-connection-kit-devel
BuildRequires: libsndfile-devel >= 1.0.19
BuildRequires: portaudio-devel
BuildRequires: qt4-devel
BuildRequires: qtsingleapplication-devel
BuildRequires: qt-webkit-devel
Requires: %{name}-fonts = %{version}-%{release}
Requires: soundfont2-default
# For scripting
Requires: qtscriptbindings
# Doxygen documentation is huge and it is for musescore development only.
# Hence we don't build it for now. Otherwise it needs:
# BuildRequires: graphviz doxygen texlive-latex texlive-dvips
Provides: musescore = %{name}-%{version}-%{release}
%description
MuseScore is a free cross platform WYSIWYG music notation program. Some
highlights:
* WYSIWYG, notes are entered on a "virtual note sheet"
* Unlimited number of staves
* Up to four voices per staff
* Easy and fast note entry with mouse, keyboard or MIDI
* Integrated sequencer and FluidSynth software synthesizer
* Import and export of MusicXML and Standard MIDI Files (SMF)
* Translated in 26 languages
%package doc
Summary: MuseScore documentation
Group: Documentation
License: CC-BY
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
MuseScore is a free cross platform WYSIWYG music notation program.
This package contains the user manual of MuseScore in different languages.
%package fonts
Summary: MuseScore fonts
Group: User Interface/X
License: GPL+ with exceptions and OFL
Requires: fontpackages-filesystem
BuildArch: noarch
BuildRequires: fontforge
BuildRequires: fontpackages-devel
BuildRequires: t1utils
BuildRequires: texlive
BuildRequires: tex-cm-lgc
# Note: this line should be updated carefully on each update:
Obsoletes: mscore-mscore-fonts < 0.9.5-2
Provides: mscore-mscore-fonts = %{version}-%{release}
%description fonts
MuseScore is a free cross platform WYSIWYG music notation program.
This package contains the musical notation fonts for use of MuseScore.
%prep
%setup -q
%patch0 -p1 -b .default.soundfont
%patch1 -p1 -b .separatecommon
%patch2 -p1 -b .splitdoc
%patch3 -p1 -b .arm
%patch4 -p1 -b .warnings
%patch5 -p1 -b .dso
%patch6 -p1 -b .qtsingleapp
%patch7 -p1 -b .gcc46
%patch8 -p1 -b .accidentals
# Remove the precompiled binary
rm mscore/rtf2html/rtf2html
# Force Fedora specific flags:
find . -name CMakeLists.txt -exec sed -i 's|-O3|%{optflags}|' {} \;
# Do not build the bundled qt scripting interface:
sed -i 's|scriptgen||' %{name}/CMakeLists.txt
# Fix EOL encoding
sed 's|\r||' %{name}/rtf2html/README > tmpfile
touch -r %{name}/rtf2html/README tmpfile
mv -f tmpfile %{name}/rtf2html/README
# Remove preshipped fonts. We will build them from source
rm -f %{name}/%{name}/fonts/*.ttf
# Disable rpath
sed -i '/rpath/d' %{name}/%{name}/CMakeLists.txt
# We don't use this 3rd party lib but remove anyways
rm -fr mscore/singleapp/
%build
# Build the actual program
mkdir build
pushd build
export PATH=${PATH}:%{_libdir}/qt4/bin
%cmake -DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_CXX_FLAGS="%{optflags}" \
-DUSE_SYSTEM_QTSINGLEAPPLICATION=1 \
../mscore
make lupdate %{?_smp_flags}
make lrelease %{?_smp_flags}
make %{?_smp_flags} VERBOSE=1
popd
# Build fonts from source:
pushd %{name}/%{name}/fonts
./genFont
fontforge %{SOURCE1} MuseJazz.sfd
popd
%install
make install DESTDIR=%{buildroot}
# Install fonts
mkdir -p %{buildroot}/%{_fontdir}
install -pm 644 %{name}/%{name}/fonts/%{fontfamilyname}*.ttf %{buildroot}/%{_fontdir}
# Mime type
mkdir -p %{buildroot}/%{_datadir}/mime/packages
install -pm 644 %{SOURCE2} %{buildroot}/%{_datadir}/mime/packages/
# Desktop file
desktop-file-install \
--dir=%{buildroot}/%{_datadir}/applications \
--add-category="X-Notation" \
--remove-category="Sequencer" \
--remove-category="AudioVideoEditing" \
--add-mime-type="audio/midi" \
--add-mime-type="text/x-lilypond" \
--add-mime-type="application/xml" \
%{buildroot}/%{_datadir}/applications/%{name}.desktop
# Move images to the freedesktop location
mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/{32x32,64x64}/apps/
mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/{32x32,64x64}/mimetypes/
cp -a %{buildroot}/%{_datadir}/pixmaps/%{name}.xpm \
%{buildroot}/%{_datadir}/icons/hicolor/32x32/mimetypes/application-x-musescore.xpm
mv %{buildroot}/%{_datadir}/pixmaps/%{name}.xpm \
%{buildroot}/%{_datadir}/icons/hicolor/32x32/apps/
cp -a %{buildroot}/%{_datadir}/pixmaps/%{name}.png \
%{buildroot}/%{_datadir}/icons/hicolor/64x64/mimetypes/application-x-musescore.png
mv %{buildroot}/%{_datadir}/pixmaps/%{name}.png \
%{buildroot}/%{_datadir}/icons/hicolor/64x64/apps/
# Manpage
mkdir -p %{buildroot}/%{_mandir}/man1
install -pm 644 %{name}/packaging/%{name}.1 %{buildroot}/%{_mandir}/man1/
# Openoffice templates
cp -a %{name}/utils/OOoMuseScore/ %{buildroot}/%{_datadir}/%{name}-%{version}
# There are many doc files spread around the tarball. Let's collect them
pushd %{name}
mv rtf2html/ChangeLog ChangeLog.rtf2html
mv rtf2html/COPYING.LESSER COPYING.LESSER.rtf2html
mv rtf2html/README README.rtf2html
mv rtf2html/README.mscore README.mscore.rtf2html
mv rtf2html/README.ru README.ru.rtf2html
mv osdabzip/README README.osdabzip
mv osdabzip/README.mscore README.mscore.osdabzip
mv share/wallpaper/COPYRIGHT COPYING.wallpaper
popd
%check
# iotest seems outdated. Skipping.
# rendertest needs the X server. Skipping.
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :
update-desktop-database &> /dev/null || :
%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
update-mime-database %{_datadir}/mime &> /dev/null || :
update-desktop-database &> /dev/null || :
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%doc mscore/{ChangeLog*,COPYING*,NEWS,README*}
%{_bindir}/%{name}
%{_datadir}/%{name}-%{version}/
%exclude %{_datadir}/%{name}-%{version}/man/
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/soundfonts/TimGM6mb.sf2
%{_mandir}/man1/*
%{_qt4_plugindir}/designer/libawlplugin.so
%files doc
%doc %{_datadir}/%{name}-%{version}/man/
%_font_pkg %{fontfamilyname}*.ttf
%changelog
* Sat Mar 03 2012 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 1.1-4
- Fix accidontals crash RHBZ#738044
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-3
- Rebuilt for c++ ABI breakage
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Thu Jul 28 2011 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 1.1-1
- Update to 1.1.
* Tue Feb 08 2011 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 1.0-1
- Update to 1.0.
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sun Sep 26 2010 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 0.9.6.3-1
- Update to 0.9.6.3
* Thu Aug 19 2010 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 0.9.6.2-1
- Update to 0.9.6.2
* Tue Jul 20 2010 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 0.9.6.1-1
- Update to 0.9.6.1
* Mon Jun 14 2010 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.6-1
- Update to 0.9.6
- Split documentation into its own package
- Move some gcc warning fixes into a patch
* Tue Dec 22 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.5-3
- Fix build flags on F-11
* Tue Dec 22 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.5-2
- Add default soundfont support for exported audio files
- Rebuild against new libsndfile for additional functionality
- Drop F-10 related bits from specfile
- Make fonts subpackage noarch
- Fix build failure on arm architecture
* Fri Aug 21 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.5-1
- Update to 0.9.5
* Wed Aug 05 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.4-6
- Update the .desktop file
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Thu Jun 11 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.4-4
- Font package cleanup for F-12 (RHBZ#493463)
- One specfile for all releases
* Mon Mar 23 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.4-3.fc10.1
- Add BR: tetex-font-cm-lgc for Fedora < 11
* Mon Mar 23 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.4-3
- Add Provides: musescore = %%{name}-%%{version}
- Replace "fluid-soundfont" requirement with "soundfont2-default"
* Fri Mar 06 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.4-2
- Add extra BR:tex-cm-lgc for F-11+. This is necessary to build the fonts from source
- Update icon scriptlets according to the new guidelines
* Sat Feb 21 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.4-1
- Initial Fedora build