Bump games/lander to version 0.6.6_6
[dports.git] / Tools / make_readmes
1 #!/usr/local/bin/perl
2 # $FreeBSD: head/Tools/make_readmes 340851 2014-01-23 19:55:14Z mat $
3
4 $PORTSDIR="/usr/ports";
5 $TEMPLATES=$ENV{TEMPLATES} || "${PORTSDIR}/Templates";
6 $README=`cat ${TEMPLATES}/README.port`;
7
8 while(<>) {
9         (@F)=split(/\|/, $_);
10         $PKG=$F[0];
11         $PORT=$F[1];
12         $COMMENT=$F[3];
13         $DESCR=$F[4];
14         $EMAIL=$F[5];
15         $BUILD_DEPENDS=$F[7];
16         $RUN_DEPENDS=$F[8];
17         $WEBSITE=$F[9];
18         
19
20         $DESCR=~s|^\Q$PORT/\E||;
21         $PORT=~s|`pwd`||;
22
23         if($WEBSITE) {
24                 $WEBSITE=" and/or visit the <a href=\"$WEBSITE\">web site</a> for futher informations"
25         };
26         if($BUILD_DEPENDS) {
27                 $BUILD_DEPENDS="This port requires package(s) \"$BUILD_DEPENDS\" to build."
28         };
29         if($RUN_DEPENDS) {
30                 $RUN_DEPENDS="This port requires package(s) \"$RUN_DEPENDS\" to run."
31         };
32
33         $TOP=$PORT;
34         $TOP=~s|[^/]+|..|g;
35
36         $tmp=$README;
37         $tmp=~s|%%PKG%%|$PKG|g;
38         $tmp=~s|%%PORT%%|$PORT|g;
39         $tmp=~s|%%COMMENT%%|$COMMENT|g;
40         $tmp=~s|%%DESCR%%|$DESCR|g;
41         $tmp=~s|%%EMAIL%%|$EMAIL|g;
42         $tmp=~s|%%WEBSITE%%|$WEBSITE|g;
43         $tmp=~s|%%BUILD_DEPENDS%%|$BUILD_DEPENDS|g;
44         $tmp=~s|%%RUN_DEPENDS%%|$RUN_DEPENDS|g;
45         $tmp=~s|%%TOP%%|$TOP|g;
46
47         open F,">$PORT/README.html";
48         print F $tmp;
49         close F
50 }