[SCM] libopenmpt/master: Add libmodplug compatability layer

jcowgill at users.alioth.debian.org jcowgill at users.alioth.debian.org
Sun Jan 8 11:38:48 UTC 2017


The following commit has been merged in the master branch:
commit c7439524be55b55bb11f1ca3133f807d419634e0
Author: James Cowgill <jcowgill at debian.org>
Date:   Sat Jan 7 22:37:00 2017 +0000

    Add libmodplug compatability layer
    
    The new libopenmpt-modplug-dev package is designed to be a drop-in
    replacement for the libmodplug-dev package, although some of
    libmodplug's C++ API is not complete.

diff --git a/debian/control b/debian/control
index ee4b0d5..ffd4923 100644
--- a/debian/control
+++ b/debian/control
@@ -76,3 +76,31 @@ Description: module music library based on OpenMPT -- documentation
  .
  This package contains documentation for developing programs which use
  libopenmpt.
+
+Package: libopenmpt-modplug1
+Architecture: any
+Multi-Arch: same
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: module music library based on OpenMPT -- modplug compat library
+ libopenmpt is a cross-platform C++ and C library to decode tracked music
+ files (modules) into a raw PCM audio stream. It is based on the player code
+ of the OpenMPT project, a descendant of the original ModPlug Tracker.
+ .
+ This package contains the modplug compatibility shared library. It is used by
+ programs that want to use libopenmpt's decoder, but are written using
+ libmodplug's API.
+
+Package: libopenmpt-modplug-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends: libopenmpt-modplug1 (= ${binary:Version}), ${misc:Depends}
+Conflicts: libmodplug-dev
+Description: module music library based on OpenMPT -- modplug compat development files
+ libopenmpt is a cross-platform C++ and C library to decode tracked music
+ files (modules) into a raw PCM audio stream. It is based on the player code
+ of the OpenMPT project, a descendant of the original ModPlug Tracker.
+ .
+ This package contains the development files required to compile programs
+ using libopenmpt's modplug compatibility layer. It serves as an alternative
+ to the libmodplug-dev package.
diff --git a/libmodplug/libmodplug.pc.in b/debian/libmodplug.pc.in
similarity index 61%
copy from libmodplug/libmodplug.pc.in
copy to debian/libmodplug.pc.in
index 3c85f56..3e6e2f4 100644
--- a/libmodplug/libmodplug.pc.in
+++ b/debian/libmodplug.pc.in
@@ -1,13 +1,10 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib/@DEB_HOST_MULTIARCH@
 includedir=${prefix}/include
 
 Name: libmodplug
 Description: The ModPlug mod file playing library (emulated via libopenmpt).
 Version: 0.8.8.5
-Requires: libopenmpt
-Libs: 
-Libs.private: 
+Libs: -L${libdir} -lmodplug
 Cflags: -I${includedir}
-
diff --git a/debian/libopenmpt-modplug-dev.install b/debian/libopenmpt-modplug-dev.install
new file mode 100644
index 0000000..376f507
--- /dev/null
+++ b/debian/libopenmpt-modplug-dev.install
@@ -0,0 +1,2 @@
+libmodplug/*.h usr/include/libmodplug
+usr/lib/*/libopenmpt_modplug.so
diff --git a/debian/libopenmpt-modplug1.install b/debian/libopenmpt-modplug1.install
new file mode 100644
index 0000000..be50fd8
--- /dev/null
+++ b/debian/libopenmpt-modplug1.install
@@ -0,0 +1 @@
+usr/lib/*/libopenmpt_modplug.so.*
diff --git a/debian/rules b/debian/rules
index 7abfbc9..17b819b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,9 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+MODPLUG_DEV_LIBDIR = debian/libopenmpt-modplug-dev/usr/lib/$(DEB_HOST_MULTIARCH)
+
 %:
 	dh $@
 
@@ -14,7 +17,13 @@ override_dh_autoreconf:
 	dh_autoreconf --as-needed
 
 override_dh_auto_configure:
-	dh_auto_configure -- --disable-static --without-ltdl
+	dh_auto_configure -- --disable-static --without-ltdl --enable-libopenmpt_modplug
 
 override_dh_installchangelogs:
 	dh_installchangelogs libopenmpt/dox/changelog.md
+
+override_dh_install:
+	dh_install
+	mkdir -p $(MODPLUG_DEV_LIBDIR)/pkgconfig
+	sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/' debian/libmodplug.pc.in > $(MODPLUG_DEV_LIBDIR)/pkgconfig/libmodplug.pc
+	ln -s libopenmpt_modplug.so $(MODPLUG_DEV_LIBDIR)/libmodplug.so

-- 
libopenmpt packaging



More information about the pkg-multimedia-commits mailing list