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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_OPTIONS
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_BUILD_HARDENING = 1
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CPPFLAGS=`dpkg-buildflags --get CPPFLAGS`
# Work Arround: libgoogle-perftools-dev by depends on some architecures
ifneq (,$(findstring $(DEB_HOST_ARCH),i386 amd64 powerpc ppc64el arm64 armel armhf))
CPPFLAGS += -DUSE_TCMALLOC
LIBTCMALLOC = -ltcmalloc_minimal
endif
export CPPFLAGS
export LIBTCMALLOC
LDFLAGS += -latomic
LDFLAGS += `dpkg-buildflags --get LDFLAGS`
export LDFLAGS
CFLAGS += $(CPPFLAGS)
ifneq (,$(filter x-fpic,$(DEB_BUILD_OPTIONS)))
CFLAGS += -fPIC
endif
export CFLAGS
%:
dh $@ --with systemd
override_dh_auto_build-indep:
$(MAKE)
override_dh_auto_test:
$(MAKE) tests
override_dh_auto_install:
install -d $(CURDIR)/debian/yrmcds/etc
install -m 0644 $(CURDIR)/etc/yrmcds.conf $(CURDIR)/debian/yrmcds/etc/yrmcds.conf
sed -i 's/^user = nobody/user = yrmcds/g' $(CURDIR)/debian/yrmcds/etc/yrmcds.conf
sed -i 's/^group = nogroup/group = yrmcds/g' $(CURDIR)/debian/yrmcds/etc/yrmcds.conf
install -d $(CURDIR)/debian/yrmcds/usr/sbin
install $(CURDIR)/yrmcdsd $(CURDIR)/debian/yrmcds/usr/sbin/yrmcdsd
override_dh_systemd_enable:
dh_systemd_enable --name=yrmcds
|