## ## ossp_pkg.wml -- Package Macros ## Copyright (c) 2000-2001 Ralf S. Engelschall ## # define a process bar />/> /> 100/>/> /> 100/>/> 0 "" >
% />/> 0 "" > />/>
# define a macro which can be used to create a file listing which # is optically more compact than the stuff Apache's mod_autoindex # creates. ..PAGE_CSS>> TR.files0N { background: #f5f5f0; } TR.files1N { background: #e5e5e0; } .files0N,.files1N,A.files0N,A.files1N { color: #000000; } TR.files0S,TR.files1S { background: #993333; } .files0S,.files1S,A.files0S,A.files1S { color: #ffffff; } TR.files0U,TR.files1U { background: #666699; } .files0U,.files1U,A.files0U,A.files1U { color: #ffffff; } <<.. <: my $url = ""; my $directory = ""; my $files = ""; my $stable = ""; my $unstable = ""; $url =~ s|/+$||s; :> # <: my $odir = chdir($directory) || die; my @F = reverse sort { (stat($a))[9] <=> (stat($b))[9]; } (glob($files)); chdir($odir); my $O = ''; $ncol = 0; foreach my $f (@F) { my @S = stat($f); my $size = $S[7]; if ($size > (1024*1024)) { $size = sprintf("%.1fMB", $size / (1024*1024)); } elsif ($size > (1024)) { $size = sprintf("%.1fKB", $size / (1024)); } $f = "$f/" if (-d $f); my @T = localtime($S[9]); my @moy = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); $ncol = ($ncol + 1) % 2; my $type = "N"; $type = "S" if ($f =~ m|$stable|); $type = "U" if ($f =~ m|$unstable|); my $class = "files${ncol}${type}"; #my $md5 = `openssl md5 "$f"`; #$md5 =~ s|^MD5\(.+?\)\s*=\s*(\S+)|$1|s; ##$md5 =~ s|^([a-zA-Z0-9]{16})([a-zA-Z0-9]{16})$|$1
$2|; #$md5 = "$md5"; $f = "$f"; my $e = "" . " " . " " . # " " . " ". ""; $O .= $e . "\n"; } print $O; :>
ChangeLog: ChangeLog
Repository:
Distribution:

Distribution Files: Size:MD5: Time:
".$f."    ".$size."  ".$md5."  ".sprintf("%"."02d-%"."s-%"."04d", $T[3], $moy[$T[4]], 1900+$T[5]) . "
# define a package summary list %body
* derived from external sources
" "yes" " *"> Stable: " "none" "none" > Unstable: " "none" "none" > " "none" "" >> " "none" "" >> # " "100" "" # >>
Stable Version:   () " "" "" " "none" "" Bug Reporting] >> >>
Unstable Version:   () " "" "" Bug Reporting] >>
Genesis:  
Finished:
#
<>
OSSP is a sub-project of OSSP and hence a fully non-profit Open Source Software effort. The development on OSSP projects like OSSP is supported by the contributions and sponsoring of individuals and companies. You can support OSSP and the other OSSP projects yourself by contributing source fixes and enhancements or by donating money. To reward the efforts on OSSP , just press the button to the right to perform a secure PayPal online money transaction to the OSSP project. Credit will be given to you on the OSSP Sponsors page once your donation was received.     
() ## ## Next-Generation Package Macros ## <: my $ref = '%body'; my $O = ''; if ($ref =~ m/^((https?|ftp):\/\/\S+)$/) { $O = "$ref"; } elsif ($ref =~ m|^(\S+)\(([1-9])\)@(/\S+)$|) { $O = "$1($2)"; } elsif ($ref =~ m|^(\S+)\(([1-9])\)$|) { $O = "" . "$1($2)"; } elsif ($ref =~ m|^OSSP\s+(\S+)$|) { my $name = $1; foreach my $path (qw(.. ../../lib ../../tool)) { if (-d "$path/$name") { $O = "$ref"; last; } } } if ($O eq '') { $O = $ref; } print $O; :> " "jargon" foo FIXME />