debian/rules
author Sam Lantinga <slouken@libsdl.org>
Wed, 07 Nov 2018 07:52:39 -0800
changeset 12403 a4d730631698
parent 12402 3b5b4eb1927f
permissions -rwxr-xr-x
Used confflags +=, so each option can be enabled individually, if desired
     1 #!/usr/bin/make -f
     2 
     3 DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
     4 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
     5 
     6 confflags = --disable-rpath --disable-video-directfb \
     7             --disable-nas --disable-esd --disable-arts
     8 
     9 # These flags can be used to create a package directly linking with external libraries and having the appropriate package dependencies
    10 #confflags += --disable-alsa-shared
    11 #confflags += --disable-arts-shared
    12 #confflags += --disable-directfb-shared
    13 #confflags += --disable-esd-shared
    14 #confflags += --disable-fusionsound-shared
    15 #confflags += --disable-jack-shared
    16 #confflags += --disable-kmsdrm-shared
    17 #confflags += --disable-libsamplerate-shared
    18 #confflags += --disable-nas-shared
    19 #confflags += --disable-pulseaudio-shared
    20 #confflags += --disable-sndio-shared
    21 #confflags += --disable-wayland-shared
    22 #confflags += --disable-x11-shared
    23 
    24 %:
    25 	dh $@ --parallel
    26 
    27 override_dh_auto_configure:
    28 	dh_auto_configure -Bbuilddir/all -- $(confflags)
    29 
    30 override_dh_auto_build:
    31 	dh_auto_build -Bbuilddir/all
    32 	tar czf debian/examples.tar.gz test
    33 
    34 override_dh_auto_install:
    35 	dh_auto_install -Bbuilddir/all
    36 
    37 override_dh_auto_clean:
    38 	dh_auto_clean -Bbuilddir/all
    39 	rm -f debian/examples.tar.gz
    40 
    41 override_dh_install:
    42 	dh_install --remaining-packages --fail-missing -XlibSDL2.la
    43 
    44 override_dh_installexamples:
    45 	dh_installexamples -plibsdl2-dev debian/examples.tar.gz
    46 	dh_installexamples --remaining-packages
    47 
    48 override_dh_link:
    49 	# to address lintian warning
    50 	# W: libsdl2-2.0-0: dev-pkg-without-shlib-symlink usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.0.0 usr/lib/x86_64-linux-gnu/libSDL2-2.0.so
    51 	dh_link -plibsdl2-dev usr/lib/$(DEB_HOST_MULTIARCH)/libSDL2-2.0.so.0.0.0 usr/lib/$(DEB_HOST_MULTIARCH)/libSDL2-2.0.so
    52 
    53 override_dh_strip:
    54 	dh_strip --dbg-package=libsdl2-dbg