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