debian/rules
author Sam Lantinga <slouken@libsdl.org>
Fri, 15 Feb 2013 14:56:08 -0800
changeset 6886 55fc95e5817b
child 6889 09bc9fbe147e
permissions -rwxr-xr-x
Added native Debian package information
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6886
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     1
#!/usr/bin/make -f
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     2
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     3
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     4
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     5
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     6
confflags = --disable-rpath --disable-video-directfb
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     7
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     8
%:
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     9
	dh $@ --parallel
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    10
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    11
override_dh_auto_configure:
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    12
	dh_auto_configure -Bbuilddir/all -- $(confflags)
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    13
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    14
override_dh_auto_build:
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    15
	dh_auto_build -Bbuilddir/all
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    16
	tar czf debian/examples.tar.gz test
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    17
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    18
override_dh_auto_install:
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    19
	dh_auto_install -Bbuilddir/all
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    20
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    21
override_dh_auto_clean:
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    22
	dh_auto_clean -Bbuilddir/all
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    23
	rm -f debian/examples.tar.gz
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    24
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    25
override_dh_install:
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    26
	dh_install --remaining-packages --fail-missing -XlibSDL2.la
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    27
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    28
override_dh_installexamples:
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    29
	dh_installexamples -plibsdl2-dev debian/examples.tar.gz
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    30
	dh_installexamples --remaining-packages
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    31
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    32
override_dh_link:
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    33
        # to address lintian warning
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    34
        # 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
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    35
	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
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    36
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    37
override_dh_strip:
55fc95e5817b Added native Debian package information
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    38
	dh_strip --dbg-package=libsdl2-dbg