]> git.ipfire.org Git - ipfire-3.x.git/blob - tools/make-packages
Merge branch 'master' of ssh://ms@git.ipfire.org/pub/git/ipfire-3.x
[ipfire-3.x.git] / tools / make-packages
1 #!/bin/bash
2 ###############################################################################
3 # #
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2008 Michael Tremer & Christian Schmidt #
6 # #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
11 # #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
16 # #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
19 # #
20 ###############################################################################
21
22 pkg_list_groups() {
23 grep ^GROUP $BASEDIR/lfs/* | awk '{ print $3 }' | sort | uniq
24 }
25
26 pkg_list_packages() {
27 echo "====== List of softwares used to build $NAME Version: $VERSION ======"
28 local package
29 for i in $BASEDIR/lfs/*; do
30 package=$(basename $i)
31 ( unset NAME VERSION
32 eval $(pkg_info ${package})
33 [ "$NAME" = "" ] && exit
34 echo " * [[.:package:$package|${NAME}-${VERSION}]] - ${SHORT}"
35 )
36 done
37 }
38
39 pkg_info() {
40 cd $BASEDIR/lfs && $EXTRA_MAKE make -f $1 \
41 CONFIG_ROOT=$CONFIG_ROOT \
42 LINKER=$LINKER \
43 TOOLS_DIR=$TOOLS_DIR \
44 MACHINE="$MACHINE" \
45 MACHINE_REAL="$MACHINE_REAL" \
46 IFS_HOST="$IFS_HOST" \
47 IFS_TARGET="$IFS_TARGET" \
48 TARGET="$TARGET" \
49 LFS_BASEDIR=$BASEDIR \
50 LFS=$LFS \
51 INSTALLER_DIR=$INSTALLER_DIR \
52 PARALLELISMFLAGS=$PARALLELISMFLAGS \
53 KVER=$KVER \
54 STAGE=$STAGE \
55 STAGE_ORDER=$STAGE_ORDER \
56 info
57 }
58
59 pkg_info_wiki() {
60 (
61 unset NAME VERSION
62 eval $(pkg_info ${1})
63
64 [ "$NAME" = "" ] && exit
65
66 # Output everything in wiki format
67 echo "^ $NAME ^^"
68 echo "| Version: | $VERSION |"
69 echo "| Release: | $RELEASE |"
70 echo "| Group: | $GROUP |"
71 echo "| License: | $LICENSE |"
72 echo "| Maintainer: | $MAINTAINER |"
73 echo "| $DESC ||"
74 echo "| Website: | $URL |"
75 if [ "$DEBUG" = "yes" ]; then
76 echo "<color red>This is a debug-package.</color>"
77 fi
78 if [ "$EXTRA" = "yes" ]; then
79 echo "<color green>This is an extra package.</color>"
80 fi
81 echo
82 for file in $(find $BASEDIR/src/rootfiles -name "$1" | xargs cat); do
83 echo " $file"
84 done
85 )
86 }