Subversion Repositories SvarDOS

Rev

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

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