Subversion Repositories SvarDOS

Rev

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

Rev 1268 Rev 1512
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
// hw filter?
-
 
39
$hw = array();
-
 
40
if (!empty($_GET['hw'])) {
-
 
41
  $hw = explode(' ', strtolower($_GET['hw']));
-
 
42
  foreach ($hw as $h) {
-
 
43
 
-
 
44
    // add all supported CPUs
-
 
45
    if ($h == '586') {
-
 
46
      $hw[] = '8086';
-
 
47
      $hw[] = '186';
-
 
48
      $hw[] = '286';
-
 
49
      $hw[] = '386';
-
 
50
      $hw[] = '486';
-
 
51
    }
-
 
52
    if ($h == '486') {
-
 
53
      $hw[] = '8086';
-
 
54
      $hw[] = '186';
-
 
55
      $hw[] = '286';
-
 
56
      $hw[] = '386';
-
 
57
    }
-
 
58
    if ($h == '386') {
-
 
59
      $hw[] = '8086';
-
 
60
      $hw[] = '186';
-
 
61
      $hw[] = '286';
-
 
62
    }
-
 
63
    if ($h == '286') {
-
 
64
      $hw[] = '8086';
-
 
65
      $hw[] = '186';
-
 
66
    }
-
 
67
    if ($h == '186') {
-
 
68
      $hw[] = '8086';
-
 
69
    }
-
 
70
 
-
 
71
    // add all supported graphic
-
 
72
    if ($h == 'svga') {
-
 
73
      $hw[] = 'vga';
-
 
74
      $hw[] = 'ega';
-
 
75
      $hw[] = 'cga';
-
 
76
      $hw[] = 'mda';
-
 
77
    }
-
 
78
    if ($h == 'vga') {
-
 
79
      $hw[] = 'ega';
-
 
80
      $hw[] = 'cga';
-
 
81
      $hw[] = 'mda';
-
 
82
    }
-
 
83
    if ($h == 'ega') {
-
 
84
      $hw[] = 'cga';
-
 
85
      $hw[] = 'mda';
-
 
86
    }
-
 
87
    if ($h == 'cga') {
-
 
88
      $hw[] = 'mda';
-
 
89
    }
-
 
90
 
-
 
91
  }
-
 
92
}
-
 
93
 
38
$db = json_decode(file_get_contents('../packages/_index.json'), true);
94
$db = json_decode(file_get_contents('../packages/_index.json'), true);
39
 
95
 
40
echo "<table style=\"width: 100%;\">\n";
96
echo "<table style=\"width: 100%;\">\n";
41
 
97
 
42
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
98
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
43
 
99
 
44
foreach ($db as $pkg => $meta) {
100
foreach ($db as $pkg => $meta) {
45
 
101
 
46
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
102
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
47
 
103
 
48
  $desc = $meta['desc'];
104
  $desc = $meta['desc'];
-
 
105
  check_next_ver:
49
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
106
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
-
 
107
  if (empty($pref)) continue; // no more versions
-
 
108
  $hwhint = '';
-
 
109
  if (!empty($pref['hwreq'])) {
-
 
110
    /* if hw filter present, make sure it fullfills package's requirements */
-
 
111
    foreach (explode(' ', $pref['hwreq']) as $req) {
-
 
112
      if (array_search($req, $hw, true) === false) goto check_next_ver;
-
 
113
    }
-
 
114
 
-
 
115
    $hwhint = ' title="' . htmlspecialchars(strtoupper($pref['hwreq'])) . '"';
-
 
116
  }
50
  $ver = $pref['ver'];
117
  $ver = $pref['ver'];
51
  $bsum = $pref['bsum'];
118
  $bsum = $pref['bsum'];
52
 
119
 
53
  echo "<tr><td><a href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
120
  echo "<tr><td><a{$hwhint} href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
54
}
121
}
55
echo "</table>\n";
122
echo "</table>\n";
56
 
123
 
57
$errs = trim(file_get_contents('../packages/_buildidx.log'));
124
$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>';
125
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
 
126
 
60
if ($_GET['showlogs'] == 1) {
127
if ($_GET['showlogs'] == 1) {
61
  echo "<p style=\"font-size: 0.8em;\"><a name=\"logs\">DEBUG REPO BUILD LOGS</a>:<br>\n";
128
  echo "<p style=\"font-size: 0.8em;\"><a name=\"logs\">DEBUG REPO BUILD LOGS</a>:<br>\n";
62
  if (empty($errs)) {
129
  if (empty($errs)) {
63
    echo "no buildidx errors to display\n";
130
    echo "no buildidx errors to display\n";
64
  } else {
131
  } else {
65
    echo nl2br(htmlentities($errs));
132
    echo nl2br(htmlentities($errs));
66
  }
133
  }
67
  echo "</p>\n";
134
  echo "</p>\n";
68
}
135
}
69
 
136
 
70
?>
137
?>
71
 
138