File: rules

package info (click to toggle)
lmms 1.1.3-8.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 53,136 kB
  • sloc: cpp: 143,677; ansic: 98,862; sh: 159; makefile: 24; python: 24; xml: 14
file content (35 lines) | stat: -rwxr-xr-x 1,233 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
#!/usr/bin/make -f

#Rodney Dawes Version simplifies things :)

DH_CMAKE_BUILD_DIR=obj	-${DEB_BUILD_GNU_TYPE}
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_OS   ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

CMAKE_OPTS= -DCONTRIBUTORS=$(CURDIR)/doc/CONTRIBUTORS
ifneq ($(DEB_HOST_ARCH_OS),linux)
CMAKE_OPTS+= -DWANT_ALSA=0
endif

ifeq ($(DEB_HOST_ARCH),i386)
export PATH := $(PATH):/usr/lib/wine
WINE_PATH := /usr/lib/$(DEB_HOST_MULTIARCH)/wine
CMAKE_OPTS+= -DWINE_CXX_FLAGS=-Wl,--enable-new-dtags,-rpath=$(WINE_PATH)
else
CMAKE_OPTS+= -DWANT_VST_NOWINE=1 \
	-DREMOTE_VST_PLUGIN_FILEPATH=../../i386-linux-gnu/lmms/RemoteVstPlugin
endif

# Define NDEBUG. This helps with reproducible builds.
# Add -Wno-error=format-truncation because truncation is expected in snprintf.
export CFLAGS ?= $(shell dpkg-buildflags --get CFLAGS) -DNDEBUG
export CXXFLAGS ?= $(shell dpkg-buildflags --get CXXFLAGS) -DNDEBUG \
	-Wno-error=format-truncation
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem cmake

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) $(CMAKE_OPTS)