aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2004-11-19 13:45:07 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2004-11-19 13:45:07 +0000
commitae1ec8f3dc1e8236595aeed5f87444fdebbc245a (patch)
treebb7626e4fe5f767b810f8f05d7e9eb4a0ec261a5 /Tools
parentd8f7447a122c70937d781fea20d4ac3ec13e6283 (diff)
downloadports-ae1ec8f3dc1e8236595aeed5f87444fdebbc245a.tar.gz
ports-ae1ec8f3dc1e8236595aeed5f87444fdebbc245a.zip
Notes
Diffstat (limited to 'Tools')
-rw-r--r--Tools/make_readmes47
1 files changed, 47 insertions, 0 deletions
diff --git a/Tools/make_readmes b/Tools/make_readmes
new file mode 100644
index 000000000000..186c7382c955
--- /dev/null
+++ b/Tools/make_readmes
@@ -0,0 +1,47 @@
+#!/usr/bin/perl
+
+$README=`cat Templates/README.port`;
+
+while(<>) {
+ split '\|';
+
+ $PKG=$_[0];
+ $PORT=$_[1];
+ $COMMENT=$_[3];
+ $DESCR=$_[4];
+ $EMAIL=$_[5];
+ $BUILD_DEPENDS=$_[7];
+ $RUN_DEPENDS=$_[8];
+ $WEBSITE=$_[9];
+
+ $DESCR=~s|^\Q$PORT/\E||;
+ $PORT=~s|`pwd`||;
+
+ if($WEBSITE) {
+ $WEBSITE=" and/or visit the <a href=\"$WEBSITE\">web site</a> for futher informations"
+ };
+ if($BUILD_DEPENDS) {
+ $BUILD_DEPENDS="This port requires package(s) \"$BUILD_DEPENDS\" to build."
+ };
+ if($RUN_DEPENDS) {
+ $RUN_DEPENDS="This port requires package(s) \"$RUN_DEPENDS\" to run."
+ };
+
+ $TOP=$PORT;
+ $TOP=~s|[^/]+|..|g;
+
+ $tmp=$README;
+ $tmp=~s|%%PKG%%|$PKG|g;
+ $tmp=~s|%%PORT%%|$PORT|g;
+ $tmp=~s|%%COMMENT%%|$COMMENT|g;
+ $tmp=~s|%%DESCR%%|$DESCR|g;
+ $tmp=~s|%%EMAIL%%|$EMAIL|g;
+ $tmp=~s|%%WEBSITE%%|$WEBSITE|g;
+ $tmp=~s|%%BUILD_DEPENDS%%|$BUILD_DEPENDS|g;
+ $tmp=~s|%%RUN_DEPENDS%%|$RUN_DEPENDS|g;
+ $tmp=~s|%%TOP%%|$TOP|g;
+
+ open F,">$PORT/README.html";
+ print F $tmp;
+ close F
+}