For #542940: [meta] Support for downloading libraries via Composer and related issues we decided that we'll only support automated downloads for libraries for which the vendor provides a "latest stable" release download URL; e.g.

http://example.com/mylibrary/stable.tar.gz

In essence, Libraries API behaves exactly in the way it was designed for: Determine the actual version, decide whether that's supported, and if so proceed with loading/integration.

However, I could easily foresee cases in which a library's latest stable is compatible with, say, D7 only, but not D6. Easiest examples are probably PHP libraries; e.g., the latest stable might have been revamped/rewritten for PHP 5.3 (D8 only), and D7 and below need to grab an earlier version - or alternative latest stable download URL for PHP <5.3.

Thoughts, feedback, drinks?

Comments

Maybe providing "download" support for "versions" or "variants"? In the end though, it should be up to the module maintainer to define how automated downloading is handled.

<?php
 
// By default, get the latest in the 4.x branch.
 
$libraries['tinymce']['download']['url'] = 'http://tinymce.com/tinymce-4.3.tar.gz';
 
// Provide support for the 3.x branch though.
 
$libraries['tinymce']['versions']['3.8']['download']['url'] = 'http://tinymce.com/tinymce-3.8.tar.gz';
?>

Override which version is downloaded via:

  drush libraries-make tinymce --version 3.8

... Something along those lines?