]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Adding a function to output the package information for wiki.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 17 Jan 2009 20:58:00 +0000 (21:58 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 17 Jan 2009 20:58:00 +0000 (21:58 +0100)
tools/make-interactive
tools/make-packages

index f92c0dcb0991392d39bc3def53e3256c1321e27f..b6c660c2b6e0a225fe5a8ea8a31ba0c92a750ed2 100644 (file)
@@ -294,6 +294,13 @@ package*|pkg)
                                echo "  * ${group}"
                        done
                        ;;
+               wikiinfo)
+                       shift 2
+                       pkg_info_wiki $@
+                       ;;
+               *)
+                       usage
+                       ;;
        esac
        ;;
 
index eb946d3a016a93698c1670afbcc88e7722a02bd6..ffd76c32ce843acc75087be9176a404a92a3347d 100644 (file)
@@ -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 "<color red>This is a debug-package.</color>"
+               fi
+               if [ "$EXTRA" = "yes" ]; then
+                       echo "<color green>This is an extra package.</color>"
+               fi
+               echo
+               for file in $(find $BASEDIR/src/rootfiles -name "$1" | xargs cat); do
+                       echo "  $file"
+               done
+       )
+}