File: rules

package info (click to toggle)
libsdl1.2 1.2.15%2Bdfsg2-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 17,276 kB
  • sloc: ansic: 128,536; cpp: 11,192; sh: 9,887; asm: 2,553; objc: 2,128; makefile: 355; csh: 248; perl: 35; pascal: 8
file content (81 lines) | stat: -rwxr-xr-x 2,932 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk

SHLIBVER = 1.2.11

confflags = --disable-rpath --enable-sdl-dlopen \
            --disable-video-ggi --disable-video-svga --disable-video-aalib \
            --disable-nas --disable-esd --disable-arts \
            --disable-alsa-shared --disable-pulseaudio-shared \
            --disable-x11-shared \
            --enable-video-caca

# Only use NASM routines on x86 CPUs
ifeq ($(DEB_HOST_ARCH_CPU),i386)
	confflags += --enable-nasm
endif

# Don't use PlayStation 3 Cell driver on powerpc and ppc64
ifneq (,$(findstring $(DEB_HOST_ARCH_CPU),powerpc ppc64))
	confflags += --enable-video-ps3=no \
	             --disable-altivec
endif


%:
	dh $@

override_dh_autoreconf:
        # aclocal needs to include in specific order, and/or it seems that
        # doesn't try to find .m4 files in /usr/share/aclocal at all.  Updates
        # to both .m4 files and ltmain.sh (aclocal and libtoolize) are necessary
        # to support new architectures aarch64 (arm64) and powerpc64le, and this
        # seems the more straight way to achieve it.
        #
        # An alternative would be to just build-depend on libesd0-dev,
        # libasound2-dev and libltdl-dev to provide the files "esd.m4 alsa.m4
        # ltdl.m4" in /usr/share/aclocal, and not use the local "acinclude" dir
        # at all, but this pull even more dependencies, and unneeded ones.
        #
        # Another equivalent alternative, but more verbose:
        #
        # ACLOCAL="cat acinclude/esd.m4 acinclude/alsa.m4 acinclude/ltdl.m4 \
        #           /usr/share/aclocal/libtool.m4 \
        #           /usr/share/aclocal/ltoptions.m4 \
        #           /usr/share/aclocal/ltversion.m4 \
        #           /usr/share/aclocal/ltsugar.m4 >> aclocal.m4; aclocal"
        #          LIBTOOLIZE="libtoolize -f -i" dh_autoreconf --as-needed
        #          autoreconf -- -I acinclude -f -i
	AUTOHEADER=true ACLOCAL="aclocal --force --install -I /usr/share/aclocal/ -I acinclude" LIBTOOLIZE="libtoolize -fi" dh_autoreconf --as-needed
        # To verify that it worked, grep should find these strings:
        #
        #rgrep -i aarch64 .
        #rgrep -r powerpc64le .

override_dh_auto_configure:
	dh_auto_configure -- $(confflags)

override_dh_auto_build:
	dh_auto_build
	GZIP="-9n" tar czf debian/examples.tar.gz test --owner=0 --group=0 --mode=go=rX,u+rw,a-s --clamp-mtime --mtime="@$(SOURCE_DATE_EPOCH)" --sort=name

override_dh_auto_clean:
	dh_auto_clean
	rm -f debian/examples.tar.gz

override_dh_install:
	dh_install -XlibSDL.la -XlibSDLmain.la

override_dh_missing:
	dh_missing --fail-missing -XlibSDL.la -XlibSDLmain.la

override_dh_installdocs:
	dh_installdocs -Xdocs/man3/SDL

override_dh_makeshlibs:
	dh_makeshlibs -V"libsdl1.2debian (>= $(SHLIBVER))"

override_dh_strip:
	dh_strip --dbgsym-migration='libsdl1.2-dbg (<< 1.2.15+dfsg1-4~)'