Subversion Repositories SvarDOS

Rev

Rev 1700 | Rev 1803 | 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
 
1701 mateusz.vi 6
<p>You may also download a CD ISO image that contains the latest version of each package: <a href="repo/sv-repo.iso">SV-REPO.ISO</a> (<?php echo intval(filesize('repo/sv-repo.iso') / 1024 / 1024); ?>M, <a href="repo/sv-repo.iso.md5">md5</a>)</p>
1699 mateusz.vi 7
 
1268 mateusz.vi 8
<!-- <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 9
 
188 mateuszvis 10
<?php
910 mateusz.vi 11
  // load the category list
12
  $cats = json_decode(file_get_contents('../packages/_cats.json'), true);
13
  sort($cats);
188 mateuszvis 14
 
910 mateusz.vi 15
  $catfilter = '';
16
  if (!empty($_GET['cat'])) $catfilter = strtolower($_GET['cat']);
1513 mateusz.vi 17
 
18
  // hw filter?
19
  $hw = array();
20
  if (!empty($_GET['hwcpu'])) $hw[] = strtolower($_GET['hwcpu']);
21
  if (!empty($_GET['hwvid'])) $hw[] = strtolower($_GET['hwvid']);
22
  if ((!empty($_GET['fpu'])) && ($_GET['fpu'] == 'yes')) $hw[] = 'fpu';
23
 
910 mateusz.vi 24
?>
25
 
26
<form action="?" method="get">
27
<br>
1513 mateusz.vi 28
<p>Filters:<br>
910 mateusz.vi 29
<input type="hidden" name="p" value="repo">
1513 mateusz.vi 30
 
31
Target hardware:
32
 
33
<select name="hwcpu">
34
 
35
<?php
36
  // build form with list of CPUs + preselect the current CPU (if any)
1520 mateusz.vi 37
  $cpus = array('586', '486', '386', '286', '186', '8086');
1513 mateusz.vi 38
  foreach ($cpus as $cpu) {
39
    $sel = '';
40
    if (array_search($cpu, $hw) !== false) $sel = ' selected';
41
    echo "<option{$sel}>{$cpu}</option>\n";
42
  }
43
?>
44
</select>
45
 
46
<select name="hwfpu">
47
<?php
48
if (empty($_GET['hwfpu'])) {
49
  echo "<option selected value=\"\">no FPU</option>\n";
50
  echo "<option>FPU</option>\n";
51
} else {
52
  echo "<option value=\"\">no FPU</option>\n";
53
  echo "<option selected>FPU</option>\n";
54
}
55
?>
56
</select>
57
 
58
<select name="hwvid">
59
<?php
1520 mateusz.vi 60
  // build form with list of graphic cards + preselect the current card (if any)
61
  $vids = array('SVGA', 'VGA', 'MCGA', 'EGA', 'CGA', 'MDA');
1513 mateusz.vi 62
  foreach ($vids as $v) {
63
    $sel = '';
64
    if (array_search(strtolower($v), $hw) !== false) $sel = ' selected';
65
    echo "<option{$sel}>{$v}</option>\n";
66
  }
67
?>
68
</select>
69
 
70
<br>
71
 
72
Category:
910 mateusz.vi 73
<select name="cat">
74
  <option value="">ALL</option>
75
<?php
76
  foreach ($cats as $c) {
77
    $sel = '';
78
    if ($c == $catfilter) $sel = ' selected';
79
    echo '  <option value="' . $c . "\"{$sel}>" . $c . "</option>\n";
80
  }
81
?>
82
</select>
1513 mateusz.vi 83
 
84
<input type="submit" value="apply">
910 mateusz.vi 85
</p>
86
</form>
87
 
88
 
89
<?php
90
 
1513 mateusz.vi 91
// add all supported subsets of hardware (eg. VGA supports MDA, EGA and CGA modes)
92
foreach ($hw as $h) {
1512 mateusz.vi 93
 
1513 mateusz.vi 94
  // add all supported CPUs
95
  if ($h == '586') {
96
    $hw[] = '8086';
97
    $hw[] = '186';
98
    $hw[] = '286';
99
    $hw[] = '386';
100
    $hw[] = '486';
101
  }
102
  if ($h == '486') {
103
    $hw[] = '8086';
104
    $hw[] = '186';
105
    $hw[] = '286';
106
    $hw[] = '386';
107
  }
108
  if ($h == '386') {
109
    $hw[] = '8086';
110
    $hw[] = '186';
111
    $hw[] = '286';
112
  }
113
  if ($h == '286') {
114
    $hw[] = '8086';
115
    $hw[] = '186';
116
  }
117
  if ($h == '186') {
118
    $hw[] = '8086';
119
  }
1512 mateusz.vi 120
 
1513 mateusz.vi 121
  // add all supported graphic
122
  if ($h == 'svga') {
123
    $hw[] = 'vga';
124
    $hw[] = 'ega';
125
    $hw[] = 'cga';
126
    $hw[] = 'mda';
127
  }
128
  if ($h == 'vga') {
129
    $hw[] = 'mcga';
130
    $hw[] = 'ega';
131
    $hw[] = 'cga';
132
    $hw[] = 'mda';
133
  }
134
  if ($h == 'mcga') {
135
    $hw[] = 'ega';
136
    $hw[] = 'cga';
137
    $hw[] = 'mda';
138
  }
139
  if ($h == 'ega') {
140
    $hw[] = 'cga';
141
    $hw[] = 'mda';
142
  }
143
  if ($h == 'cga') {
144
    $hw[] = 'mda';
145
  }
1512 mateusz.vi 146
}
147
 
1513 mateusz.vi 148
 
719 mateusz.vi 149
$db = json_decode(file_get_contents('../packages/_index.json'), true);
188 mateuszvis 150
 
910 mateusz.vi 151
echo "<table style=\"width: 100%;\">\n";
188 mateuszvis 152
 
153
echo "<thead><tr><th>PACKAGE</th><th>VERSION</th><th>DESCRIPTION</th></tr></thead>\n";
154
 
719 mateusz.vi 155
foreach ($db as $pkg => $meta) {
156
 
910 mateusz.vi 157
  if ((!empty($catfilter)) && (array_search($catfilter, $meta['cats']) === false)) continue;
158
 
719 mateusz.vi 159
  $desc = $meta['desc'];
1512 mateusz.vi 160
  check_next_ver:
719 mateusz.vi 161
  $pref = array_shift($meta['versions']); // get first version (that's the preferred one)
1512 mateusz.vi 162
  if (empty($pref)) continue; // no more versions
163
  $hwhint = '';
1520 mateusz.vi 164
  if (!empty($pref['hwreq'])) {
1523 mateusz.vi 165
    $hwhint = ' title="' . htmlspecialchars(strtoupper(implode(', ', $pref['hwreq']))) . '"';
1520 mateusz.vi 166
 
1512 mateusz.vi 167
    /* if hw filter present, make sure it fullfills package's requirements */
1520 mateusz.vi 168
    if (!empty($hw)) {
1523 mateusz.vi 169
      foreach ($pref['hwreq'] as $req) {
1520 mateusz.vi 170
        if (array_search($req, $hw, true) === false) goto check_next_ver;
171
      }
1512 mateusz.vi 172
    }
173
  }
719 mateusz.vi 174
  $ver = $pref['ver'];
175
  $bsum = $pref['bsum'];
176
 
1512 mateusz.vi 177
  echo "<tr><td><a{$hwhint} href=\"repo/?a=pull&amp;p={$pkg}\">{$pkg}</a></td><td>{$ver}</td><td>{$desc}</td></tr>\n";
188 mateuszvis 178
}
179
echo "</table>\n";
180
 
732 mateusz.vi 181
$errs = trim(file_get_contents('../packages/_buildidx.log'));
182
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>';
183
 
184
if ($_GET['showlogs'] == 1) {
185
  echo "<p style=\"font-size: 0.8em;\"><a name=\"logs\">DEBUG REPO BUILD LOGS</a>:<br>\n";
186
  if (empty($errs)) {
187
    echo "no buildidx errors to display\n";
188
  } else {
189
    echo nl2br(htmlentities($errs));
190
  }
191
  echo "</p>\n";
192
}
193
 
188 mateuszvis 194
?>