build-pkg: find build arch with dpkg-architecture

This commit is contained in:
Boris Nagaev 2015-10-25 21:01:53 +01:00
parent 36cddeb56d
commit ac1543115b
1 changed files with 3 additions and 2 deletions

View File

@ -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("([^~]+)~([^~]+)")