Skip to content

Commit

Permalink
debian: set parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Mar 18, 2024
1 parent ad1b3ef commit 51f8879
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ PACKAGE_DIR = "debian/facerecognizer"
%:
dh $@

# dh_make generated override targets
# Debian 维护者指南: https://www.debian.org/doc/manuals/debmake-doc/index.zh-cn.html
# Debian 新维护者手册: https://www.debian.org/doc/manuals/maint-guide/dreq.zh-cn.html#rules
# See: man debhelper
# This is example for Cmake (See https://bugs.debian.org/641051 )
override_dh_auto_configure:
dh_auto_configure -B$(BUILD_DIR) -- \
Expand All @@ -68,13 +70,16 @@ override_dh_auto_configure:
${PARAS}

override_dh_auto_build:
dh_auto_build --parallel -B$(BUILD_DIR)
# dh_auto_build --parallel -B$(BUILD_DIR)
cmake --build $(BUILD_DIR) --config Release \
--parallel $(if "`cat /proc/cpuinfo |grep 'cpu cores' |wc -l`", `cat /proc/cpuinfo |grep 'cpu cores' |wc -l`, 1)

override_dh_auto_install:
cmake --install $(BUILD_DIR) --config Release --prefix $(PACKAGE_DIR)/opt/FaceRecognizer
cmake --install $(BUILD_DIR) --config Release \
--prefix $(PACKAGE_DIR)/opt/FaceRecognizer

override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l`pwd`/$(PACKAGE_DIR)/opt/FaceRecognizer/lib:`pwd`/$(PACKAGE_DIR)/opt/FaceRecognizer/lib/`uname -m`-linux-gnu:$(LIB_PARAS)
#override_dh_shlibdeps:
# dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l`pwd`/$(PACKAGE_DIR)/opt/FaceRecognizer/lib:`pwd`/$(PACKAGE_DIR)/opt/FaceRecognizer/lib/`uname -m`-linux-gnu:$(LIB_PARAS)

override_dh_builddeb:
dh_builddeb --package=facerecognizer -P$(PACKAGE_DIR)

0 comments on commit 51f8879

Please sign in to comment.