File: rules

package info (click to toggle)
freespace2 25.0.0~rc11%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 47,232 kB
  • sloc: cpp: 657,500; ansic: 22,305; sh: 293; python: 200; makefile: 198; xml: 181
file content (54 lines) | stat: -rwxr-xr-x 1,722 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpkg/pkg-info.mk
VER  ?= $(shell sh -c 'printf "$${1%%+repack*}" | tr a-z A-Z ' -- "$(DEB_VERSION_UPSTREAM)")
$(info VER=$(VER))

$(info DEB_BUILD_OPTIONS:$(origin DEB_BUILD_OPTIONS)=$(DEB_BUILD_OPTIONS))

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
$(info DEB_BUILD_MAINT_OPTIONS:$(origin DEB_BUILD_MAINT_OPTIONS)=$(DEB_BUILD_MAINT_OPTIONS))

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

EXTRA_CONFIG=
ifneq (,$(filter i386 amd64 x32,$(DEB_HOST_ARCH)))
	EXTRA_CONFIG += -DFORCED_SIMD_INSTRUCTIONS="SSE2"
endif

%:
	dh $@ --builddirectory=_build

override_dh_auto_configure:
	cp -a cmake-modules cmake/external/rpavlik-cmake-modules
	cp -a librocket lib/libRocket
	dh_auto_configure -- \
            -DCMAKE_BUILD_TYPE=Release \
            -DCMAKE_INSTALL_PREFIX=/usr/games/ \
            -DFSO_BUILD_WITH_FFMPEG=1 \
            -DFSO_BUILD_WITH_DISCORD=1 \
            -DFSO_BUILD_WITH_OPENXR=1 \
            -DFSO_BUILD_WITH_VULKAN=1 \
            $(EXTRA_CONFIG) \
        ;

#execute_after_dh_auto_build:
#	## building developer's documentation
#	doxygen _build/fs2open.Doxyfile

execute_after_dh_auto_clean:
	$(RM) -rf lib/libRocket
	$(RM) -rf cmake/external/rpavlik-cmake-modules

override_dh_link:
	dh_link \
            /usr/games/fs2_open_$(VER)         /usr/games/fs2_open \
            /usr/games/fs2_open                /usr/share/games/freespace2-open/fs2_open \
            /usr/games/fs2_open_$(VER)         /usr/share/games/freespace2-open/fs2_open_$(VER) \
            /usr/share/man/man6/fs2_open.6.gz  /usr/share/man/man6/fs2_open_$(VER).6.gz \
        ;