File: rules

package info (click to toggle)
webdis 0.1.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 564 kB
  • ctags: 798
  • sloc: ansic: 5,240; sh: 254; python: 247; makefile: 93
file content (49 lines) | stat: -rwxr-xr-x 1,079 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
#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1

export PREFIX = /usr
export DESTDIR = $(CURDIR)/debian/tmp
export CONFDIR = $(DESTDIR)/etc/webdis

export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow

CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)

# Add CPPFLAGS TO CFLAGS since build system does not know about them.
CFLAGS += $(CPPFLAGS)

# Objects to be removed from build procedure
export HIREDIS_OBJ=
export JANSSON_OBJ=
export B64_OBJS=

export CFLAGS += -I. -Ihttp-parser
export LDFLAGS += -levent -pthread -lhiredis -ljansson -lb64

%:
	dh $@

override_dh_auto_build:
	dh_auto_build
	$(MAKE) -C tests pubsub websocket

override_dh_strip:
	dh_strip --dbg-package=webdis-dbg

override_dh_auto_clean:
	$(MAKE) clean
	$(MAKE) -C tests clean
	rm -f debian/files
	dh_auto_clean

override_dh_auto_test:
ifneq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	@echo "Skipping check (disabled in DEB_BUILD_OPTIONS)."
else
	$(CURDIR)/debian/test.sh $(MAKE) test
endif