/[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 1458677 - (show annotations) (download)
Thu Nov 7 15:00:24 2019 UTC (4 years, 5 months ago) by daviddavid
File size: 8899 byte(s)
- fix mscore data dir for "/usr/share/mscore-3.3/"

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

  ViewVC Help
Powered by ViewVC 1.1.30