#!/usr/bin/make -f
#export DH_VERBOSE=1
export DEB_CFLAGS_MAINT_APPEND = -pipe -Wall
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
SHLIBVER = 2.0.0
# enable external music player
confflags = --enable-music-cmd
# explicitly enable/disable all supported sound, using libmad instead of
# libsmpeg for mp3 (it's much more popular, and smpeg is unmaintained)
confflags += --disable-music-mp3
confflags += --enable-music-mod
confflags += --enable-music-mp3-mad-gpl
confflags += --enable-music-ogg
confflags += --enable-music-wave
# MIDI: Explicitly state what we use
confflags += --enable-music-fluidsynth-midi
confflags += --enable-music-timidity-midi
confflags += --enable-music-native-midi
# mafm 20111203: removed the "disable shared" support from previous versions, I
# couldn't find any reason for it in the changelog
#
# mafm 20111204: issue "disable-*-shared" flags for 'configure' again, otherwise
# SDL_mixer library opens those libraries in a plugin-like way (with
# SDL_LoadObject), and dpkg-shlibdeps doesn't seem to generate the needed
# dependencies in the binary library package
confflags += --disable-music-flac-shared
confflags += --disable-music-fluidsynth-shared
confflags += --disable-music-mod-shared
confflags += --disable-music-mp3-shared
confflags += --disable-music-ogg-shared
%:
dh $@ --with autoreconf --parallel
override_dh_autoreconf:
AUTOMAKE="automake --foreign" dh_autoreconf --as-needed ./autogen.sh
override_dh_auto_configure:
dh_auto_configure -- $(confflags)
override_dh_install:
dh_install --fail-missing -XlibSDL2_mixer.la
override_dh_installchangelogs:
dh_installchangelogs -- CHANGES.txt
override_dh_link:
# fix lintian warning dev-pkg-without-shlib-symlink
dh_link -plibsdl2-mixer-dev usr/lib/$(DEB_HOST_MULTIARCH)/libSDL2_mixer-2.0.so.0.0.0 usr/lib/$(DEB_HOST_MULTIARCH)/libSDL2_mixer-2.0.so
dh_link --remaining-packages
override_dh_compress:
dh_compress -Xplaymus.c -Xplaywave.c
override_dh_strip:
dh_strip --dbg-package=libsdl2-mixer-dbg
override_dh_makeshlibs:
dh_makeshlibs -V"libsdl2-mixer-2.0-0 (>= $(SHLIBVER))"