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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
SHELL+= -e
DPKG_EXPORT_BUILDFLAGS=1
DEB_BUILD_MAINT_OPTIONS=hardening=+pie,+bindnow
-include /usr/share/dpkg/buildflags.mk
CPPFLAGS+=-DLIBBSD_OPENBSD_VIS
CFLAGS+=$(shell pkg-config --cflags libbsd-overlay)
LDFLAGS+=$(shell pkg-config --libs libbsd-overlay)
CFLAGS+=$(shell pkg-config --cflags libbsd-ctor)
LDFLAGS+=$(shell pkg-config --libs libbsd-ctor)
-include /usr/share/dpkg/architecture.mk
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
else
CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
endif
D := $(CURDIR)/debian/ladvd
configure: configure.ac
dh_autoreconf
build/config.status: configure
dh_testdir
mkdir -p build
cd build && \
../configure $(CONFFLAGS) \
--disable-silent-rules \
--prefix=/usr --mandir=\$${prefix}/share/man \
--with-systemdsystemunitdir=$(shell pkg-config --variable=systemdsystemunitdir systemd) \
--with-pid-dir=/run/ladvd
build: build-stamp
build-stamp: build/config.status
dh_testdir
cd build && \
$(MAKE)
touch $@
test: test-stamp
test-stamp: build
dh_testdir
cd build && \
$(MAKE) check
touch $@
clean:
dh_testdir
rm -rf *-stamp build
dh_autoreconf_clean
dh_clean
binary-arch: build $(TEST_TARGET)
dh_testdir
dh_testroot
dh_prep
cd build && \
$(MAKE) install DESTDIR=$D
rm $D/usr/share/doc/ladvd/LICENSE
dh_installchangelogs
dh_installdocs
dh_installsystemd
dh_installman
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary-indep:
binary: binary-indep binary-arch
build-arch: build
build-indep: build
.PHONY: clean build build-arch build-indep binary binary-indep binary-arch
|