From: Michael Tremer Date: Sat, 17 Jan 2009 20:58:00 +0000 (+0100) Subject: Adding a function to output the package information for wiki. X-Git-Tag: v3.0-alpha1~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=020b04c05cefbe3656bd1473d5f143489fb20344;p=ipfire-3.x.git Adding a function to output the package information for wiki. --- diff --git a/tools/make-interactive b/tools/make-interactive index f92c0dcb0..b6c660c2b 100644 --- a/tools/make-interactive +++ b/tools/make-interactive @@ -294,6 +294,13 @@ package*|pkg) echo " * ${group}" done ;; + wikiinfo) + shift 2 + pkg_info_wiki $@ + ;; + *) + usage + ;; esac ;; diff --git a/tools/make-packages b/tools/make-packages index eb946d3a0..ffd76c32c 100644 --- a/tools/make-packages +++ b/tools/make-packages @@ -24,7 +24,16 @@ pkg_list_groups() { } pkg_list_packages() { - software_list + echo "====== List of softwares used to build $NAME Version: $VERSION ======" + local package + for i in $BASEDIR/lfs/*; do + package=$(basename $i) + ( unset NAME VERSION + eval $(pkg_info ${package}) + [ "$NAME" = "" ] && exit + echo " * [[.:package:$package|${NAME}-${VERSION}]] - ${SHORT}" + ) + done } pkg_info() { @@ -46,3 +55,32 @@ pkg_info() { STAGE_ORDER=$STAGE_ORDER \ info } + +pkg_info_wiki() { + ( + unset NAME VERSION + eval $(pkg_info ${1}) + + [ "$NAME" = "" ] && exit + + # Output everything in wiki format + echo "^ $NAME ^^" + echo "| Version: | $VERSION |" + echo "| Release: | $RELEASE |" + echo "| Group: | $GROUP |" + echo "| License: | $LICENSE |" + echo "| Maintainer: | $MAINTAINER |" + echo "| $DESC ||" + echo "| Website: | $URL |" + if [ "$DEBUG" = "yes" ]; then + echo "This is a debug-package." + fi + if [ "$EXTRA" = "yes" ]; then + echo "This is an extra package." + fi + echo + for file in $(find $BASEDIR/src/rootfiles -name "$1" | xargs cat); do + echo " $file" + done + ) +}