first cut at also shipping the SF2 soundfont
authormirabilos <t.glaser@tarent.de>
Sat, 5 Jan 2019 08:22:50 +0000 (09:22 +0100)
committermirabilos <mirabilos@evolvis.org>
Sat, 5 Jan 2019 08:22:50 +0000 (09:22 +0100)
use the unobtrusive way, even if we could, with .deb file format
trickery, shrink it by over 80 MB; the backports ftpmaster has no
issue with this (I asked) if it ends up in the main archive

debian/changelog
debian/control
debian/copyright
debian/musescore-general-soundfont-lossless.docs [new file with mode: 0644]
debian/musescore-general-soundfont-lossless.install [new file with mode: 0644]
debian/musescore-general-soundfont-lossless.lintian-overrides [new file with mode: 0644]
debian/musescore-general-soundfont-lossless.postinst [new file with mode: 0644]
debian/musescore-general-soundfont-lossless.prerm [new file with mode: 0644]
debian/musescore-general-soundfont.install
debian/rules

index e067518..db19213 100644 (file)
@@ -1,3 +1,11 @@
+musescore-general-soundfont (0.1.3-2) unstable; urgency=medium
+
+  * Add musescore-general-soundfont-lossless package, in the least
+    obtrusive way; adjust rules and package description accordingly
+  * Bump Policy 4.3.0.1 (no changes)
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Sat, 05 Jan 2019 09:17:44 +0100
+
 musescore-general-soundfont (0.1.3-1) unstable; urgency=medium
 
   * Migrate to use update-alternatives for handling MuseScore_General.sf3
index 173c3cf..0e1db17 100644 (file)
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Thorsten Glaser <tg@mirbsd.de>
 Homepage: https://musescore.org/en/node/269869
 Build-Depends: debhelper (>= 11~), python3-minimal, sf3convert
-Standards-Version: 4.2.1
+Standards-Version: 4.3.0
 Rules-Requires-Root: no
 VCS-git: https://evolvis.org/anonscm/git/alioth/soundfonts.git -b musescore-general-soundfont
 VCS-Browser: https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=alioth/soundfonts.git;a=shortlog;h=refs/heads/musescore-general-soundfont
@@ -35,7 +35,10 @@ Description: General SoundFont from MuseScore (full version)
  a drop-in replacement (identical bank configuration) at comparable
  quality to the full soundfont, missing only the separate ensembles
  (using identical samples for e.g. first/second violin) and some of
- the new larger instrument samples.
+ the new larger instrument samples. An SF2 (uncompressed) version
+ ships in the musescore-general-soundfont-lossless package, for use
+ by audiophiles, with synthesisers lacking SF3 support, or to avoid
+ the long startup times of MuseScore.
  .
  It can be used with most modern MIDI synthesisers which support
  the SF3 format, although early implementations (such as the one
@@ -48,3 +51,42 @@ Description: General SoundFont from MuseScore (full version)
  .
  This package will be installed into /usr/share/sounds/sf3/ which
  is the standard Debian location for system-wide SF3 soundfonts.
+
+Package: musescore-general-soundfont-lossless
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Conflicts: musescore-common (<< 2.3.2+dfsg1-1~bpo9),
+ fluidr3mono-gm-soundfont (<< 2.315-5~),
+ musescore-general-soundfont (<< 0.1.3-1~)
+Provides: musescore-compatible-soundfont
+Enhances: libfluidsynth1, musescore, timidity
+Description: General SoundFont from MuseScore (uncompressed)
+ This is the new standard soundfont as shipped with MuseScore 2.2
+ and newer, in uncompressed SF2 format. It is significantly larger
+ than the SF3 in the musescore-general-soundfont Debian package
+ but identical, other than not compressing the samples with a
+ lossy algorithm. This avoids audible Vorbis compression artefacts
+ and the excessively long MuseScore startup time with compressed
+ soundfonts.
+ .
+ MuseScore_General provides the complete GM (General MIDI) sound
+ set and some extras, with a focus on improving quality. The SF3
+ versions attempt to keep the installed-size footprint low, at the
+ cost mentioned above.
+ .
+ There is also a musescore-general-soundfont-small package in SF3
+ format which also avoids the long startup times by using less and
+ smaller samples; it has a very small installed size, while being
+ a drop-in replacement.
+ .
+ The SF2 soundfont can be used with almost all MIDI synthesisers,
+ although bugs in early implementations (e.g. MuseScore before 2.2)
+ may cause sound degradation.
+ .
+ As it comes under the MIT licence, it can be used in most settings,
+ but do remember that waveforms generated using this soundfont are
+ “copies or substantial portions of the” soundfont.
+ .
+ This package will be installed into /usr/share/sounds/sf2/ which
+ is the standard Debian location for system-wide SF2 soundfonts.
index f615548..e33c6b9 100644 (file)
@@ -13,7 +13,7 @@ MuseScore_General SoundFont
 Original Stereo version (Fluid (R3) SoundFont)
 Copyright © 2000-2002, 2008 Frank Wen <getfrank@gmail.com>
 Inclusion into Debian derivatives © 2008 Toby Smithe
-Debian packaging © 2018 Thorsten Glaser <tg@mirbsd.de>
+Debian packaging © 2018–2019 Thorsten Glaser <tg@mirbsd.de>
 
 Temple Blocks instrument Copyright © 2002 Ethan Winer
 Drumline Cymbals (MIT) Copyright © 2016 Michael Schorsch
diff --git a/debian/musescore-general-soundfont-lossless.docs b/debian/musescore-general-soundfont-lossless.docs
new file mode 100644 (file)
index 0000000..70c36ad
--- /dev/null
@@ -0,0 +1,2 @@
+MuseScore_General-readme.md
+MuseScore_General-sample_sources.csv
diff --git a/debian/musescore-general-soundfont-lossless.install b/debian/musescore-general-soundfont-lossless.install
new file mode 100644 (file)
index 0000000..16edb40
--- /dev/null
@@ -0,0 +1 @@
+builddir/MuseScore_General_Full.sf2 /usr/share/sounds/sf2/
diff --git a/debian/musescore-general-soundfont-lossless.lintian-overrides b/debian/musescore-general-soundfont-lossless.lintian-overrides
new file mode 100644 (file)
index 0000000..1a0b7a2
--- /dev/null
@@ -0,0 +1,6 @@
+# ships a file we transition to update-alternatives
+musescore-general-soundfont-lossless: conflicts-with-version musescore-common (<< 2.3.2+dfsg1-1~bpo9)
+
+# removing would, otherwise,  break the alternatives link group
+musescore-general-soundfont-lossless: conflicts-with-version fluidr3mono-gm-soundfont (<< 2.315-5~)
+musescore-general-soundfont-lossless: conflicts-with-version musescore-general-soundfont (<< 0.1.3-1~)
diff --git a/debian/musescore-general-soundfont-lossless.postinst b/debian/musescore-general-soundfont-lossless.postinst
new file mode 100644 (file)
index 0000000..4a50325
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+set -e
+
+# This maintainer script can be called the following ways:
+#
+# * new-postinst "configure" [$most_recently_configured_version]
+# The package is unpacked; all dependencies are unpacked and, when there
+# are no circular dependencies, configured.
+#
+# * old-postinst "abort-upgrade" $new_version
+# * conflictors-postinst "abort-remove" "in-favour" $package
+#      $new_version
+# * postinst "abort-remove"
+# * deconfigureds-postinst "abort-deconfigure" "in-favour"
+#      $failed_install_package $fip_version ["removing"
+#      $conflicting_package $cp_version]
+# The package is unpacked; all dependencies are at least Half-Installed,
+# previously been configured, and not removed. In some error situations,
+# dependencies may not be even fully unpacked.
+#
+# * postinst "triggered" "${triggers[*]}"
+# For trigger-only calls, i.e. if "configure" is not called.
+
+case $1 in
+configure)
+       update-alternatives --force --install \
+           /usr/share/sounds/sf3/MuseScore_General.sf3 MuseScore_General.sf3 \
+           /usr/share/sounds/sf2/MuseScore_General_Full.sf2 55
+       ;;
+
+abort-upgrade|abort-remove|abort-deconfigure)
+       ;;
+
+triggered)
+       ;;
+
+*)
+       echo >&2 "postinst called with unknown subcommand '$1'"
+       exit 1
+       ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/musescore-general-soundfont-lossless.prerm b/debian/musescore-general-soundfont-lossless.prerm
new file mode 100644 (file)
index 0000000..735411d
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+set -e
+
+# This maintainer script can be called the following ways:
+#
+# * prerm "remove"
+# * old-prerm "upgrade" $new_version
+# * conflictors-prerm "remove" "in-favour" $package $new_version
+# * deconfigureds-prerm "deconfigure" "in-favour"
+#      $package_being_installed $pbi_version ["removing"
+#      $conflicting_package $cp_version]
+# The package and dependencies are at least Half-Installed; dependencies
+# have previously been configured and not removed.
+#
+# * new-prerm "failed-upgrade" $old_version
+# * new-prerm "failed-upgrade" $old_version $new_version # 1.18.5, stretch
+# Called when 'old-prerm "upgrade"' fails; new package not unpacked, all
+# other constraints the same as above.
+
+case $1 in
+remove|deconfigure)
+       update-alternatives --remove MuseScore_General.sf3 \
+           /usr/share/sounds/sf2/MuseScore_General_Full.sf2
+       ;;
+
+upgrade|failed-upgrade)
+       ;;
+
+*)
+       echo >&2 "prerm called with unknown subcommand '$1'"
+       exit 1
+       ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
index eab1810..eaeb74c 100644 (file)
@@ -1 +1 @@
-MuseScore_General_Full.sf3 /usr/share/sounds/sf3/
+builddir/MuseScore_General_Full.sf3 /usr/share/sounds/sf3/
index 522ed33..c8f4f22 100755 (executable)
@@ -13,22 +13,25 @@ export LC_ALL
 
 override_dh_clean:
        dh_clean
-       rm -f MuseScore_General_Full.sf3 tmp.sf2
+       rm -rf builddir
 
-icop:=Copyright (c) Frank Wen, Michael Cowgill, S. Christian Collins, and others; see ICMT chunk or Debian ${DEB_SOURCE} ${DEB_VERSION} for entire terms and the MIT licence
+icop:=Copyright (c) Frank Wen, Michael Cowgill, S. Christian Collins, and others; see ICMT chunk or Debian source package ${DEB_SOURCE} (= ${DEB_VERSION}) for entire terms and the MIT licence
 ieng:=MuseScore_General by S. Christian Collins; based on Fluid (R3) Mono by Church Organist
+sfbasename:=MuseScore_General_Full
 override_dh_auto_build:
-       LC_ALL=C.UTF-8; export LC_ALL; set -- M*.sf2; \
-           fullname='MuseScore_General_Full.sf3'; \
+       LC_ALL=C.UTF-8; export LC_ALL; set -- *.sf2; \
            cmt=$$(sed '1,/^Licence:$$/d' debian/copyright | sed 1d; echo x); \
-           python3 debian/riffedit.py "$$1" tmp.sf2 \
-           -az 'LIST<INFO>/INAM' "$$fullname" \
+           python3 debian/riffedit.py "$$1" builddir/tmp.sf2 \
+           -az 'LIST<INFO>/INAM' '${sfbasename}.sf3' \
            -az 'LIST<INFO>/ICOP' '${icop}' \
            -az 'LIST<INFO>/IENG' '${ieng}' \
            -az 'LIST<INFO>/ICMT' "$${cmt%x}"
        sf3convert -S 0 -q 0.8 -a -1 -z \
-           tmp.sf2 MuseScore_General_Full.sf3
-       rm -f tmp.sf2
+           builddir/tmp.sf2 builddir/${sfbasename}.sf3
+       LC_ALL=C.UTF-8; export LC_ALL; python3 debian/riffedit.py \
+           builddir/tmp.sf2 builddir/${sfbasename}.sf2 \
+           -az 'LIST<INFO>/INAM' '${sfbasename}.sf2'
+       rm -f builddir/tmp.sf2
 
 override_dh_installchangelogs:
        dh_installchangelogs MuseScore_General-changelog.md