Subversion Repositories SvarDOS

Rev

Rev 946 | Rev 999 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 946 Rev 951
Line 8... Line 8...
8
  files. buildidx will generate the index file and save it into the package
8
  files. buildidx will generate the index file and save it into the package
9
  repository.
9
  repository.
10
 
10
 
11
  requires php-zip
11
  requires php-zip
12
 
12
 
-
 
13
  24 feb 2022: added hardcoded hack to translate version 'x.xx' to '0.44' (NESticle)
13
  23 feb 2022: basic validation of source archives (not empty + matches an existing svp file)
14
  23 feb 2022: basic validation of source archives (not empty + matches an existing svp file)
14
  21 feb 2022: buildidx collects categories looking at the dir layout of each package + improved version string parsing (replaced version_compare call by dos_version_compare)
15
  21 feb 2022: buildidx collects categories looking at the dir layout of each package + improved version string parsing (replaced version_compare call by dos_version_compare)
15
  17 feb 2022: checking for non-8+3 filenames in packages and duplicates + devload no longer part of CORE
16
  17 feb 2022: checking for non-8+3 filenames in packages and duplicates + devload no longer part of CORE
16
  16 feb 2022: added warning about overlong version strings and wild files location
17
  16 feb 2022: added warning about overlong version strings and wild files location
17
  15 feb 2022: index is generated as json, contains all filenames and alt versions
18
  15 feb 2022: index is generated as json, contains all filenames and alt versions
Line 32... Line 33...
32
  10 jul 2013: changed unzip calls to 7za (to handle cases when appinfo is compressed with lzma)
33
  10 jul 2013: changed unzip calls to 7za (to handle cases when appinfo is compressed with lzma)
33
  04 feb 2013: added CRC32 support
34
  04 feb 2013: added CRC32 support
34
  22 sep 2012: forked 1st version from FDUPDATE builder
35
  22 sep 2012: forked 1st version from FDUPDATE builder
35
*/
36
*/
36
 
37
 
37
$PVER = "20220223";
38
$PVER = "20220224";
38
 
39
 
39
 
40
 
40
// computes the BSD sum of a file and returns it
41
// computes the BSD sum of a file and returns it
41
function file2bsum($fname) {
42
function file2bsum($fname) {
42
  $result = 0;
43
  $result = 0;
Line 91... Line 92...
91
    }
92
    }
92
    $subver[3] = intval($svarver); // set the +rev as a very minor item
93
    $subver[3] = intval($svarver); // set the +rev as a very minor item
93
    $verstr = substr($verstr, 0, $i);
94
    $verstr = substr($verstr, 0, $i);
94
  }
95
  }
95
 
96
 
-
 
97
  // NESticls hack: version "x.xx" is translated to "0.44"... that sucks but that's how it is.
-
 
98
  // ref: https://web.archive.org/web/20070205074631/http://www.zophar.net/NESticle/
-
 
99
  if ($verstr == 'x.xx') $verstr = '0.44';
-
 
100
 
96
  // beta reordering: convert "beta 0.95" to "0.95 beta"
101
  // beta reordering: convert "beta 0.95" to "0.95 beta"
97
  if (preg_match('/^beta /', $verstr)) $verstr = substr($verstr, 5) . ' beta';
102
  if (preg_match('/^beta /', $verstr)) $verstr = substr($verstr, 5) . ' beta';
98
 
103
 
99
  // any occurence of alpha,beta,gamma,delta etc preceded by a digit should have a space separator added
104
  // any occurence of alpha,beta,gamma,delta etc preceded by a digit should have a space separator added
100
  // example: "2.6.0pre9" becomes "2.6.0 pre9"
105
  // example: "2.6.0pre9" becomes "2.6.0 pre9"