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 82 83
|
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/vendor.mk
DEB_CFLAGS_MAINT_APPEND = \
-Wall \
-Wextra \
-Wstrict-prototypes \
-Wsign-compare \
-Wnested-externs \
-Wpointer-arith \
-Wformat-security \
-Winit-self \
-Wno-missing-field-initializers \
-Wno-unused-parameter \
-fno-strict-aliasing \
$(NULL)
DEB_CPPFLAGS_MAINT_APPEND = \
-DSVNREVISION=$(DEB_VERSION) \
-DBUILDTYPE=$(DEB_VENDOR) \
-DNO_BUILD_TIMESTAMPS \
$(NULL)
export DEB_BUILD_MAINT_OPTIONS = hardening=+pie,+bindnow
include /usr/share/dpkg/default.mk
ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
TARGETS = sdl-release sv-release
else
TARGETS = sdl-debug sv-debug
endif
%:
dh $@
# LDFLAGS_* are used to compile builddate.c, so yes, they do need to include
# the CPPFLAGS.
override_dh_auto_build:
dh_auto_build -- \
CFLAGS_RELEASE="$(CPPFLAGS) $(CFLAGS)" \
CFLAGS_DEBUG="$(CPPFLAGS) $(CFLAGS)" \
LDFLAGS_RELEASE="$(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" \
LDFLAGS_DEBUG="$(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" \
DP_MAKE_TARGET=linux \
DP_MACHINE=$(DEB_HOST_GNU_CPU) \
DP_LINK_CURL=shared \
DP_LINK_FREETYPE2=shared \
DP_LINK_JPEG=shared \
DP_LINK_VORBIS=shared \
DP_LINK_ODE=shared \
DP_LINK_PNG=shared\
DP_LINK_THEORA=shared \
DP_LINK_ZLIB=shared \
DISABLE_OFFSCREEN_GECKO=1 \
DP_LINK_CRYPTO=never \
DP_LINK_CRYPTO_RIJNDAEL=never \
DP_LINK_AVW=never \
STRIP=": do not strip" \
$(TARGETS)
override_dh_auto_install:
install -d debian/darkplaces/usr/games
install darkplaces-sdl debian/darkplaces/usr/games/darkplaces
install -d debian/darkplaces-server/usr/games
install darkplaces-dedicated debian/darkplaces-server/usr/games/darkplaces-server
override_dh_auto_test:
:
USCAN_DESTDIR ?= ../build-area
USCAN_OPTS ?=
# Change the version in d/changelog before invoking this.
maintainer-get-orig-source:
set -e; \
set -x; \
destdir="$$(mktemp -d)"; \
uscan --destdir="$$destdir" --download --safe --verbose --download-current-version; \
unzip -d "$$destdir" "$$destdir"/darkplacesengine*.zip 'darkplacesenginesource*.zip'; \
mk-origtargz --repack --compression=xz -C "$(USCAN_DESTDIR)" "$$destdir"/darkplacesenginesource*.zip; \
rm -fr "$$destdir"
|