File: rules

package info (click to toggle)
dropbear 2018.76-5%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 12,892 kB
  • sloc: ansic: 101,581; sh: 3,937; perl: 787; makefile: 656; python: 370; java: 177; asm: 30
file content (36 lines) | stat: -rwxr-xr-x 858 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
LDFLAGS += -fPIE -pie

# export DH_OPTIONS
DEB_HOST_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

CONFFLAGS =
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
  CC = $(DEB_HOST_GNU_TYPE)-gcc
else
  CC = gcc
endif

ifneq (,$(findstring diet,$(DEB_BUILD_OPTIONS)))
  CONFFLAGS =--disable-zlib
  CC =diet -v -Os gcc -nostdinc
endif

%:
	dh $@ --with=autoreconf

override_dh_installinit:
	dh_installinit -R --name dropbear

override_dh_auto_configure:
	dh_auto_configure -- --disable-bundled-libtom \
	  CC='$(CC)' CFLAGS='$(CFLAGS)' $(CONFFLAGS)

override_dh_install:
	dh_link -pdropbear-run /var/log/dropbear etc/dropbear/log/main
	dh_install