2 # Copyright (C) 2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 # Substituted by SDK, do not remove
11 PKG_CONFIG_DEPENDS += \
12 CONFIG_VERSION_NUMBER \
17 VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
18 VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),$(REVISION))
20 VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
21 VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),Bleeding Edge)
23 VERSION_NICK:=$(call qstrip,$(CONFIG_VERSION_NICK))
24 VERSION_NICK:=$(if $(VERSION_NICK),$(VERSION_NICK),$(RELEASE))
26 VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
27 VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.openwrt.org/snapshots/trunk/%T/packages)
29 VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
30 VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
34 $(CONFIG_$(firstword $(subst :, ,$(subst +,,$(subst -,,$(1))))))
38 $(lastword $(subst :, ,$(1)))
41 VERSION_TAINT_SPECS := \
46 +BUSYBOX_CUSTOM:busybox \
48 VERSION_TAINTS := $(strip $(foreach taint,$(VERSION_TAINT_SPECS), \
49 $(if $(findstring +,$(taint)), \
50 $(if $(call taint2sym,$(taint)),$(call taint2name,$(taint))), \
51 $(if $(call taint2sym,$(taint)),,$(call taint2name,$(taint))) \
54 PKG_CONFIG_DEPENDS += $(foreach taint,$(VERSION_TAINT_SPECS),$(call taint2sym,$(taint)))
56 VERSION_SED:=$(SED) 's,%U,$(VERSION_REPO),g' \
57 -e 's,%V,$(VERSION_NUMBER),g' \
58 -e 's,%v,\L$(subst $(space),_,$(VERSION_NUMBER)),g' \
59 -e 's,%C,$(VERSION_CODE),g' \
60 -e 's,%c,\L$(subst $(space),_,$(VERSION_CODE)),g' \
61 -e 's,%N,$(VERSION_NICK),g' \
62 -e 's,%n,\L$(subst $(space),_,$(VERSION_NICK)),g' \
63 -e 's,%D,$(VERSION_DIST),g' \
64 -e 's,%d,\L$(subst $(space),_,$(VERSION_DIST)),g' \
65 -e 's,%R,$(REVISION),g' \
66 -e 's,%T,$(BOARD),g' \
67 -e 's,%S,$(BOARD)/$(if $(SUBTARGET),$(SUBTARGET),generic),g' \
68 -e 's,%t,$(VERSION_TAINTS),g' \