| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/pkg-info.mk |
| 4 |
include /usr/share/dpkg/vendor.mk |
| 5 |
|
| 6 |
DEB_CFLAGS_MAINT_APPEND = \ |
| 7 |
-Wall \ |
| 8 |
-Wextra \ |
| 9 |
-Wstrict-prototypes \ |
| 10 |
-Wsign-compare \ |
| 11 |
-Wnested-externs \ |
| 12 |
-Wpointer-arith \ |
| 13 |
-Wformat-security \ |
| 14 |
-Winit-self \ |
| 15 |
-Wno-missing-field-initializers \ |
| 16 |
-Wno-unused-parameter \ |
| 17 |
-fno-strict-aliasing \ |
| 18 |
-std=gnu17 \ |
| 19 |
$(NULL) |
| 20 |
|
| 21 |
DEB_CPPFLAGS_MAINT_APPEND = \ |
| 22 |
-DSVNREVISION=$(DEB_VERSION) \ |
| 23 |
-DBUILDTYPE=$(DEB_VENDOR) \ |
| 24 |
-DNO_BUILD_TIMESTAMPS \ |
| 25 |
$(NULL) |
| 26 |
|
| 27 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+pie,+bindnow |
| 28 |
include /usr/share/dpkg/default.mk |
| 29 |
|
| 30 |
ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) |
| 31 |
TARGETS = sdl-release sv-release |
| 32 |
else |
| 33 |
TARGETS = sdl-debug sv-debug |
| 34 |
endif |
| 35 |
|
| 36 |
%: |
| 37 |
dh $@ |
| 38 |
|
| 39 |
# LDFLAGS_* are used to compile builddate.c, so yes, they do need to include |
| 40 |
# the CPPFLAGS. |
| 41 |
override_dh_auto_build: |
| 42 |
dh_auto_build -- \ |
| 43 |
CFLAGS_RELEASE="$(CPPFLAGS) $(CFLAGS)" \ |
| 44 |
CFLAGS_DEBUG="$(CPPFLAGS) $(CFLAGS)" \ |
| 45 |
LDFLAGS_RELEASE="$(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" \ |
| 46 |
LDFLAGS_DEBUG="$(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" \ |
| 47 |
DP_MAKE_TARGET=linux \ |
| 48 |
DP_MACHINE=$(DEB_HOST_GNU_CPU) \ |
| 49 |
DP_LINK_CURL=shared \ |
| 50 |
DP_LINK_FREETYPE2=shared \ |
| 51 |
DP_LINK_JPEG=shared \ |
| 52 |
DP_LINK_VORBIS=shared \ |
| 53 |
DP_LINK_ODE=shared \ |
| 54 |
DP_LINK_PNG=shared\ |
| 55 |
DP_LINK_THEORA=shared \ |
| 56 |
DP_LINK_ZLIB=shared \ |
| 57 |
DISABLE_OFFSCREEN_GECKO=1 \ |
| 58 |
DP_LINK_CRYPTO=never \ |
| 59 |
DP_LINK_CRYPTO_RIJNDAEL=never \ |
| 60 |
DP_LINK_AVW=never \ |
| 61 |
STRIP=": do not strip" \ |
| 62 |
$(TARGETS) |
| 63 |
|
| 64 |
override_dh_auto_install: |
| 65 |
install -d debian/darkplaces/usr/games |
| 66 |
install darkplaces-sdl debian/darkplaces/usr/games/darkplaces |
| 67 |
install -d debian/darkplaces-server/usr/games |
| 68 |
install darkplaces-dedicated debian/darkplaces-server/usr/games/darkplaces-server |
| 69 |
|
| 70 |
override_dh_auto_test: |
| 71 |
: |
| 72 |
|
| 73 |
USCAN_DESTDIR ?= ../build-area |
| 74 |
USCAN_OPTS ?= |
| 75 |
|
| 76 |
# Change the version in d/changelog before invoking this. |
| 77 |
maintainer-get-orig-source: |
| 78 |
set -e; \ |
| 79 |
set -x; \ |
| 80 |
destdir="$$(mktemp -d)"; \ |
| 81 |
uscan --destdir="$$destdir" --download --safe --verbose --download-current-version; \ |
| 82 |
unzip -d "$$destdir" "$$destdir"/darkplacesengine*.zip 'darkplacesenginesource*.zip'; \ |
| 83 |
mk-origtargz --repack --compression=xz -C "$(USCAN_DESTDIR)" "$$destdir"/darkplacesenginesource*.zip; \ |
| 84 |
rm -fr "$$destdir" |