diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2015-10-25 20:01:53 (GMT) |
---|---|---|
committer | Boris Nagaev <bnagaev@gmail.com> | 2015-10-27 23:45:36 (GMT) |
commit | ac1543115b0e96154e01ae3e36e2598fe2deaf06 (patch) | |
tree | e18688395f55ec54d4143822d3457d56e6625ab3 | |
parent | 36cddeb56d32d2d332d4b59a2b991f5aa0792e19 (diff) | |
download | mxe-ac1543115b0e96154e01ae3e36e2598fe2deaf06.zip mxe-ac1543115b0e96154e01ae3e36e2598fe2deaf06.tar.gz mxe-ac1543115b0e96154e01ae3e36e2598fe2deaf06.tar.bz2 |
build-pkg: find build arch with dpkg-architecture
-rwxr-xr-x | tools/build-pkg.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua index 72f9bb4..84e5e5c 100755 --- a/tools/build-pkg.lua +++ b/tools/build-pkg.lua @@ -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("([^~]+)~([^~]+)") |