File: rules

package info (click to toggle)
libtgvoip 2.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,004 kB
  • sloc: cpp: 61,331; ansic: 24,725; sh: 4,150; makefile: 749; asm: 242
file content (39 lines) | stat: -rwxr-xr-x 866 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
#!/usr/bin/make -f

DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/default.mk
OUT = obj-$(DEB_HOST_GNU_TYPE)

ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
 BUILD_MODE = Release
else
 BUILD_MODE = Debug
endif

GYPFLAGS += \
	--format=cmake \
	--depth=. \
	--generator-output=. \
	-Gconfig=$(BUILD_MODE) \
	-Goutput_dir=$(OUT) \
	-Dlinux_path_opus_include=/usr/include/opus

# Workaround for non-Linux, see bugs.debian.org/799356
ifneq ($(DEB_HOST_ARCH_OS),linux)
 GYPFLAGS += --no-parallel
endif

%:
	dh $@ --sourcedirectory=$(OUT)/$(BUILD_MODE)

override_dh_auto_configure:
	gyp $(GYPFLAGS)
	dh_auto_configure

override_dh_auto_install:
	install -D $(OUT)/obj.target/libtgvoip.a \
		debian/libtgvoip-dev/usr/lib/$(DEB_HOST_MULTIARCH)/libtgvoip.a
	dh_auto_install

override_dh_auto_clean:
	dh_auto_clean || dh_auto_clean --sourcedirectory=$(CURDIR)