mscore-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. %global fontfamilyname %{name}
  2. %define _fontdir %{_datadir}/fonts/%{name}
  3. Name: mscore
  4. Summary: Music Composition & Notation Software
  5. Version: 1.3
  6. Release: 2%{?_dist_release}
  7. # rtf2html is LGPLv2+
  8. # paper4.png paper5.png are LGPLv3
  9. # the rest is GPLv2
  10. License: GPLv2 and LGPLv2+ and LGPLv3 and CC-BY
  11. Group: Applications/Multimedia
  12. URL: http://musescore.org/en
  13. # Upstream tarball contains a non-free soundfont "Gort's Minipiano"
  14. # And one demo file which is CC-BY-NC-SA (non-free)
  15. # We generate our own tarball by removing these files via:
  16. # wget http://download.sourceforge.net/mscore/mscore-1.3.tar.bz2
  17. # tar jxf mscore-1.3.tar.bz2
  18. # rm -f mscore-*/mscore/mscore/data/piano1.sf2
  19. # rm -f mscore-*/mscore/demos/prelude.mscx
  20. # tar jcf mscore-1.3-free.tar.bz2 mscore-1.3/
  21. Source0: %{name}-%{version}-free.tar.bz2
  22. # For mime types
  23. Source2: %{name}.xml
  24. # Use Fedora's default soundfont instead of the removed one:
  25. Patch0: %{name}-use-default-soundfont.patch
  26. # We don't build the common files (font files, wallpapers, demo song, instrument
  27. # list) into the binary executable to reduce its size. This is also useful to
  28. # inform the users about the existence of different choices for common files.
  29. # The font files need to be separated due to the font packaging guidelines.
  30. Patch1: %{name}-separate-commonfiles.patch
  31. # Split the large documentation into a separate package
  32. Patch2: %{name}-split-doc.patch
  33. # Fix some gcc warnings
  34. Patch4: %{name}-fix-gcc-warnings.patch
  35. # Fix DSO linking. Seems to have fixed in trunk, but misssing in the tarball
  36. # http://musescore.org/en/node/5817
  37. Patch5: %{name}-dso-linking.patch
  38. # Use system qtsingleapplication
  39. Patch6: %{name}-system-qtsingleapplication.patch
  40. # Fix crash on Accidentals click RHBZ#738044 From upstream trunk rev 3193
  41. Patch8: %{name}-fix-accidentals-crash.patch
  42. # Remove prelude from cmake files
  43. Patch9: mscore-1.3-no-prelude.patch
  44. ## VINE: fix build with freetype-2.5.1 and up
  45. Patch100: mscore-1.3-fix-build-with-freetype251.patch
  46. ## VINE: use alsa on default
  47. Patch101: mscore-1.3-vine-alsa.patch
  48. BuildRequires: freetype2-devel
  49. BuildRequires: alsa-lib-devel
  50. BuildRequires: cmake
  51. BuildRequires: desktop-file-utils
  52. BuildRequires: jack-audio-connection-kit-devel
  53. BuildRequires: libsndfile-devel
  54. BuildRequires: portaudio-devel
  55. BuildRequires: qt4-devel
  56. BuildRequires: qtsingleapplication-devel
  57. BuildRequires: qt4-devel
  58. BuildRequires: perl(Pod::Usage)
  59. Requires: %{name}-fonts = %{version}-%{release}
  60. Requires: soundfont2-default
  61. # For scripting
  62. Requires: qtscriptbindings
  63. # Doxygen documentation is huge and it is for musescore development only.
  64. # Hence we don't build it for now. Otherwise it needs:
  65. # BuildRequires: graphviz doxygen texlive-latex texlive-dvips
  66. Provides: musescore = %{name}-%{version}-%{release}
  67. %description
  68. MuseScore is a free cross platform WYSIWYG music notation program. Some
  69. highlights:
  70. * WYSIWYG, notes are entered on a "virtual note sheet"
  71. * Unlimited number of staves
  72. * Up to four voices per staff
  73. * Easy and fast note entry with mouse, keyboard or MIDI
  74. * Integrated sequencer and FluidSynth software synthesizer
  75. * Import and export of MusicXML and Standard MIDI Files (SMF)
  76. * Translated in 26 languages
  77. %package doc
  78. Summary: MuseScore documentation
  79. Group: Documentation
  80. License: CC-BY
  81. Requires: %{name} = %{version}-%{release}
  82. BuildArch: noarch
  83. %description doc
  84. MuseScore is a free cross platform WYSIWYG music notation program.
  85. This package contains the user manual of MuseScore in different languages.
  86. %package fonts
  87. Summary: MuseScore fonts
  88. Group: User Interface/X
  89. License: GPL+ with exceptions and OFL
  90. BuildArch: noarch
  91. BuildRequires: fontforge
  92. BuildRequires: t1utils
  93. BuildRequires: texlive
  94. BuildRequires: texlive-common
  95. BuildRequires: texlive-collection-fontutils
  96. BuildRequires: texlive-collection-fontsextra
  97. BuildRequires: texlive-collection-metapost
  98. %description fonts
  99. MuseScore is a free cross platform WYSIWYG music notation program.
  100. This package contains the musical notation fonts for use of MuseScore.
  101. %prep
  102. %setup -q
  103. %patch0 -p1 -b .default.soundfont
  104. %patch1 -p1 -b .separatecommon
  105. %patch2 -p1 -b .splitdoc
  106. %patch4 -p1 -b .warnings
  107. %patch5 -p1 -b .dso
  108. %patch6 -p1 -b .qtsingleapp
  109. %patch8 -p1 -b .accidentals
  110. %patch9 -p1 -b .noprelude
  111. ## VINE
  112. %if %{?_dist_release} >= "vl7"
  113. %patch100 -p1 -b .fixbuild
  114. %endif
  115. %patch101 -p1 -b .vine-alsa
  116. # Remove the precompiled binary
  117. rm mscore/rtf2html/rtf2html
  118. # Force Fedora specific flags:
  119. find . -name CMakeLists.txt -exec sed -i -e 's|-m32|%{optflags}|' -e 's|-O3|%{optflags}|' {} \;
  120. # Do not build the bundled qt scripting interface:
  121. sed -i 's|BUILD_SCRIPTGEN TRUE|BUILD_SCRIPTGEN FALSE|' %{name}/CMakeLists.txt
  122. # Fix EOL encoding
  123. sed 's|\r||' %{name}/rtf2html/README > tmpfile
  124. touch -r %{name}/rtf2html/README tmpfile
  125. mv -f tmpfile %{name}/rtf2html/README
  126. # Remove preshipped fonts. We will build them from source
  127. rm -f %{name}/%{name}/fonts/*.ttf
  128. # Change font name according to our conventions
  129. sed -i 's|MuseJazz.ttf|%{fontfamilyname}-MuseJazz.ttf|' %{name}/%{name}/fonts/gen-jazz.pe
  130. # Disable rpath
  131. sed -i '/rpath/d' %{name}/%{name}/CMakeLists.txt
  132. # We don't use this 3rd party lib but remove anyways
  133. rm -fr mscore/singleapp/ mscore/scriptgen/
  134. %build
  135. # Build the actual program
  136. mkdir build
  137. pushd build
  138. export PATH=${PATH}:%{_libdir}/qt4/bin
  139. export CMAKE_INCLUDE_PATH=%{_qt4_headerdir}
  140. export CMAKE_LIBRARY_PATH=%{_qt4_libdir}
  141. %cmake -DCMAKE_BUILD_TYPE=RELEASE \
  142. -DCMAKE_CXX_FLAGS="%{optflags}" \
  143. -DUSE_SYSTEM_QTSINGLEAPPLICATION=1 \
  144. ../mscore
  145. make lupdate %{?_smp_flags}
  146. make lrelease %{?_smp_flags}
  147. make %{?_smp_flags} VERBOSE=1
  148. popd
  149. # Build fonts from source:
  150. pushd %{name}/%{name}/fonts
  151. ./genFont
  152. fontforge gen-jazz.pe
  153. popd
  154. %install
  155. %{__rm} -rf %{buildroot}
  156. make install DESTDIR=%{buildroot}
  157. # Install fonts
  158. mkdir -p %{buildroot}/%{_fontdir}
  159. install -pm 644 %{name}/%{name}/fonts/%{fontfamilyname}*.ttf %{buildroot}/%{_fontdir}
  160. # Mime type
  161. mkdir -p %{buildroot}/%{_datadir}/mime/packages
  162. install -pm 644 %{SOURCE2} %{buildroot}/%{_datadir}/mime/packages/
  163. # Desktop file
  164. desktop-file-install \
  165. --dir=%{buildroot}/%{_datadir}/applications \
  166. --add-category="X-Notation" \
  167. --remove-category="Sequencer" \
  168. --remove-category="AudioVideoEditing" \
  169. --add-mime-type="audio/midi" \
  170. --add-mime-type="text/x-lilypond" \
  171. --add-mime-type="application/xml" \
  172. %{buildroot}/%{_datadir}/applications/%{name}.desktop
  173. # Move images to the freedesktop location
  174. mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/{32x32,64x64}/apps/
  175. mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/{32x32,64x64}/mimetypes/
  176. cp -a %{buildroot}/%{_datadir}/pixmaps/%{name}.xpm \
  177. %{buildroot}/%{_datadir}/icons/hicolor/32x32/mimetypes/application-x-musescore.xpm
  178. mv %{buildroot}/%{_datadir}/pixmaps/%{name}.xpm \
  179. %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps/
  180. cp -a %{buildroot}/%{_datadir}/pixmaps/%{name}.png \
  181. %{buildroot}/%{_datadir}/icons/hicolor/64x64/mimetypes/application-x-musescore.png
  182. mv %{buildroot}/%{_datadir}/pixmaps/%{name}.png \
  183. %{buildroot}/%{_datadir}/icons/hicolor/64x64/apps/
  184. # Manpage
  185. mkdir -p %{buildroot}/%{_mandir}/man1
  186. install -pm 644 %{name}/packaging/%{name}.1 %{buildroot}/%{_mandir}/man1/
  187. # Openoffice templates
  188. cp -a %{name}/utils/OOoMuseScore/ %{buildroot}/%{_datadir}/%{name}-%{version}
  189. # There are many doc files spread around the tarball. Let's collect them
  190. pushd %{name}
  191. mv rtf2html/ChangeLog ChangeLog.rtf2html
  192. mv rtf2html/COPYING.LESSER COPYING.LESSER.rtf2html
  193. mv rtf2html/README README.rtf2html
  194. mv rtf2html/README.mscore README.mscore.rtf2html
  195. mv rtf2html/README.ru README.ru.rtf2html
  196. mv osdabzip/README README.osdabzip
  197. mv osdabzip/README.mscore README.mscore.osdabzip
  198. mv share/wallpaper/COPYRIGHT COPYING.wallpaper
  199. popd
  200. %check
  201. # iotest seems outdated. Skipping.
  202. # rendertest needs the X server. Skipping.
  203. %clean
  204. %{__rm} -rf %{buildroot}
  205. %post
  206. touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
  207. update-mime-database %{_datadir}/mime &> /dev/null || :
  208. update-desktop-database &> /dev/null || :
  209. %postun
  210. if [ $1 -eq 0 ] ; then
  211. touch --no-create %{_datadir}/icons/hicolor &>/dev/null
  212. gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
  213. fi
  214. update-mime-database %{_datadir}/mime &> /dev/null || :
  215. update-desktop-database &> /dev/null || :
  216. %posttrans
  217. gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
  218. %files
  219. %defattr(-,root,root,-)
  220. %doc mscore/{ChangeLog*,COPYING*,NEWS,README*}
  221. %{_bindir}/%{name}
  222. %{_datadir}/%{name}-%{version}/
  223. %exclude %{_datadir}/%{name}-%{version}/man/
  224. %{_datadir}/icons/hicolor/*/*/*
  225. %{_datadir}/applications/%{name}.desktop
  226. %{_datadir}/mime/packages/%{name}.xml
  227. %{_datadir}/soundfonts/TimGM6mb.sf2
  228. %{_mandir}/man1/*
  229. %{_qt4_plugindir}/designer/libawlplugin.so
  230. %files doc
  231. %defattr(-,root,root,-)
  232. %doc %{_datadir}/%{name}-%{version}/man/
  233. %files fonts
  234. %defattr(-,root,root,-)
  235. %{_datadir}/fonts/%{name}/%{fontfamilyname}*.ttf
  236. %changelog
  237. * Thu Jan 9 2014 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.3-2
  238. - initial build for Vine Linux
  239. - add Patch100 to fix build failure with freetype2 > 2.5
  240. * Fri Apr 12 2013 Tom Callaway <spot@fedoraproject.org> - 1.3-2
  241. - perl(Pod::Usage) needed for font generation
  242. * Fri Apr 12 2013 Tom Callaway <spot@fedoraproject.org> - 1.3-1
  243. - update to 1.3
  244. - remove mscore/demos/prelude.mscx from source tarball (it is non-free, see bz951379)
  245. * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-3
  246. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  247. * Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-2
  248. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  249. * Tue Mar 13 2012 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 1.2-1
  250. - Update to 1.2.
  251. * Sat Mar 03 2012 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 1.1-4
  252. - Fix accidontals crash RHBZ#738044
  253. * Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-3
  254. - Rebuilt for c++ ABI breakage
  255. * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-2
  256. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  257. * Thu Jul 28 2011 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 1.1-1
  258. - Update to 1.1.
  259. * Tue Feb 08 2011 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 1.0-1
  260. - Update to 1.0.
  261. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6.3-2
  262. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  263. * Sun Sep 26 2010 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 0.9.6.3-1
  264. - Update to 0.9.6.3
  265. * Thu Aug 19 2010 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 0.9.6.2-1
  266. - Update to 0.9.6.2
  267. * Tue Jul 20 2010 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 0.9.6.1-1
  268. - Update to 0.9.6.1
  269. * Mon Jun 14 2010 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.6-1
  270. - Update to 0.9.6
  271. - Split documentation into its own package
  272. - Move some gcc warning fixes into a patch
  273. * Tue Dec 22 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.5-3
  274. - Fix build flags on F-11
  275. * Tue Dec 22 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.5-2
  276. - Add default soundfont support for exported audio files
  277. - Rebuild against new libsndfile for additional functionality
  278. - Drop F-10 related bits from specfile
  279. - Make fonts subpackage noarch
  280. - Fix build failure on arm architecture
  281. * Fri Aug 21 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.5-1
  282. - Update to 0.9.5
  283. * Wed Aug 05 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.4-6
  284. - Update the .desktop file
  285. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-5
  286. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  287. * Thu Jun 11 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.4-4
  288. - Font package cleanup for F-12 (RHBZ#493463)
  289. - One specfile for all releases
  290. * Mon Mar 23 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.4-3.fc10.1
  291. - Add BR: tetex-font-cm-lgc for Fedora < 11
  292. * Mon Mar 23 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.4-3
  293. - Add Provides: musescore = %%{name}-%%{version}
  294. - Replace "fluid-soundfont" requirement with "soundfont2-default"
  295. * Fri Mar 06 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.4-2
  296. - Add extra BR:tex-cm-lgc for F-11+. This is necessary to build the fonts from source
  297. - Update icon scriptlets according to the new guidelines
  298. * Sat Feb 21 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 0.9.4-1
  299. - Initial Fedora build