#!/usr/bin/make -f DPKG_EXPORT_BUILDFLAGS = 1 DEB_BUILD_MAINT_OPTIONS = hardening=+all include /usr/share/dpkg/buildflags.mk # extract the library versions include $(CURDIR)/configure/CONFIG_CA_VERSION include $(CURDIR)/configure/CONFIG_LIBCOM_VERSION CA_VERSION = $(EPICS_CA_MAJOR_VERSION).$(EPICS_CA_MINOR_VERSION).$(EPICS_CA_MAINTENANCE_VERSION) LIBCOM_VERSION = $(EPICS_LIBCOM_MAJOR_VERSION).$(EPICS_LIBCOM_MINOR_VERSION).$(EPICS_LIBCOM_MAINTENANCE_VERSION) REL_LIB_DIR := lib/$(shell perl $(CURDIR)/src/tools/EpicsHostArch.pl) BIN_DIR := bin/$(shell perl $(CURDIR)/src/tools/EpicsHostArch.pl) LIB_DIR = $(CURDIR)/$(REL_LIB_DIR) # map dpkg flags to custom EPICS internal flags, of which only CFLAGS are actioned. export POSIX_CFLAGS+=$(CFLAGS) export POSIX_CFLAGS+=$(CPPFLAGS) export POSIX_CPPFLAGS+=$(CPPFLAGS) export POSIX_LDFLAGS+=$(LDFLAGS) # show the names of the tests to aid with failures export HARNESS_VERBOSE=1 export LD_LIBRARY_PATH := $(LIB_DIR):$(LD_LIBRARY_PATH) %: dh $@ debian/control: debian/control.in debian/rules echo '# This file is autogenerated. DO NOT EDIT' > debian/control cat debian/control.in | \ sed -e 's/@CA_VERSION@/$(CA_VERSION)/g' \ -e 's/@LIBCOM_VERSION@/$(LIBCOM_VERSION)/g' \ >> debian/control override_dh_auto_clean: debian/control # display the network configuration ip a dh_auto_clean override_dh_auto_build: $(MAKE) LINKER_USE_RPATH=NO FINAL_LOCATION=/usr override_dh_auto_install: $(MAKE) install override_dh_auto_test: $(MAKE) runtests CI=1 override_dh_install: dh_perl libepics-perl usr/lib/epics/ dh_install dh_install -plibepics-perl lib/perl/* ./usr/lib/$(DEB_HOST_MULTIARCH)/epics/ $(RM) debian/libepics-perl/usr/lib/$(DEB_HOST_MULTIARCH)/epics/EpicsHostArch.pl dh_install -pepics-base $(REL_LIB_DIR)/libdbCore.so.* usr/lib/$(DEB_HOST_MULTIARCH) dh_install -pepics-dev $(REL_LIB_DIR)/libdbCore.so usr/lib/$(DEB_HOST_MULTIARCH) dh_install -pepics-base $(REL_LIB_DIR)/libdbRecStd.so.* usr/lib/$(DEB_HOST_MULTIARCH) dh_install -pepics-dev $(REL_LIB_DIR)/libdbRecStd.so usr/lib/$(DEB_HOST_MULTIARCH) dh_install -pepics-base $(REL_LIB_DIR)/libpvAccess.so.* usr/lib/$(DEB_HOST_MULTIARCH) dh_install -pepics-base $(REL_LIB_DIR)/libpvAccessCA.so.* usr/lib/$(DEB_HOST_MULTIARCH) dh_install -pepics-base $(REL_LIB_DIR)/libpvData.so.* usr/lib/$(DEB_HOST_MULTIARCH) dh_install -pepics-dev $(REL_LIB_DIR)/libpvAccess.so usr/lib/$(DEB_HOST_MULTIARCH) dh_install -pepics-dev $(REL_LIB_DIR)/libpvAccessCA.so usr/lib/$(DEB_HOST_MULTIARCH) dh_install -pepics-dev $(REL_LIB_DIR)/libpvData.so usr/lib/$(DEB_HOST_MULTIARCH) dh_install -plibca$(CA_VERSION) $(REL_LIB_DIR)/libca.so.* usr/lib/$(DEB_HOST_MULTIARCH) dh_install -plibca-dev $(REL_LIB_DIR)/libca.so usr/lib/$(DEB_HOST_MULTIARCH) dh_install -plibcom$(LIBCOM_VERSION) $(REL_LIB_DIR)/libCom.so.* usr/lib/$(DEB_HOST_MULTIARCH) dh_install -plibcom-dev $(REL_LIB_DIR)/libCom.so usr/lib/$(DEB_HOST_MULTIARCH)