aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/make_readmes
blob: c6e78e6d89f6612e3eb4152cca543d382cd5ca68 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/perl
# $FreeBSD$

$PORTSDIR="/usr/ports";
$TEMPLATES=$ENV{TEMPLATES} || "${PORTSDIR}/Templates";
$README=`cat ${TEMPLATES}/README.port`;

while(<>) {
    (@F)=split(/\|/, $_);
    $PKG=$F[0];
    $PORT=$F[1];
    $COMMENT=$F[3];
    $DESCR=$F[4];
    $EMAIL=$F[5];
    $BUILD_DEPENDS=$F[7];
    $RUN_DEPENDS=$F[8];
    $WEBSITE=$F[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
}
='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/audio/lash?id=7636971d1713d203f301d215eabf001c58980dda'>- Switch audio/lash to USES=libtool, drop .la filesamdmi32014-06-202-4/+5 * The FreeBSD x11@ and graphics team proudly presentszeising2014-04-171-1/+1 * Stage supportantoine2013-12-311-4/+3 * In preparation for making libtool generate libraries with a sane name, fix allbapt2013-12-111-3/+3 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-201-0/+1 * Add an explicit dependency on pkgconfbapt2013-09-031-1/+1 * Convert audio from USE_GMAKE to USES=gmakebapt2013-08-311-2/+1