luci_mk.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --- a/feeds/luci/luci.mk
  2. +++ b/feeds/luci/luci.mk
  3. @@ -82,7 +82,7 @@ define findrev
  4. set -- $$(git log -1 --format="%ct %h" --abbrev=7 -- $(if $(1),. ':(exclude)po',po)); \
  5. if [ -n "$$1" ]; then
  6. secs="$$(($$1 % 86400))"; \
  7. - yday="$$(date --utc --date="@$$1" "+%y.%j")"; \
  8. + yday="$$(date --utc --date="@$$(($$1 + 365*24*60*60))" "+%y.%j")"; \
  9. printf 'git-%s.%05d-%s' "$$yday" "$$secs" "$$2"; \
  10. else \
  11. echo "unknown"; \
  12. @@ -206,9 +206,14 @@ define Package/$(PKG_NAME)/install
  13. $(call Build/Install/Default) \
  14. $(CP) $(PKG_INSTALL_DIR)/* $(1)/; \
  15. else true; fi
  16. + $(INSTALL_DIR) $(1)$(LUCI_LIBRARYDIR)/i18n
  17. + $(foreach po,$(wildcard ${CURDIR}/po/zh_Hans/*.po), \
  18. + po2lmo $(po) \
  19. + $(1)$(LUCI_LIBRARYDIR)/i18n/$(basename $(notdir $(po))).zh-cn.lmo;)
  20. endef
  21. ifndef Package/$(PKG_NAME)/postinst
  22. +ifneq ($(wildcard ${CURDIR}/htdocs/luci-static/resources/view),)
  23. define Package/$(PKG_NAME)/postinst
  24. [ -n "$${IPKG_INSTROOT}" ] || { \
  25. rm -f /tmp/luci-indexcache
  26. @@ -217,7 +222,18 @@ define Package/$(PKG_NAME)/postinst
  27. exit 0
  28. }
  29. endef
  30. +else
  31. +define Package/$(PKG_NAME)/postinst
  32. +[ -n "$${IPKG_INSTROOT}" ] || {$(foreach script,$(LUCI_DEFAULTS),
  33. + (. /etc/uci-defaults/$(script)) && rm -f /etc/uci-defaults/$(script))
  34. + rm -f /tmp/luci-indexcache
  35. + rm -rf /tmp/luci-modulecache/
  36. + exit 0
  37. +}
  38. +endef
  39. endif
  40. +endif
  41. +
  42. # some generic macros that can be used by all packages
  43. ifeq ($(LUCI_MINIFY_JS),1)