[build]: support submodule patching for SONIC_DPKG_DEBS (#619)

This commit is contained in:
lguohan 2017-05-22 01:08:16 -07:00 committed by GitHub
parent 70b282aa88
commit ef980151ae

View File

@ -171,10 +171,14 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_DPKG_DEBS)) : $(DEBS_PATH)/% : .platform $$(a
$(HEADER) $(HEADER)
# Build project and take package # Build project and take package
rm -f $($*_SRC_PATH)/debian/*.debhelper.log rm -f $($*_SRC_PATH)/debian/*.debhelper.log
# apply series of patches if exist
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && QUILT_PATCHES=../$(notdir $($*_SRC_PATH)).patch quilt push -a; popd; fi
pushd $($*_SRC_PATH) $(LOG) pushd $($*_SRC_PATH) $(LOG)
[ ! -f ./autogen.sh ] || ./autogen.sh $(LOG) [ ! -f ./autogen.sh ] || ./autogen.sh $(LOG)
dpkg-buildpackage -rfakeroot -b -us -uc $(LOG) dpkg-buildpackage -rfakeroot -b -us -uc $(LOG)
popd $(LOG) popd $(LOG)
# clean up
if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; popd; fi
mv $(addprefix $($*_SRC_PATH)/../, $* $($*_DERIVED_DEBS) $($*_EXTRA_DEBS)) $(DEBS_PATH) $(LOG) mv $(addprefix $($*_SRC_PATH)/../, $* $($*_DERIVED_DEBS) $($*_EXTRA_DEBS)) $(DEBS_PATH) $(LOG)
$(FOOTER) $(FOOTER)