[OpenWrt-Devel] [PATCH 08/13] package/Makefile: override opkg installation time when SOURCE_DATE_EPOCH set

Alexander Couzens lynxis at fe80.eu
Mon Jan 25 15:49:30 EST 2016


Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 package/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/Makefile b/package/Makefile
index 12bd0ae..0c93607 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -7,6 +7,8 @@
 
 curdir:=package
 
+SOURCE_DATE_EPOCH:=$(shell $(TOPDIR)/scripts/getsource_date_epoch.sh)
+
 include $(INCLUDE_DIR)/feeds.mk
 
 -include $(TMP_DIR)/.packagedeps
@@ -117,6 +119,7 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install
 			IPKG_INSTROOT=$(TARGET_DIR) $$(which bash) ./etc/rc.common $$script enable; \
 		done || true \
 	)
+	$(if $(SOURCE_DATE_EPOCH),sed -i "s/Installed-Time: .*/Installed-Time: $(SOURCE_DATE_EPOCH)/" $(TARGET_DIR)/usr/lib/opkg/status)
 	@-find $(TARGET_DIR) -name CVS   | $(XARGS) rm -rf
 	@-find $(TARGET_DIR) -name .svn  | $(XARGS) rm -rf
 	@-find $(TARGET_DIR) -name '.#*' | $(XARGS) rm -f
-- 
2.7.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list