build-pkg: add version id to allow adding git tag

pull/1804/merge
Tony Theodore 5 years ago
parent ff7c9adc26
commit 1fdeda5c95

@ -29,6 +29,9 @@ MXE_BUILD_PKG_CODENAME. This sets the output directory and name
mangling for the pool directory in the apt repo. Could be used to mangling for the pool directory in the apt repo. Could be used to
create lowest-common-glibc based versions. create lowest-common-glibc based versions.
Set MXE_BUILD_PKG_VERSION_ID to add a git tag to each pkg version
string - defaults to YYYYMMDD build datestamp.
To switch off the second pass, set To switch off the second pass, set
MXE_BUILD_PKG_NO_SECOND_PASS to 1. MXE_BUILD_PKG_NO_SECOND_PASS to 1.
See https://github.com/mxe/mxe/issues/1111 See https://github.com/mxe/mxe/issues/1111
@ -83,7 +86,7 @@ local no_fakeroot = os.getenv('MXE_BUILD_PKG_NO_FAKEROOT')
local no_second_pass = os.getenv('MXE_BUILD_PKG_NO_SECOND_PASS') local no_second_pass = os.getenv('MXE_BUILD_PKG_NO_SECOND_PASS')
local build_targets = os.getenv('MXE_BUILD_PKG_TARGETS') local build_targets = os.getenv('MXE_BUILD_PKG_TARGETS')
local TODAY = os.date("%Y%m%d") local VERSION_ID = os.getenv('MXE_BUILD_PKG_VERSION_ID') or os.date("%Y%m%d")
local MAX_TRIES = 10 local MAX_TRIES = 10
@ -801,7 +804,7 @@ local function debianControl(options)
'\n' .. 'Recommends: ' .. '\n' .. 'Recommends: ' ..
table.concat(options.recommends, ', ') table.concat(options.recommends, ', ')
end end
local version = options.version .. '-' .. TODAY local version = options.version .. '-' .. VERSION_ID
return CONTROL:format( return CONTROL:format(
options.package, options.package,
version, version,

Loading…
Cancel
Save