summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdebian/rules162
1 files changed, 134 insertions, 28 deletions
diff --git a/debian/rules b/debian/rules
index 2b425bfda3c..21fb36ddc11 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,50 +13,149 @@ ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS)))
DEB_SCONS_OPTIONS := --d=DEBUGBUILD
endif
-#ifeq (,$(filter nodbgsym,$(DEB_BUILD_OPTIONS)))
-# DEB_SCONS_OPTIONS += --nostrip
-#endif
+ifeq (,$(filter nodbgsym,$(DEB_BUILD_OPTIONS)))
+ DEB_SCONS_OPTIONS += --nostrip
+endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
PROCS=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
DEB_SCONS_OPTIONS += -j$(PROCS)
endif
export MONGO_VERSION=6.0.0
-COMMON_OPTIONS = --allocator=system \
- --wiredtiger=on \
- --use-system-snappy \
- --use-system-stemmer \
- --use-system-zlib \
- --use-system-zstd \
- --ssl=off \
- --disable-warnings-as-errors \
- --ssl $(DEB_SCONS_OPTIONS) \
- CC=$(CC) CXX=$(CXX)
-gperftools_archs = amd64 ppc64el arm64
-#ifneq (,$(filter $(DEB_HOST_ARCH), $(gperftools_archs)))
-#COMMON_OPTIONS += --allocator=tcmalloc
-#else
-#COMMON_OPTIONS += --allocator=system
-#endif
+COMMON_OPTIONS= --disable-warnings-as-errors
+
+COMMON_OPTIONS+= --wiredtiger=on
+COMMON_OPTIONS+= --ssl=off
+COMMON_OPTIONS+= --link-model=dynamic
+COMMON_OPTIONS+= --use-libunwind=off
+COMMON_OPTIONS+= --js-engine=none
+
+##=USE-SYSTEM-ASIO
+## Error 17.90% on building
+#COMMON_OPTIONS+=" --use-system-asio" # build error
+#
+
+##=USE-SYSTEM-BOOST
+## error: invalid use of template-name
+## 'std::unordered_set' without an argument list
+#COMMON_OPTIONS+=" --use-system-boost" # build error
+
+##=USE-SYSTEM-FMT
+## Error 79.4% of building
+#COMMON_OPTIONS+=" --use-system-fmt" # build error
+#
+#
+##=USE-SYSTEM-GOOGLE-BENCHMARK
+#COMMON_OPTIONS+=" --use-system-google-benchmark"
+#
+
+#=USE-SYSTEM-GRPC
+#COMMON_OPTIONS+=" --use-system-grpc" # build ok
+
+##=USE-SYSTEM-ICU
+## When enable the build fail
+#COMMON_OPTIONS+=" --use-system-icu" # build error
+#
+#
+
+##USE-SYSTEM-INTEL_DECIMAL128
+#COMMON_OPTIONS+=" --use-system-intel_decimal128"
+#
+#=USE-SYSTEM-PCRE2
+# build ok
+COMMON_OPTIONS+= --use-system-pcre
+
+## =USE-SYSTEM-PROTOBUF
+#COMMON_OPTIONS+=" --use-system-protobuf" # build ok
+
+#=USE-SYSTEM-SNAPPY
+COMMON_OPTIONS+= --use-system-snappy
+# build ok
+
+#=USE-SYSTEM-STEMMER
+COMMON_OPTIONS+= --use-system-stemmer
+# build ok
+
+
+##=USE-SYSTEM-LIBUNWIND
+#COMMON_OPTIONS+=" --use-system-libunwind"
+#
+
+#=USE-SYSTEM-VALGRIND
+COMMON_OPTIONS+= --use-system-valgrind
+# build ok
+
+
+##=USE-SYSTEM-WIREDTIGER
+## Implicit dependency `src/third_party/wiredtiger/libwiredtiger_checksum.so' not found, \
+## needed by target `/project/build-dir/opt/mongo/rpc/libmessage.so'
+## Newer version required
+#COMMON_OPTIONS+=" --use-system-wiredtiger" # build error 88.06 of build
+#
+#
+#=USE-SYSTEM-YAML
+COMMON_OPTIONS+= --use-system-yaml
+# build ok
+
+
+#=USE-SYSTEM-ZLIB
+COMMON_OPTIONS+= --use-system-zlib
+# build ok
+
+#=USE-SYSTEM-ZSTD
+COMMON_OPTIONS+= --use-system-zstd
+# build ok
+
+
+## =USE-SYSTEM-LIBBSON
+#COMMON_OPTIONS+=" --use-system-libbson"
+#
+## =USE-SYSTEM-LIBMONGOCRYPT
+#COMMON_OPTIONS+=" --use-system-libmongocrypt"
+#
+#COMMON_OPTIONS+=" --use-system-mongo-c=[on|off|auto]"
#
+# --use-system-all=USE-SYSTEM-ALL
+# --link-model=[auto|object|static|dynamic|dynamic-strict|dynamic-sdk]
+# --force-macos-dynamic-link Bypass link-model=dynamic check for macos versions
+
+#=USE-SYSTEM-TCMALLOC
+#COMMON_OPTIONS+=" --use-system-tcmalloc" # build ok
+
+#COMMON_OPTIONS="--allocator=system "
+#
+gperftools_archs = amd64 ppc64el arm64
+ifneq (,$(filter $(DEB_HOST_ARCH), $(gperftools_archs)))
+COMMON_OPTIONS += --allocator=tcmalloc
+else
+COMMON_OPTIONS += --allocator=system
+endif
+
# Wiredtiger does not build on 32-bit systems
#ifeq (32, $(DEB_HOST_ARCH_BITS))
#COMMON_OPTIONS += --wiredtiger=off
#endif
+#COMMON_OPTIONS+="CC=${CC}"
+#COMMON_OPTIONS+="CXX=${CXX}"
+
%:
dh $@
-#override_dh_auto_clean:
-# scons --keep-going --clean $(COMMON_OPTIONS) .
-# find $(CURDIR)/ -name "*.pyc" -delete
-# rm -rf $(CURDIR)/debian/tmp-test/
-# rm -rf $(CURDIR)/.scons/
-# rm -rf $(CURDIR)/build/
-#
-#override_dh_auto_build:
+override_dh_auto_clean:
+ /usr/bin/scons --keep-going --clean MONGO_VERSION=6.0.0 ${COMMON_OPTIONS} .
+ find $(CURDIR)/ -name "*.pyc" -delete
+ rm -rf $(CURDIR)/debian/tmp-test/
+ rm -rf $(CURDIR)/.scons/
+ rm -rf $(CURDIR)/build/
+
+override_dh_auto_build:
+ scons MONGO_VERSION=6.0.0 PREFIX=/usr VERBOSE=$(DH_VERBOSE) --release \
+ --build-dir=/project/build-dir/ \
+ ${COMMON_OPTIONS} \
+ install-mongos install-mongod #core tools
#ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
#override_dh_auto_test:
@@ -66,7 +165,11 @@ gperftools_archs = amd64 ppc64el arm64
#endif
override_dh_auto_install:
- scons MONGO_VERSION=6.0.0 VERBOSE=$(DH_VERBOSE) $(COMMON_OPTIONS) --build-dir=/build-dir/ PREFIX=/usr DESTDIR=debian/tmp/ install-all #core tools
+ scons MONGO_VERSION=6.0.0 VERBOSE=$(DH_VERBOSE) PREFIX=/usr --release \
+ DESTDIR=debian/tmp/ \
+ --build-dir=/project/build-dir/ \
+ $(COMMON_OPTIONS) \
+ install-mongos install-mongod #core tools
#scons MONGO_VERSION=6.0.0 $(COMMON_OPTIONS) DESTDIR=$(CURDIR)/debian/tmp/usr install
#--prefix=$(CURDIR)/debian/tmp/usr install
@@ -82,3 +185,6 @@ override_dh_missing:
#.PHONY: override_dh_auto_clean override_dh_auto_build \
# override_dh_auto_install override_dh_installinit \
# override_dh_installsystemd override_dh_missing
+
+
+