case "$(pypy_architecture 2>/dev/null || true)" in
"linux" )
  if require_distro "Ubuntu 14.04" 1>/dev/null 2>&1; then
    install_package "pypy2-v5.8.0-linux32" "https://downloads.python.org/pypy/pypy2-v5.8.0-linux32.tar.bz2#a0b125a5781f7e5ddfc3baca46503b14f4ee6a0e234e8d72bfcf3afdf4120bef" "pypy" verify_py27 ensurepip
  fi
  ;;
"linux-armel" )
  require_distro "Ubuntu 12.04" || true
  install_package "pypy2-v5.8.0-linux-armel" "https://downloads.python.org/pypy/pypy2-v5.8.0-linux-armel.tar.bz2#28b7fd0cc7418ffc66c71520728e87941be40ebf4b82675c57e25598a2a702b0" "pypy" verify_py27 ensurepip
  ;;
"linux-armhf" )
  if [[ "$(cat /etc/issue 2>/dev/null || true)" == "Raspbian"* ]]; then
    install_package "pypy2-v5.8.0-linux-armhf-raspbian" "https://downloads.python.org/pypy/pypy2-v5.8.0-linux-armhf-raspbian.tar.bz2#da58279a0e3706889fc0df06087cea08f8cfd22322139fe9bae73ef9b2d119b7" "pypy" verify_py27 ensurepip
  else
    require_distro "Ubuntu 13.04" || true
    install_package "pypy2-v5.8.0-linux-armhf-raring" "https://downloads.python.org/pypy/pypy2-v5.8.0-linux-armhf-raring.tar.bz2#ddceca9c5c9a456d4bf1beab177660adffbbdf255a922244e1cc05f20318be46" "pypy" verify_py27 ensurepip
  fi
  ;;
"linux64" )
  if require_distro "Ubuntu 14.04" 1>/dev/null 2>&1; then
    install_package "pypy2-v5.8.0-linux64" "https://downloads.python.org/pypy/pypy2-v5.8.0-linux64.tar.bz2#6274292d0e954a2609b15978cde6efa30942ba20aa5d2acbbf1c70c0a54e9b1e" "pypy" verify_py27 ensurepip
  else
    install_package "pypy-5.8-linux_x86_64-portable" "https://bitbucket-archive.softwareheritage.org/static/14/140b7b14-aa94-424e-b191-9cd3438381f7/attachments/pypy-5.8-1-linux_x86_64-portable.tar.bz2#52556230af5769c656173ae8a1bdcb2e16aef46e3993ed89f3aec3d220aec862" "pypy" verify_py27 ensurepip
  fi
  ;;
"osx64" )
  install_package "pypy2-v5.8.0-osx64" "https://downloads.python.org/pypy/pypy2-v5.8.0-osx64.tar.bz2#04b61d1cf13aaca6d0420e854c820b8bd049dc88be16c02542abe8ca26eb075c" "pypy" verify_py27 ensurepip
  ;;
"win32" )
  # FIXME: never tested on Windows
  install_zip "pypy2-v5.8.0-win32" "https://downloads.python.org/pypy/pypy2-v5.8.0-win32.zip#43d6217653e5bdc09e3ff8cb56fb52c4eb019429063d80107be4e88eef79ea8d" "pypy" verify_py27 ensurepip
  ;;
* )
  { echo
    colorize 1 "ERROR"
    echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
    echo "try 'pypy2.7-5.8.0-src' to build from source."
    echo
  } >&2
  exit 1
  ;;
esac
