[Buildroot] [PATCH 5/5] pkg-generic: tag sources if git is used
Jérôme Pouiller
jezz at sysmic.org
Thu Nov 19 10:36:06 UTC 2015
In order to simplify patch updating, tag original version of sources.
We may also provide a feature to automaticaly update patches in future.
Signed-off-by: Jérôme Pouiller <jezz at sysmic.org>
---
package/pkg-generic.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 30155a6..6d7677b 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -152,6 +152,12 @@ $(BUILD_DIR)/%/.stamp_patched:
@$(call step_start,patch)
@$(call MESSAGE,"Patching")
$(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep))
+ $(Q)( \
+ if test -d $(@D)/.git; then \
+ GIT_DIR=$(@D)/.git $(GIT) tag upstream; \
+ GIT_DIR=$(@D)/.git $(GIT) tag $(NAMEVER); \
+ fi; \
+ )
$(foreach p,$($(PKG)_PATCH),$(APPLY_PATCHES) $(@D) $(DL_DIR) $(notdir $(p))$(sep))
$(Q)( \
for D in $(PATCH_BASE_DIRS); do \
--
2.1.4
More information about the buildroot
mailing list