summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2015-07-06 20:31:33 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2015-07-10 07:32:46 (GMT)
commitab0f773a7eb1d71332f41c078aa18e26861abc7e (patch)
tree9778be32ad400eb572db089cfd6a3c1a1bddba7b /tools
parent689d0222db5de090592e2286688414615f6e6068 (diff)
downloadmxe-ab0f773a7eb1d71332f41c078aa18e26861abc7e.zip
mxe-ab0f773a7eb1d71332f41c078aa18e26861abc7e.tar.gz
mxe-ab0f773a7eb1d71332f41c078aa18e26861abc7e.tar.bz2
packages built by build-pkg.lua work on Wheezy
After commit b14c1a3a9c25cf99c004b42e1ed , packages could not be installed on Debian <= Wheezy, because it lacks package libtool-bin. So package mxe-requirements should depend on libtool-bin only for Debian >= Jessie. This commit changes the function that builds packages mxe-requirements. Now it makes 4 .deb files: wheezy/ mxe-requirements_2.23_i386.deb mxe-requirements_2.23_amd64.deb jessie/ mxe-requirements_2.23_i386.deb mxe-requirements_2.23_amd64.deb see #754
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build-pkg.lua18
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua
index 52f3269..935985f 100755
--- a/tools/build-pkg.lua
+++ b/tools/build-pkg.lua
@@ -11,8 +11,6 @@
-- Packages are written to `*.tar.xz` files.
-- Debian packages are written to `*.deb` files.
--- You also need Debian Jessie or later to install these packages
-
local max_packages = tonumber(os.getenv('MXE_MAX_PACKAGES'))
local MXE_DIR = '/usr/lib/mxe'
@@ -314,7 +312,7 @@ Description: MXE requirements package
Other MXE packages depend on this package.
]]
-local function makeMxeRequirementsDeb(arch)
+local function makeMxeRequirementsDeb(arch, release)
local name = 'mxe-requirements'
local ver = getMxeVersion()
-- dependencies
@@ -322,7 +320,6 @@ local function makeMxeRequirementsDeb(arch)
'autoconf', 'automake', 'autopoint', 'bash', 'bison',
'bzip2', 'cmake', 'flex', 'gettext', 'git', 'g++',
'gperf', 'intltool', 'libffi-dev', 'libtool',
- 'libtool-bin',
'libltdl-dev', 'libssl-dev', 'libxml-parser-perl',
'make', 'openssl', 'patch', 'perl', 'p7zip-full',
'pkg-config', 'python', 'ruby', 'scons', 'sed',
@@ -332,9 +329,14 @@ local function makeMxeRequirementsDeb(arch)
table.insert(deps, 'g++-multilib')
table.insert(deps, 'libc6-dev-i386')
end
+ if release ~= 'wheezy' then
+ -- Jessie+
+ table.insert(deps, 'libtool-bin')
+ end
local deps_str = table.concat(deps, ', ')
-- directory
- local dirname = ('%s_%s_%s'):format(name, ver, arch)
+ local DIRNAME = '%s/%s_%s_%s'
+ local dirname = DIRNAME:format(release, name, ver, arch)
-- make DEBIAN/control file
os.execute(('mkdir -p %s/DEBIAN'):format(dirname))
local control_fname = dirname .. '/DEBIAN/control'
@@ -355,5 +357,7 @@ buildForTarget('i686-w64-mingw32.static')
buildForTarget('x86_64-w64-mingw32.static')
buildForTarget('i686-w64-mingw32.shared')
buildForTarget('x86_64-w64-mingw32.shared')
-makeMxeRequirementsDeb('i386')
-makeMxeRequirementsDeb('amd64')
+makeMxeRequirementsDeb('i386', 'wheezy')
+makeMxeRequirementsDeb('i386', 'jessie')
+makeMxeRequirementsDeb('amd64', 'wheezy')
+makeMxeRequirementsDeb('amd64', 'jessie')