| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
# see FEATURE AREAS in dpkg-buildflags(1) |
| 4 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 5 |
|
| 6 |
# Ensure that we link against all needed libraries (cf. Policy 10.2) |
| 7 |
export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs |
| 8 |
|
| 9 |
# Fix FTCBFS: export PKG_CONFIG for all targets |
| 10 |
include /usr/share/dpkg/architecture.mk |
| 11 |
DPKG_EXPORT_BUILDTOOLS=1 |
| 12 |
include /usr/share/dpkg/buildtools.mk |
| 13 |
|
| 14 |
export deb_systemdsystemunitdir = $(shell pkg-config --variable=systemdsystemunitdir systemd | sed s,^/,,) |
| 15 |
export deb_udevdir = $(shell pkg-config --variable=udevdir udev | sed s,^/,,) |
| 16 |
|
| 17 |
%: |
| 18 |
dh $@ |
| 19 |
|
| 20 |
override_dh_auto_install: |
| 21 |
dh_auto_install -- LIBNUM=/lib/$(DEB_HOST_MULTIARCH) |
| 22 |
|
| 23 |
DEFDIR=debian/dlm-controld/etc/default |
| 24 |
SDDIR=debian/dlm-controld/$(deb_systemdsystemunitdir) |
| 25 |
override_dh_install: |
| 26 |
dh_install |
| 27 |
mkdir -p "$(DEFDIR)" "$(SDDIR)" |
| 28 |
cp init/dlm.sysconfig "$(DEFDIR)"/dlm |
| 29 |
cp init/dlm.service "$(SDDIR)" |
| 30 |
|
| 31 |
override_dh_installinit: |
| 32 |
dh_installinit -pdlm-controld --name=dlm |
| 33 |
|
| 34 |
override_dh_missing: |
| 35 |
dh_missing --fail-missing |