/[packages]/backports/7/mscore/current/SPECS/mscore.spec
ViewVC logotype

Contents of /backports/7/mscore/current/SPECS/mscore.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1468750 - (show annotations) (download)
Wed Dec 18 15:28:59 2019 UTC (4 years, 3 months ago) by daviddavid
File size: 8960 byte(s)
- new version: 3.3.4

1 %define shortver %(echo %{version}|cut -d. -f1,2)
2
3 %global fontdir %{_datadir}/fonts/mscore
4
5 Summary: Linux MusE Score Typesetter
6 Name: mscore
7 Version: 3.3.4
8 Release: %mkrel 1
9 # (Fedora) rtf2html is LGPLv2+
10 # paper4.png paper5.png are LGPLv3
11 # the rest is GPLv2
12 # Soundfont is MIT
13 # Bravura and gootville are OFL
14 License: GPLv2 and LGPLv2+ and LGPLv3 and CC-BY and MIT and OFL
15 Url: http://musescore.org
16 Group: Publishing
17 Source0: https://github.com/musescore/MuseScore/archive/v%{shortver}/MuseScore-%{version}.tar.gz
18
19 # For mime types
20 Source1: %{name}.xml
21 # Add metainfo file for font to show in gnome-software
22 Source2: %{name}.metainfo.xml
23
24 # Use Fedora's default soundfont instead of the removed one:
25 Patch0: mscore-3.2.3-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: mscore-3.3.0-separate-commonfiles.patch
31 # Fix desktop file. The Version= field is for the Desktop File Specification version
32 # not the version of MuseScore
33 Patch3: mscore-2.3.2-fix-desktop-file.patch
34 # Use CXXFLAGS for precompiled header
35 Patch4: musescore-2.0.1-fix-flags-for-precompiled-header.patch
36 # link with system lame
37 Patch5: mscore-3.0.2-lame-link.patch
38 # revision number (in mscore/revision.h) is incorrect in the assets automatically
39 # generated by GitHub
40 Patch6: mscore-3.3.4-fix-revision-number.patch
41
42 BuildRequires: cmake
43 BuildRequires: doxygen
44 BuildRequires: qttools5-assistant
45 BuildRequires: pkgconfig(freetype2)
46 BuildRequires: perl(Pod::Usage)
47 BuildRequires: pkgconfig(alsa)
48 BuildRequires: pkgconfig(fluidsynth)
49 BuildRequires: pkgconfig(jack)
50 BuildRequires: pkgconfig(libpulse)
51 BuildRequires: pkgconfig(portaudio-2.0)
52 BuildRequires: pkgconfig(Qt5Concurrent)
53 BuildRequires: pkgconfig(Qt5Help)
54 BuildRequires: pkgconfig(Qt5OpenGL)
55 BuildRequires: pkgconfig(Qt5QuickControls2)
56 BuildRequires: pkgconfig(Qt5QuickWidgets)
57 BuildRequires: pkgconfig(Qt5ScriptTools)
58 BuildRequires: pkgconfig(Qt5Svg)
59 BuildRequires: pkgconfig(Qt5Test)
60 BuildRequires: pkgconfig(Qt5UiTools)
61 BuildRequires: pkgconfig(Qt5WebEngine)
62 BuildRequires: pkgconfig(Qt5WebEngineWidgets)
63 BuildRequires: pkgconfig(Qt5XmlPatterns)
64 BuildRequires: pkgconfig(vorbis)
65 BuildRequires: lame-devel
66 BuildRequires: portmidi-devel
67 BuildRequires: porttime-devel
68 BuildRequires: qtsingleapplication-qt5-devel
69
70 Requires: qtquickcontrols2
71 Requires: qtquickcontrols5
72 Requires: qtwebengine5
73 Requires: %{name}-fonts = %{version}-%{release}
74 Requires: soundfont2-default
75 Provides: musescore = %{version}-%{release}
76 Obsoletes: musescore < 1.2-1
77
78 # Doxygen documentation is huge and it is for musescore development only.
79 # Hence we don't build it for now. Otherwise it needs:
80 # BuildRequires: graphviz doxygen texlive-latex texlive-dvips
81
82 %description
83 MuseScore stands for Linux MusE Score Typesetter.
84
85 Features:
86 - WYSIWYG design, notes are entered on a "virtual notepaper"
87 - TrueType font(s) for printing & display allows for high quality
88 scaling to all sizes
89 - easy & fast note entry
90 - many editing functions
91 - MusicXML import/export
92 - Midi (SMF) import/export
93 - MuseData import
94 - Midi input for note entry
95 - integrated sequencer and software synthesizer to
96 play the score
97 - print or create pdf files
98
99 %package doc
100 Summary: MuseScore documentation
101 Group: Development/Other
102 License: CC-BY
103 Requires: %{name} >= %{version}-%{release}
104 BuildArch: noarch
105 Obsoletes: musescore-doc
106
107 %description doc
108 MuseScore is a free cross platform WYSIWYG music notation program.
109
110 This package contains the user manual of MuseScore in different languages.
111
112 %package fonts
113 Summary: MuseScore fonts
114 Group: Publishing
115 License: GPL+ with exceptions and OFL
116 BuildArch: noarch
117 BuildRequires: fontforge
118 BuildRequires: texlive
119 BuildRequires: texlive-texmf
120 BuildRequires: t1utils
121
122
123 %description fonts
124 MuseScore is a free cross platform WYSIWYG music notation program.
125
126 This package contains the musical notation fonts for use of MuseScore.
127
128 %prep
129 %setup -q -n MuseScore-%{shortver}
130 %autopatch -p1
131
132 # Remove the precompiled binary
133 rm thirdparty/rtf2html/rtf2html
134
135 # Remove bundled stuff
136 sed -i -e 's|#include "singleapp/src/QtSingleApplication"|#include <QtSingleApplication>|' mscore/musescore.h
137 rm -vrf thirdparty/singleapp
138 rm -vrf thirdparty/freetype
139
140 rm demos/All_Dudes.mscz demos/Triumph.mscz
141
142 %build
143 # Build the actual program
144 %cmake \
145 -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-DNDEBUG -DQT_NO_DEBUG" \
146 -DUSE_PATH_WITH_EXPLICIT_QT_VERSION=5 \
147 -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON \
148 -DQTSINGLEAPPLICATION_INCLUDE_DIRS=%{_qt5_includedir}/QtSolutions \
149 -DUSE_SYSTEM_FREETYPE=ON \
150 -DDOWNLOAD_SOUNDFONT=OFF \
151 -DBUILD_WEBENGINE=ON \
152 -DBUILD_LAME=ON \
153 -DBUILD_CRASH_REPORTER=OFF
154
155 %make_build PREFIX=%{_prefix} lrelease
156 %make_build PREFIX=%{_prefix} manpages
157 %make_build PREFIX=%{_prefix} VERBOSE=1
158
159 %install
160 echo %{shortver}
161 %make_install PREFIX=%{_prefix} -C build
162
163 # Install fonts
164 mkdir -p %{buildroot}%{fontdir}
165 mkdir -p %{buildroot}%{fontdir}/bravura
166 mkdir -p %{buildroot}%{fontdir}/campania
167 mkdir -p %{buildroot}%{fontdir}/gootville
168 mkdir -p %{buildroot}%{fontdir}/musejazz
169 install -pm 644 fonts/*.ttf %{buildroot}%{fontdir}
170 install -pm 644 fonts/bravura/*.otf %{buildroot}%{fontdir}
171 install -pm 644 fonts/bravura/*.json %{buildroot}%{fontdir}/bravura
172 install -pm 644 fonts/campania/*.otf %{buildroot}%{fontdir}
173 install -pm 644 fonts/gootville/*.otf %{buildroot}%{fontdir}
174 install -pm 644 fonts/gootville/*.json %{buildroot}%{fontdir}/gootville/
175 install -pm 644 fonts/mscore/*.ttf %{buildroot}%{fontdir}
176 install -pm 644 fonts/mscore/*.json %{buildroot}%{fontdir}
177 install -pm 644 fonts/musejazz/*.otf %{buildroot}%{fontdir}
178 install -pm 644 fonts/musejazz/*.json %{buildroot}%{fontdir}/musejazz/
179 install -pm 644 fonts/*.xml %{buildroot}%{fontdir}
180
181 # mscz and mscx
182 mkdir -p %{buildroot}%{_datadir}/%{name}-%{shortver}/demos/
183 install -p share/templates/*.mscz %{buildroot}%{_datadir}/%{name}-%{shortver}/demos/
184 install -p share/templates/*.mscx %{buildroot}%{_datadir}/%{name}-%{shortver}/demos/
185
186 pushd %{buildroot}%{fontdir}
187 cd bravura
188 ln -s ../Bravura.otf .
189 ln -s ../BravuraText.otf .
190 cd ../campania
191 ln -s ../Campania.otf .
192 cd ../gootville
193 ln -s ../Gootville.otf .
194 ln -s ../GootvilleText.otf .
195 cd ../musejazz
196 ln -s ../MuseJazz.otf .
197 ln -s ../MuseJazzText.otf .
198 cd ..
199 popd
200
201 # Mime type
202 mkdir -p %{buildroot}%{_datadir}/mime/packages
203 install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/mime/packages/
204
205 # Desktop file
206 desktop-file-install \
207 --dir=%{buildroot}%{_datadir}/applications \
208 --add-category="X-Notation" \
209 --remove-category="Sequencer" \
210 --remove-category="AudioVideoEditing" \
211 --add-mime-type="audio/midi" \
212 --add-mime-type="text/x-lilypond" \
213 --add-mime-type="application/xml" \
214 %{buildroot}%{_datadir}/applications/%{name}.desktop
215
216 # Move images to the freedesktop location
217 mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/mimetypes/
218 cp -a mscore/data/mscore.png \
219 %{buildroot}%{_datadir}/icons/hicolor/64x64/mimetypes/application-x-musescore.png
220
221 # There are many doc files spread around the tarball. Let's collect them
222 mkdir -p docs
223 rm -rf docs/*
224 cp -a thirdparty/rtf2html/ChangeLog docs/ChangeLog.rtf2html
225 cp -a thirdparty/rtf2html/COPYING.LESSER docs/COPYING.LESSER.rtf2html
226 cp -a thirdparty/rtf2html/README docs/README.rtf2html
227 cp -a thirdparty/rtf2html/README.mscore docs/README.mscore.rtf2html
228 cp -a thirdparty/rtf2html/README.ru docs/README.ru.rtf2html
229 cp -a share/wallpaper/COPYRIGHT docs/COPYING.wallpaper
230 cp -a fonts/bravura/OFL.txt docs/COPYING.OFL
231 cp -a share/sound/FluidR3Mono_License.md docs/COPYING.FluidR3Mono
232
233 # Add AppStream metadata for fonts
234 install -Dm 0644 -p %{SOURCE2} \
235 %{buildroot}%{_datadir}/appdata/%{name}.metainfo.xml
236
237 # Install soundfont
238 install -Dm 0644 -p share/sound/FluidR3Mono_GM.sf3 \
239 %{buildroot}%{_datadir}/soundfonts/FluidR3Mono_GM.sf3
240
241 %files
242 %doc README* docs/ChangeLog* docs/README*
243 %license docs/COPYING*
244 %{_bindir}/%{name}
245 %{_bindir}/musescore
246 %{_datadir}/%{name}-%{shortver}/
247 %exclude %{_datadir}/%{name}-%{shortver}/manual/
248 %{_datadir}/icons/hicolor/*/*/*
249 %{_datadir}/applications/%{name}.desktop
250 %{_datadir}/mime/packages/%{name}.xml
251 %{_datadir}/mime/packages/musescore.xml
252 %{_mandir}/man1/*.1*
253 %{_datadir}/soundfonts/FluidR3Mono_GM.sf3
254 %{_metainfodir}/org.musescore.MuseScore.appdata.xml
255
256 %files doc
257 %doc %{_datadir}/%{name}-%{shortver}/manual/
258
259 %files fonts
260 %{_datadir}/fonts/mscore/
261 %{_datadir}/appdata/%{name}.metainfo.xml

  ViewVC Help
Powered by ViewVC 1.1.30