if (isset($t_prerelease)) { $s = "v1.3 pre-release"; $fp = fopen("downloads/latest_snapshot.txt", "r"); $v = fgets($fp); fclose($fp); $v = substr($v, 0, strlen($v) - 1); $name = "plpa-{$v}.tar"; $t_prerelease->addFile($s, "{$name}.bz2", $md5["{$name}.bz2"], $sha1["{$name}.bz2"]); $t_prerelease->addFile($s, "{$name}.gz", $md5["{$name}.gz"], $sha1["{$name}.gz"]); } ############################################################################# # # Older releases # ############################################################################# $t_older = new downloadTable("./downloads", "./downloads", dirname($_SERVER["PHP_SELF"])); if (isset($t_older)) { $ver = "1.3.1"; $src = "Version {$ver}"; $name = "plpa-{$ver}.tar"; $t_older->addFile($src, "{$name}.bz2", $md5["{$name}.bz2"], $sha1["{$name}.bz2"]); $t_older->addFile($src, "{$name}.gz", $md5["{$name}.gz"], $sha1["{$name}.gz"]); $ver = "1.3"; $src = "Version {$ver}"; $name = "plpa-{$ver}.tar"; $t_older->addFile($src, "{$name}.bz2", $md5["{$name}.bz2"], $sha1["{$name}.bz2"]); $t_older->addFile($src, "{$name}.gz", $md5["{$name}.gz"], $sha1["{$name}.gz"]); } ############################################################################# # # Main display part of the page
<?php $topdir = "../../.."; include_once "{$topdir}/software/ompi/v1.0/version.inc"; $title = "Open MPI: Version {$ver_v1_0}"; include_once "{$topdir}/software/ompi/nav.inc"; include_once "{$topdir}/includes/header.inc"; include_once "{$topdir}/includes/downloads.inc"; $md5 = read_checksums("downloads/md5sums.txt"); $sha1 = read_checksums("downloads/sha1sums.txt"); ############################################################################# $t = new downloadTable("./downloads", "./downloads", dirname($_SERVER["PHP_SELF"])); $src = "v{$ver_v1_0} (stable) source code (<a href=\"srpm.php\">SRPM notes</a>)"; $name = "openmpi-{$ver_v1_0}.tar"; $t->addFile($src, "{$name}.bz2", $md5["{$name}.bz2"], $sha1["{$name}.bz2"]); $t->addFile($src, "{$name}.gz", $md5["{$name}.gz"], $sha1["{$name}.gz"]); $name = "openmpi-{$ver_v1_0}-1.src.rpm"; $t->addFile($src, $name, $md5[$name], $sha1[$name]); # No release candidates at the moment #$s = "v1.0.2 (pending) alpha"; #$fp = fopen("downloads/latest_snapshot.txt", "r"); #$v = fgets($fp); #fclose($fp); #$v = substr($v, 0, strlen($v) - 1); # #$t->addFile($s, "openmpi-$v.tar.bz2", # $md5["openmpi-$v.tar.bz2"], # $sha1["openmpi-$v.tar.bz2"]); #$t->addFile($s, "openmpi-$v.tar.gz", # $md5["openmpi-$v.tar.gz"], # $sha1["openmpi-$v.tar.gz"]);
foreach ($names as $key => $n) { if (file_exists("downloads/{$n}")) { $t_prerelease->addFile($s, $n, $md5[$n], $sha1[$n]); $found = 1; } } if (!$found) { unset($t_prerelease); } } ############################################################################# # # Older releases # ############################################################################# $t_older = new downloadTable("./downloads", "./downloads", dirname($_SERVER["PHP_SELF"]), 0); if (isset($t_older)) { $versions = array("1.5.1", "1.5"); foreach ($versions as $key => $ver) { $src = "Version {$ver}"; $names = array("hwloc-{$ver}.tar.gz", "hwloc-{$ver}.tar.bz2", "hwloc-win32-build-{$ver}.zip", "hwloc-win64-build-{$ver}.zip"); foreach ($names as $key => $n) { if (file_exists("downloads/{$n}")) { $t_older->addFile($src, $n, $md5[$n], $sha1[$n]); } } } } ############################################################################# # # Main display part of the page
$n = array(); $n[] = "openmpi-{$v}.tar.bz2"; $n[] = "openmpi-{$v}.tar.gz"; $n[] = "openmpi-{$v}-1.src.rpm"; foreach ($n as $name) { if (file_exists("downloads/{$name}")) { $t_prerelease->addFile($s, $name, $md5[$name], $sha1[$name]); } } } ############################################################################# # # Older releases # ############################################################################# $t_older = new downloadTable("./downloads", "./downloads", dirname($_SERVER["PHP_SELF"])); if (isset($t_older)) { $versions = array(); $versions[] = "1.10.0"; foreach ($versions as $v) { $n = array(); $n[] = "openmpi-{$v}.tar.bz2"; $n[] = "openmpi-{$v}.tar.gz"; $n[] = "openmpi-{$v}-1.src.rpm"; $s = "Version {$v}<br>{$notes}"; foreach ($n as $name) { if (file_exists("downloads/{$name}")) { $t_older->addFile($s, $name, $md5[$name], $sha1[$name]); } } }
print "<p>No nightly tarballs available.</p>\n"; } else { $latest = trim(fgets($f, 4096)); fclose($f); ?> <p>Latest snapshot version: <strong><?php print $latest; ?> </strong></p> <div align=center> <?php $md5 = read_checksums("md5sums.txt"); $sha1 = read_checksums("sha1sums.txt"); $t = new downloadTable($dir, "."); uksort($md5, callback); uksort($sha1, callback); foreach ($md5 as $file => $md5sum) { if ($file) { $t->addFile("Nightly snapshot", $file, $md5sum, $sha1[$file]); } } $t->printMe(); print "</div>\n\n"; } # Do a reverse comparison so that we get the highest numbered tarball # first. Parse out the git sequence number and sort numerically (not # lexigraphically). function callback($a, $b) {
print "<p>No nightly tarballs available.</p>\n"; } else { $latest = trim(fgets($f, 4096)); fclose($f); ?> <p>Latest snapshot version: <strong><?php print $latest; ?> </strong></p> <div align=center> <?php $md5 = read_checksums("md5sums.txt"); $sha1 = read_checksums("sha1sums.txt"); $t = new downloadTable($dir, "."); uksort($md5, callback); uksort($sha1, callback); foreach ($md5 as $file => $md5sum) { if ($file) { $t->addFile("Source code", $file, $md5sum, $sha1[$file]); } } $t->printMe(); print "</div>\n\n"; } # Do a reverse comparison so that we get the highest numbered tarball first function callback($a, $b) { if ($a < $b) { return 1;
<?php $topdir = "../../.."; include_once "{$topdir}/software/hwloc/v1.11/version.inc"; $title = "Portable Hardware Locality (hwloc): Version {$ver_v1_11}"; include_once "{$topdir}/projects/hwloc/nav.inc"; include_once "{$topdir}/includes/header.inc"; include_once "{$topdir}/includes/downloads.inc"; $md5 = read_checksums("downloads/md5sums.txt"); $sha1 = read_checksums("downloads/sha1sums.txt"); ############################################################################# # # Current stable release # ############################################################################# $t_stable = new downloadTable("./downloads", "./downloads", dirname($_SERVER["PHP_SELF"]), 0); if (isset($t_stable)) { $src = "Version {$ver_v1_11}"; $names = array("hwloc-{$ver_v1_11}.tar.gz", "hwloc-{$ver_v1_11}.tar.bz2", "hwloc-win32-build-{$ver_v1_11}.zip", "hwloc-win64-build-{$ver_v1_11}.zip"); foreach ($names as $key => $n) { if (file_exists("downloads/{$n}")) { $t_stable->addFile($src, $n, $md5[$n], $sha1[$n]); } } } ############################################################################# # # Prereleases # ############################################################################# # See if there's a snapshot file that does not have any letters in its
# # Prereleases # ############################################################################# # See if there's a snapshot file that does not have any letters in its # version number (i.e., is not a stable release) and has a # corresponding .tar.bz2 file or .tar.gz here in the downloads # directory. $fp = fopen("downloads/latest_snapshot.txt", "r"); $v = fgets($fp); fclose($fp); if (strlen($v) > 0) { $v = substr($v, 0, strlen($v) - 1); } if (preg_match("/[a-z]/i", $v) && (file_exists("downloads/openmpi-{$v}.tar.bz2") || file_exists("downloads/openmpi-{$v}.tar.gz") || file_exists("downloads/openmpi-{$v}-1.src.rpm"))) { $t_prerelease = new downloadTable("./downloads", "./downloads", dirname($_SERVER["PHP_SELF"])); $s = "{$v} (pre-release)<br>{$notes}"; $n = array(); $n[] = "openmpi-{$v}.tar.bz2"; $n[] = "openmpi-{$v}.tar.gz"; $n[] = "openmpi-{$v}-1.src.rpm"; foreach ($n as $name) { if (file_exists("downloads/{$name}")) { $t_prerelease->addFile($s, $name, $md5[$name], $sha1[$name]); } } } ############################################################################# # # Older releases #
$md5 = read_checksums("downloads/md5sums.txt"); $sha1 = read_checksums("downloads/sha1sums.txt"); include_once "{$topdir}/includes/header.inc"; $t_stable = new downloadTable("./downloads", "./downloads", dirname($_SERVER["PHP_SELF"])); if ($ver_stable) { $src = "v{$ver_stable} (stable) source code"; $t_stable->addFile($src, "plpa-{$ver_stable}.tar.bz2", $md5["plpa-{$ver_stable}.tar.bz2"], $sha1["plpa-{$ver_stable}.tar.bz2"]); $t_stable->addFile($src, "plpa-{$ver_stable}.tar.gz", $md5["plpa-{$ver_stable}.tar.gz"], $sha1["plpa-{$ver_stable}.tar.gz"]); } if ($ver_devel) { $src = "v{$ver_devel} (development) source code"; $t_stable->addFile($src, "plpa-{$ver_devel}.tar.bz2", $md5["plpa-{$ver_devel}.tar.bz2"], $sha1["plpa-{$ver_devel}.tar.bz2"]); $t_stable->addFile($src, "plpa-{$ver_devel}.tar.gz", $md5["plpa-{$ver_devel}.tar.gz"], $sha1["plpa-{$ver_devel}.tar.gz"]); } ############################################################################# $t_prerelease = new downloadTable("./downloads", "./downloads", dirname($_SERVER["PHP_SELF"])); if (isset($t_prerelease)) { $s = "v1.1 pre-release<br />"; $fp = fopen("downloads/latest_snapshot.txt", "r"); $v = fgets($fp); fclose($fp); $v = substr($v, 0, strlen($v) - 1); $name = "plpa-{$v}.tar"; $t_prerelease->addFile($s, "{$name}.bz2", $md5["{$name}.bz2"], $sha1["{$name}.bz2"]); $t_prerelease->addFile($s, "{$name}.gz", $md5["{$name}.gz"], $sha1["{$name}.gz"]); } ############################################################################# ?> <p>The following releases are now available:</p>