PKG_NAME?=$(LUCI_NAME)
-PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \
- if svn info >/dev/null 2>/dev/null; then \
- revision="svn-r$$(LC_ALL=C svn info | sed -ne 's/^Revision: //p')"; \
- elif git log -1 >/dev/null 2>/dev/null; then \
- revision="svn-r$$(LC_ALL=C git log -1 | sed -ne 's/.*git-svn-id: .*@\([0-9]\+\) .*/\1/p')"; \
- if [ "$$revision" = "svn-r" ]; then \
- set -- $$(git log -1 --format="%ct %h" --abbrev=7); \
- secs="$$(($$1 % 86400))"; \
- yday="$$(date --utc --date="@$$1" "+%y.%j")"; \
- revision="$$(printf 'git-%s.%05d-%s' "$$yday" "$$secs" "$$2")"; \
- fi; \
- else \
- revision="unknown"; \
- fi; \
- echo "$$revision" \
+PKG_PO_VERSION?=$(if $(DUMP),x,$(strip $(shell \
+ set -- $$(git log -1 --format="%ct %h" --abbrev=7 -- po); \
+ secs="$$(($$1 % 86400))"; \
+ yday="$$(date --utc --date="@$$1" "+%y.%j")"; \
+ printf 'git-%s.%05d-%s' "$$yday" "$$secs" "$$2" \
+)))
+
+PKG_SRC_VERSION?=$(if $(DUMP),x,$(strip $(shell \
+ set -- $$(git log -1 --format="%ct %h" --abbrev=7 -- . ':(exclude)po'); \
+ secs="$$(($$1 % 86400))"; \
+ yday="$$(date --utc --date="@$$1" "+%y.%j")"; \
+ printf 'git-%s.%05d-%s' "$$yday" "$$secs" "$$2" \
)))
PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \
SUBMENU:=$(if $(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.app))
TITLE:=$(if $(LUCI_TITLE),$(LUCI_TITLE),LuCI $(LUCI_NAME) $(LUCI_TYPE))
DEPENDS:=$(LUCI_DEPENDS)
+ VERSION:=$(PKG_SRC_VERSION)
$(if $(LUCI_EXTRA_DEPENDS),EXTRA_DEPENDS:=$(LUCI_EXTRA_DEPENDS))
$(if $(LUCI_PKGARCH),PKGARCH:=$(LUCI_PKGARCH))
endef
else true; fi
endef
-ifneq ($(LUCI_DEFAULTS),)
+ifndef Package/$(PKG_NAME)/postinst
define Package/$(PKG_NAME)/postinst
[ -n "$${IPKG_INSTROOT}" ] || {$(foreach script,$(LUCI_DEFAULTS),
(. /etc/uci-defaults/$(script)) && rm -f /etc/uci-defaults/$(script))
rm -f /tmp/luci-indexcache
rm -rf /tmp/luci-modulecache/
+ killall -HUP rpcd 2>/dev/null
exit 0
}
endef
-else
-ifndef Package/$(PKG_NAME)/postinst
-define Package/$(PKG_NAME)/postinst
-[ -n "$${IPKG_INSTROOT}" ] || {
- rm -f /tmp/luci-indexcache
- rm -rf /tmp/luci-modulecache/
- exit 0
-}
-endef
-endif
endif
HIDDEN:=1
DEFAULT:=LUCI_LANG_$(2)||(ALL&&m)
DEPENDS:=$(PKG_NAME)
+ VERSION:=$(PKG_PO_VERSION)
PKGARCH:=all
endef