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 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
DH_BUILD_MAINT_OPTIONS := nocheck
include /usr/share/dpkg/default.mk
OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
CPU := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
SODIR := $(DEB_SOURCE)/$(DEB_SOURCE)/$(OS)/gcc
VDB_ARCH := *
LIBINSTALLDIR := debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
SCHEMADIR := debian/ncbi-vdb-data/usr/lib/$(DEB_SOURCE)
DSLMFLAGS := --commit --multiarch --devunversioned --exclude-la
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
%:
dh $@ --buildsystem=cmake
override_dh_auto_clean:
if [ -e ngs-sdk/Makefile.config.$(OS).$(CPU) ] ; then \
dh_auto_clean ; \
fi
rm -rf $(DEB_SOURCE)/$(MULTIARCH)
rm -rf obj-*
rm -rf libs/cipher/cipher-1.7/cipher/__pycache__
rm -rf test/schema/actual
rm -rf test/vdb/db/SparseCol*
rm -rf test/vdb/db/VCursorCommit_BufferOverflow
rm -f libs/ngs-jni/jni.h
rm -f libs/ngs-jni/jni_md.h
rm -f build/ld.linux.exe_cmd.sh
rm -f debian/common-install-stamp
rm -f interfaces/cc/gcc/aarch64
rm -f test/cloud/cloud-kfg/.aws/c*
rm -f test/kdb/root/sra/SRR600096.sra.cache
rm -f test/kdb/user-settings.mkfg
rm -f test/vdb/kfg/*/user-settings.mkfg
rm -f test/vfs/caching-kfg/unix/user-settings.mkfg
rm -f test/vfs/tmp.perm-file.tmp
rm -f test/vfs/user-settings.mkfg
rm -f test/vxf/local_config/user-settings.mkfg
override_dh_auto_configure-indep:;
override_dh_auto_build-arch:
ln -s arm64 interfaces/cc/gcc/aarch64
dh_auto_build --no-parallel -- NO_VDB3=1
if find . \( -name "*.so" -o -name "*.a" \) -exec strings \{\} \; | tee | grep -q vdb_mbedtls ; then \
find . \( -name "*.so" -o -name "*.a" \) -exec strings \{\} \; | tee | grep vdb_mbedtls ; \
grep -Rl vdb_mbedtls debian/tmp/* ; \
exit 1 ; \
false ; \
fi
override_dh_auto_build-indep:;
override_dh_auto_test-arch:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
dh_auto_test -- NO_VDB3=1 || true
else
echo "Skip testing which takes a long time"
endif
override_dh_auto_test-indep:;
override_dh_prep:
dh_prep -Xdebian/tmp
debian/common-install-stamp:
mkdir -p debian/libncbi-vdb-dev/usr/include/$(DEB_SOURCE)
cp -a interfaces/* debian/libncbi-vdb-dev/usr/include/$(DEB_SOURCE)
mkdir -p $(SCHEMADIR)
for schema in `find debian/libncbi-vdb-dev/usr/include/$(DEB_SOURCE) -name "*.vschema"` ; do \
schemafile=`basename $${schema}` ; \
schemadir=`basename $$(dirname $${schema})` ; \
mkdir -p $(SCHEMADIR)/$${schemadir} ; \
sed -i "s:^include ':&/usr/lib/ncbi-vdb/:" $${schema} ; \
mv $${schema} $(SCHEMADIR)/$${schemadir} ; \
done
mv debian/libncbi-vdb-dev/usr/include/ncbi-vdb/kfg/ncbi $(SCHEMADIR)/kfg
touch $@
override_dh_auto_install-arch: debian/common-install-stamp
dh_auto_install -- NO_VDB3=1
find $(LIBINSTALLDIR) -name "*-static.a" -delete
for slib in $(LIBINSTALLDIR)/*.a ; do \
mv $(LIBINSTALLDIR)/`readlink $$slib` $$slib ; \
mv $(LIBINSTALLDIR)/`readlink $$slib` $$slib ; \
done
d-shlibmove $(DSLMFLAGS) \
--movedev $(LIBINSTALLDIR)/libkapp.a usr/lib/$(MULTIARCH) \
--movedev $(LIBINSTALLDIR)/libktst.a usr/lib/$(MULTIARCH) \
--movedev obj-*/ilib/libkapp-norsrc.a usr/lib/$(MULTIARCH) \
$(LIBINSTALLDIR)/libncbi-vdb.so
dh_install -plibncbi-vdb-dev libs/vfs/json-response.h usr/include/ncbi-vdb/vfs
cp libs/vfs/services-priv.h debian/libncbi-vdb-dev/usr/include/ncbi-vdb/vfs/services-priv-internal.h
d-shlibmove $(DSLMFLAGS) \
$(LIBINSTALLDIR)/libncbi-wvdb.so
d-shlibmove $(DSLMFLAGS) \
$(LIBINSTALLDIR)/libsam-extract.so
find debian/lib* -name .gitignore -delete
override_dh_auto_install-indep: debian/common-install-stamp
|