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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets by Bill Allombert 2001
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Uncomment to view all compilation commands and fix W-compiler-flags-hidden
export VERBOSE=1
# Add 'atomic' build flag to mak sure armel and mipsel compile
ifneq (,$(filter $(DEB_HOST_ARCH), armel mipsel m68k sh4))
export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
endif
# these archs don't have luajit but we can still support them
ifneq (,$(filter $(DEB_HOST_ARCH), ppc64el riscv64))
CMAKE_ARGS = -DUSE_LUAJIT=FALSE
endif
#CMake silently ignores CPPFLAGS. Below will properly set CFLAGS/CXXFLAGS
#https://wiki.debian.org/Hardening#Notes_for_packages_using_CMake
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)
override_dh_auto_configure:
dh_auto_configure -- -DCMAKE_INSTALL_PREFIX=/usr -DBINDIR=/usr/games -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DUSE_SYSTEM_TINYXML="TRUE" -DCMAKE_VERBOSE_MAKEFILE="FALSE" -DBUILD_MYGUI_PLUGIN="FALSE" -DOPENMW_USE_SYSTEM_RECASTNAVIGATION=On $(CMAKE_ARGS)
override_dh_installchangelogs:
dh_installchangelogs CHANGELOG.md
# Fail to build if some files were not installed anywhere
override_dh_install:
dh_install --exclude=usr/lib/lib*.a --exclude=usr/include/*.h -Xlicenses
dh_missing --list-missing --exclude=usr/lib/lib*.a --exclude=usr/include/*.h -Xlicenses
%:
dh $@ --builddirectory=build
|