Subversion Repositories SvarDOS

Rev

Rev 910 | Rev 1512 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 910 Rev 1268
1
<h1>SvarDOS repository</h1>
1
<h1>SvarDOS repository</h1>
2
<p class="copyr">"the world of packages"</p>
2
<p class="copyr">"the world of packages"</p>
3
 
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>
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
 
5
 
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>
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>-->
7
 
7
 
8
<?php
8
<?php
9
  // load the category list
9
  // load the category list
10
  $cats = json_decode(file_get_contents('../packages/_cats.json'), true);
10
  $cats = json_decode(file_get_contents('../packages/_cats.json'), true);
11
  sort($cats);
11
  sort($cats);
12
 
12
 
13
  $catfilter = '';
13
  $catfilter = '';
14
  if (!empty($_GET['cat'])) $catfilter = strtolower($_GET['cat']);
14
  if (!empty($_GET['cat'])) $catfilter = strtolower($_GET['cat']);
15
?>
15
?>
16
 
16
 
17
<form action="?" method="get">
17
<form action="?" method="get">
18
<br>
18
<br>
19
<p>Category filter:&nbsp;
19
<p>Category filter:&nbsp;
20
<input type="hidden" name="p" value="repo">
20
<input type="hidden" name="p" value="repo">
21
<select name="cat">
21
<select name="cat">
22
  <option value="">ALL</option>
22
  <option value="">ALL</option>
23
<?php
23
<?php
24
  foreach ($cats as $c) {
24
  foreach ($cats as $c) {
25
    $sel = '';
25
    $sel = '';
26
    if ($c == $catfilter) $sel = ' selected';
26
    if ($c == $catfilter) $sel = ' selected';
27
    echo '  <option value="' . $c . "\"{$sel}>" . $c . "</option>\n";
27
    echo '  <option value="' . $c . "\"{$sel}>" . $c . "</option>\n";
28
  }
28
  }
29
?>
29
?>
30
</select>
30
</select>
31
<input type="submit" value="refresh">
31
<input type="submit" value="refresh">
32
</p>
32
</p>
33
</form>
33
</form>
34
 
34
 
35
 
35
 
36
<?php
36
<?php
37
 
37
 
38
$db = json_decode(file_get_contents('../packages/_index.json'), true);
38
$db = json_decode(file_get_contents('../packages/_index.json'), true);
39
 
39
 
40
echo "<table style=\"width: 100%;\">\n";
40
echo "<table style=\"width: 100%;\">\n";
41
 
41
 
42
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
42
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
43
 
43
 
44
foreach ($db as $pkg => $meta) {
44
foreach ($db as $pkg => $meta) {
45
 
45
 
46
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
46
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
47
 
47
 
48
  $desc = $meta['desc'];
48
  $desc = $meta['desc'];
49
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
49
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
50
  $ver = $pref['ver'];
50
  $ver = $pref['ver'];
51
  $bsum = $pref['bsum'];
51
  $bsum = $pref['bsum'];
52
 
52
 
53
  echo "<tr><td><a href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
53
  echo "<tr><td><a href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
54
}
54
}
55
echo "</table>\n";
55
echo "</table>\n";
56
 
56
 
57
$errs = trim(file_get_contents('../packages/_buildidx.log'));
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>';
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
 
59
 
60
if ($_GET['showlogs'] == 1) {
60
if ($_GET['showlogs'] == 1) {
61
  echo "<p style=\"font-size: 0.8em;\"><a name=\"logs\">DEBUG REPO BUILD LOGS</a>:<br>\n";
61
  echo "<p style=\"font-size: 0.8em;\"><a name=\"logs\">DEBUG REPO BUILD LOGS</a>:<br>\n";
62
  if (empty($errs)) {
62
  if (empty($errs)) {
63
    echo "no buildidx errors to display\n";
63
    echo "no buildidx errors to display\n";
64
  } else {
64
  } else {
65
    echo nl2br(htmlentities($errs));
65
    echo nl2br(htmlentities($errs));
66
  }
66
  }
67
  echo "</p>\n";
67
  echo "</p>\n";
68
}
68
}
69
 
69
 
70
?>
70
?>
71
 
71