openwrt/include
Jo-Philipp Wich 5f3c96c285 build: adjust version number handling
Move the revision info to the VERSION_CODE variable and default VERSION_NUMBER
to CURRENT for master branch builds.

Also introduce a new menuconfig option CONFIG_VERSION_CODE which allows users
to override the revision value put into VERSION_CODE and adjust the template
files used by the base-files package to accomodate for the changed semantics.

While we're at it, also adjust the various URLs to match the current web site.

After this commit, the relevent files will look like the examples given below:

    # cat /etc/openwrt_version
    r2398+1

    # cat /etc/openwrt_release
    DISTRIB_ID='LEDE'
    DISTRIB_RELEASE='CURRENT'
    DISTRIB_REVISION='r2398+1'
    DISTRIB_CODENAME='reboot'
    DISTRIB_TARGET='x86/64'
    DISTRIB_DESCRIPTION='LEDE Reboot CURRENT r2398+1'
    DISTRIB_TAINTS='no-all override'

    # cat /usr/lib/os-release
    NAME="LEDE"
    VERSION="CURRENT, Reboot"
    ID="lede"
    ID_LIKE="lede openwrt"
    PRETTY_NAME="LEDE Reboot CURRENT"
    VERSION_ID="current"
    HOME_URL="http://lede-project.org/"
    BUG_URL="http://bugs.lede-project.org/"
    SUPPORT_URL="http://forum.lede-project.org/"
    BUILD_ID="r2398+1"
    LEDE_BOARD="x86/64"
    LEDE_TAINTS="no-all override"
    LEDE_DEVICE_MANUFACTURER="LEDE"
    LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
    LEDE_DEVICE_PRODUCT="Generic"
    LEDE_DEVICE_REVISION="v0"
    LEDE_RELEASE="LEDE Reboot CURRENT r2398+1"

On a release branch, those files would look like:

    # cat /etc/openwrt_version
    r2399

    # cat /etc/openwrt_release
    DISTRIB_ID='LEDE'
    DISTRIB_RELEASE='16.12-CURRENT'
    DISTRIB_REVISION='r2399'
    DISTRIB_CODENAME='test_release'
    DISTRIB_TARGET='x86/64'
    DISTRIB_DESCRIPTION='LEDE Test Release 16.12-CURRENT r2399'
    DISTRIB_TAINTS='no-all override'

    # cat /usr/lib/os-release
    NAME="LEDE"
    VERSION="16.12-CURRENT, Test Release"
    ID="lede"
    ID_LIKE="lede openwrt"
    PRETTY_NAME="LEDE Test Release 16.12-CURRENT"
    VERSION_ID="16.12-current"
    HOME_URL="http://lede-project.org/"
    BUG_URL="http://bugs.lede-project.org/"
    SUPPORT_URL="http://forum.lede-project.org/"
    BUILD_ID="r2399"
    LEDE_BOARD="x86/64"
    LEDE_TAINTS="no-all override"
    LEDE_DEVICE_MANUFACTURER="LEDE"
    LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
    LEDE_DEVICE_PRODUCT="Generic"
    LEDE_DEVICE_REVISION="v0"
    LEDE_RELEASE="LEDE Test Release 16.12-CURRENT r2399"

On a release tag, those files would look like:

    # cat /etc/openwrt_version
    r2500

    # cat /etc/openwrt_release
    DISTRIB_ID='LEDE'
    DISTRIB_RELEASE='17.02.1'
    DISTRIB_REVISION='r2500'
    DISTRIB_CODENAME='mighty_unicorn'
    DISTRIB_TARGET='x86/64'
    DISTRIB_DESCRIPTION='LEDE Mighty Unicorn 17.02.1 r2500'
    DISTRIB_TAINTS='no-all override'

    # cat /usr/lib/os-release
    NAME="LEDE"
    VERSION="17.02.1, Mighty Unicorn"
    ID="lede"
    ID_LIKE="lede openwrt"
    PRETTY_NAME="LEDE Mighty Unicorn 17.02.1"
    VERSION_ID="17.02.1"
    HOME_URL="http://lede-project.org/"
    BUG_URL="http://bugs.lede-project.org/"
    SUPPORT_URL="http://forum.lede-project.org/"
    BUILD_ID="r2500"
    LEDE_BOARD="x86/64"
    LEDE_TAINTS="no-all override"
    LEDE_DEVICE_MANUFACTURER="LEDE"
    LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
    LEDE_DEVICE_PRODUCT="Generic"
    LEDE_DEVICE_REVISION="v0"
    LEDE_RELEASE="LEDE Mighty Unicorn 17.02.1 r2500"

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Acked-by: Felix Fietkau <nbd@nbd.name>
2016-12-02 16:02:02 +01:00
..
site toolchain: add support of ARC architecture 2015-11-10 12:03:59 +00:00
autotools.mk autotools: use correct version for gettext FIXUP 2016-10-13 20:25:42 +02:00
cmake.mk build: use CXXFLAGS if defined 2016-10-13 17:04:43 +02:00
debug.mk
depends.mk build: find_md5: ignore non-existent files or directories 2016-11-24 12:53:19 +01:00
device_table.txt
download.mk include/download.mk: Use -7e compression instead of -6 by default 2016-10-05 15:15:19 +02:00
feeds.mk build: remove stale .ipk files if package dir changes 2016-11-08 10:49:51 +01:00
hardening.mk
host-build.mk include/host-build.mk: use STAGING_DIR_HOSTPKG 2016-11-01 12:11:14 +01:00
host.mk
image-commands.mk build: add support code for appending metadata to images 2016-11-19 11:24:10 +01:00
image-legacy.mk image: don't modify file permissions before rootfs generation 2016-09-26 17:57:56 +02:00
image.mk build: add support code for appending metadata to images 2016-11-19 11:24:10 +01:00
kernel-build.mk build: fix regression on running make kernel_menuconfig 2016-10-04 17:51:49 +02:00
kernel-defaults.mk kernel: add STAGING_DIR_HOST/lib to host library search path 2016-09-29 13:35:11 +02:00
kernel-version.mk kernel: bump to 4.4.35 2016-11-29 21:12:08 +01:00
kernel.mk kernel: make the kernel build auto-clean the build dir like package builds 2016-08-05 14:17:08 +02:00
netfilter.mk netfilter: fix file conflicts between kmod-ipt- and kmod-nft- packages 2016-09-30 23:32:05 +02:00
nls.mk
package-bin.mk
package-defaults.mk build: copy contents of 'src' folder to build dirs (if present) 2016-10-15 11:36:51 +02:00
package-dumpinfo.mk include: fix nonshared flag handling 2016-04-15 10:26:36 +02:00
package-ipkg.mk build: remove stale .ipk files if package dir changes 2016-11-08 10:49:51 +01:00
package-seccomp.mk
package.mk build: fix cleaning configured stamp file 2016-10-15 11:36:51 +02:00
prereq-build.mk include: prereq-build.mk: improve gcp check 2016-10-11 10:07:25 +02:00
prereq.mk
quilt.mk kernel: make the kernel build auto-clean the build dir like package builds 2016-08-05 14:17:08 +02:00
rootfs.mk build: remove stale .ipk files if package dir changes 2016-11-08 10:49:51 +01:00
scan.awk
scan.mk build: scan.mk: remove not used variable SCAN_STAMP 2016-11-24 12:53:18 +01:00
scons.mk build: use CXXFLAGS if defined 2016-10-13 17:04:43 +02:00
shell.sh
subdir.mk build: add logging for package host builds 2016-01-20 21:31:56 +00:00
target.mk include: Cortex-A53 is also an AArch64 CPU 2016-11-04 13:11:00 +01:00
toolchain-build.mk
toplevel.mk docs: remove all refrences in Makefiles/scripts 2016-11-30 10:13:14 +01:00
uclibc++.mk
unpack.mk
verbose.mk
version.mk build: adjust version number handling 2016-12-02 16:02:02 +01:00