diff --git a/manifests/sdk.pp b/manifests/sdk.pp index d0cffe0..cfa83cb 100644 --- a/manifests/sdk.pp +++ b/manifests/sdk.pp @@ -21,10 +21,13 @@ case $::kernel { 'Linux': { - $unpack_command = "/bin/tar -xvf ${android::paths::archive} --no-same-owner --no-same-permissions && chmod -R a+rx ${android::paths::sdk_home}" + $unpack_command = "/bin/tar -xvf ${android::paths::archive} \ +--no-same-owner --no-same-permissions && \ +chmod -R a+rx ${android::paths::sdk_home}" } 'Darwin': { - $unpack_command = "/usr/bin/unzip ${android::paths::archive} && chmod -R a+rx ${android::paths::sdk_home}" + $unpack_command = "/usr/bin/unzip ${android::paths::archive} && \ +chmod -R a+rx ${android::paths::sdk_home}" } default: { fail("Unsupported Kernel: ${::kernel} operatingsystem: ${::operatingsystem}") @@ -55,16 +58,18 @@ # For 64bit systems, we need to install some 32bit libraries for the SDK # to work. - if ($::kernel == 'Linux') and ($::architecture == 'x86_64' or $::architecture == 'amd64') and $::lsbdistrelease != '14.04' { - ensure_packages($::osfamily ? { - # list 64-bit version and use latest for installation too so that the same version is applied to both - 'RedHat' => ['glibc.i686','zlib.i686','libstdc++.i686','zlib','libstdc++'], - 'Debian' => ['ia32-libs'], - default => [], - }) - } - if $::lsbdistrelease == '14.04' { - ensure_packages(['libc6-i386', 'lib32stdc++6', 'lib32gcc1', 'lib32ncurses5', 'lib32z1']) + if ($::kernel == 'Linux') and ($::architecture == 'x86_64' or $::architecture == 'amd64') { + $lsbdistrelease_major = inline_template('<%= @lsbdistrelease.to_i %>') + 0 + if $::lsbdistcodename == 'jessie' or $lsbdistrelease_major >= 14 { + ensure_packages(['libc6-i386', 'lib32stdc++6', 'lib32gcc1', 'lib32ncurses5', 'lib32z1']) + } else { + ensure_packages($::osfamily ? { + # list 64-bit version and use latest for installation too so that the same version is applied to both + 'RedHat' => ['glibc.i686','zlib.i686','libstdc++.i686','zlib','libstdc++'], + 'Debian' => ['ia32-libs'], + default => [], + }) + } } }