Skip to content

Commit 74af900

Browse files
authored
[build]: allow to use extra inc/lib location to build the package (sonic-net#595)
Signed-off-by: Guohan Lu <[email protected]>
1 parent 9b8c63e commit 74af900

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

debian/rules

+11-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
DPKG_EXPORT_BUILDFLAGS = 1
88
include /usr/share/dpkg/default.mk
99

10+
ifneq (${SWSS_COMMON_INC},)
11+
SWSS_COMMON_CONFIG = "--with-swss-common-inc=${SWSS_COMMON_INC}"
12+
endif
13+
14+
ifneq (${SWSS_COMMON_LIB},)
15+
SWSS_COMMON_CONFIG += "--with-swss-common-lib=${SWSS_COMMON_LIB}"
16+
LD_LIBRARY_PATH_CONFIG = LD_LIBRARY_PATH=${SWSS_COMMON_LIB}
17+
endif
18+
1019
# see FEATURE AREAS in dpkg-buildflags(1)
1120
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
1221

@@ -50,7 +59,7 @@ binary-syncd-vs:
5059

5160
override_dh_auto_configure:
5261
./autogen.sh
53-
dh_auto_configure -- $(shell cat /tmp/syncd-build)
62+
dh_auto_configure -- $(shell cat /tmp/syncd-build) ${SWSS_COMMON_CONFIG}
5463

5564
override_dh_install:
5665
dh_install
@@ -62,7 +71,7 @@ override_dh_installinit:
6271
dh_installinit --init-script=syncd
6372

6473
override_dh_shlibdeps:
65-
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
74+
$(LD_LIBRARY_PATH_CONFIG) dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
6675

6776
override_dh_strip:
6877
dh_strip -psyncd-rpc --dbg-package=syncd-rpc-dbg

0 commit comments

Comments
 (0)