Subversion Repositories SvarDOS

Rev

Rev 910 | Rev 1512 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
188 mateuszvis 1
<h1>SvarDOS repository</h1>
285 mateuszvis 2
<p class="copyr">"the world of packages"</p>
188 mateuszvis 3
 
4
<p>This page lists all packages that are available in the SvarDOS repository. These packages can be downloaded from within SvarDOS using the pkgnet tool, or you can download them from here.</p>
5
 
1268 mateusz.vi 6
<!-- <p>If you wish to receive notifications about new or updated packages, you may subscribe to the <a href="http://svn.svardos.org/rss.php?repname=SvarDOS&path=%2Fpackages%2F">SvarDOS Packages RSS feed</a>.</p>-->
896 bttr 7
 
188 mateuszvis 8
<?php
910 mateusz.vi 9
  // load the category list
10
  $cats = json_decode(file_get_contents('../packages/_cats.json'), true);
11
  sort($cats);
188 mateuszvis 12
 
910 mateusz.vi 13
  $catfilter = '';
14
  if (!empty($_GET['cat'])) $catfilter = strtolower($_GET['cat']);
15
?>
16
 
17
<form action="?" method="get">
18
<br>
19
<p>Category filter:&nbsp;
20
<input type="hidden" name="p" value="repo">
21
<select name="cat">
22
  <option value="">ALL</option>
23
<?php
24
  foreach ($cats as $c) {
25
    $sel = '';
26
    if ($c == $catfilter) $sel = ' selected';
27
    echo '  <option value="' . $c . "\"{$sel}>" . $c . "</option>\n";
28
  }
29
?>
30
</select>
31
<input type="submit" value="refresh">
32
</p>
33
</form>
34
 
35
 
36
<?php
37
 
719 mateusz.vi 38
$db = json_decode(file_get_contents('../packages/_index.json'), true);
188 mateuszvis 39
 
910 mateusz.vi 40
echo "<table style=\"width: 100%;\">\n";
188 mateuszvis 41
 
42
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
43
 
719 mateusz.vi 44
foreach ($db as $pkg => $meta) {
45
 
910 mateusz.vi 46
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
47
 
719 mateusz.vi 48
  $desc = $meta['desc'];
49
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
50
  $ver = $pref['ver'];
51
  $bsum = $pref['bsum'];
52
 
53
  echo "<tr><td><a href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
188 mateuszvis 54
}
55
echo "</table>\n";
56
 
732 mateusz.vi 57
$errs = trim(file_get_contents('../packages/_buildidx.log'));
58
if (!empty($errs)) echo '<p style="color: #f00; font-weigth: bold;">Note to SvarDOS packagers: inconsistencies have been detected in the repository, please <a href="?p=repo&amp;showlogs=1#logs">review them</a>.</p>';
59
 
60
if ($_GET['showlogs'] == 1) {
61
  echo "<p style=\"font-size: 0.8em;\"><a name=\"logs\">DEBUG REPO BUILD LOGS</a>:<br>\n";
62
  if (empty($errs)) {
63
    echo "no buildidx errors to display\n";
64
  } else {
65
    echo nl2br(htmlentities($errs));
66
  }
67
  echo "</p>\n";
68
}
69
 
188 mateuszvis 70
?>