build-pkg: find build arch with dpkg-architecture

pull/959/head
Boris Nagaev 9 years ago
parent 36cddeb56d
commit ac1543115b

@ -35,8 +35,6 @@ How to remove them: http://stackoverflow.com/a/4262545
local max_items = tonumber(os.getenv('MXE_MAX_ITEMS'))
local no_debs = os.getenv('MXE_NO_DEBS')
local ARCH = 'amd64'
local MXE_DIR = os.getenv('MXE_DIR') or '/usr/lib/mxe'
local GIT = 'git --work-tree=./usr/ --git-dir=./usr/.git '
@ -163,6 +161,9 @@ local function isCross(target)
return target ~= NATIVE_TARGET
end
local cmd = "dpkg-architecture -qDEB_BUILD_ARCH 2> /dev/null"
local ARCH = trim(shell(cmd))
-- return target and package from item name
local function parseItem(item)
return item:match("([^~]+)~([^~]+)")

Loading…
Cancel
Save