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
|
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
DEB_TARGET_ARCH ?= $(shell dpkg-architecture -qDEB_TARGET_ARCH)
DEFAULT_BUILD_DIRECTORY = obj-$(shell dpkg-architecture -q DEB_HOST_GNU_TYPE)
ifneq (,$(findstring $(DEB_HOST_ARCH),armel armhf))
ENABLE_QT = OFF
else
ENABLE_QT = ON
endif
CMAKE_FLAGS = \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_C_FLAGS="$(CFLAGS)" \
-DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -DNDEBUG" \
-DCMAKE_SHARED_LINKER_FLAGS="$(LDFLAGS)" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DCMAKE_INSTALL_BINDIR:PATH=games \
-DFG_DATA_DIR:PATH=/usr/share/games/flightgear \
-DENABLE_LARCSIM=ON \
-DENABLE_UIUC_MODEL=ON \
-DENABLE_QT=$(ENABLE_QT) \
-DSP_FDMS=ON \
-DSYSTEM_SQLITE=ON \
-DSYSTEM_SPEEX=ON
%:
dh $@ --buildsystem=cmake
override_dh_auto_configure:
dh_auto_configure -- $(CMAKE_FLAGS)
override_dh_installdocs:
dh_installdocs
cp docs-mini/* debian/flightgear/usr/share/doc/flightgear || true
cp utils/TerraSync/README.txt debian/flightgear/usr/share/doc/flightgear/README.TerraSync
rm $(CURDIR)/debian/flightgear/usr/share/doc/flightgear/README.Cygwin
rm $(CURDIR)/debian/flightgear/usr/share/doc/flightgear/README.IRIX
rm $(CURDIR)/debian/flightgear/usr/share/doc/flightgear/README.MacOS
rm $(CURDIR)/debian/flightgear/usr/share/doc/flightgear/README.Linux
override_dh_installchangelogs:
dh_installchangelogs ChangeLog
override_dh_strip:
dh_strip --dbgsym-migration='flightgear-dbg (<< 1:2016.2.1+dfsg-6~)'
override_dh_auto_test:
cd $(DEFAULT_BUILD_DIRECTORY) && make run_test_suite
dh_auto_test --no-parallel
copyright_check:
${MAKE} -f /usr/share/cdbs/1/rules/utils.mk debian/stamp-copyright-check
rm debian/stamp-copyright-check
|