File: rules

package info (click to toggle)
hiredis 0.13.3-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 604 kB
  • ctags: 864
  • sloc: ansic: 4,770; makefile: 206; cpp: 143
file content (31 lines) | stat: -rwxr-xr-x 696 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
#!/usr/bin/make -f
#export DH_VERBOSE=1

REDIS   = $(shell [ -e /usr/bin/redis-server ] && echo 1 || echo 0)

CFLAGS  = $(shell dpkg-buildflags --get CFLAGS)
CFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)

DEB_DESTDIR ?= $(CURDIR)/debian/tmp
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- DEBUG="-g" CFLAGS="$(CFLAGS)" ARCH=

override_dh_auto_install:
	dh_auto_install -- LIBRARY_PATH="lib/$(DEB_HOST_MULTIARCH)" \
		PREFIX=/usr

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG.md

override_dh_auto_test:
ifeq ($(REDIS), 1)
	make check
endif

override_dh_strip:
	dh_strip --dbg-package=libhiredis-dbg