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
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
LDFLAGS += -fPIE -pie
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
|