]> git.ipfire.org Git - ipfire-3.x.git/blame - tools/make-packages
Made ./make.sh shell run some more commands and added kernel config option.
[ipfire-3.x.git] / tools / make-packages
CommitLineData
aef37aba
MT
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
2a5ec6a1
MT
22# Save packages, that were already compiled in this variable:
23PACKAGES_DONE=
24
aef37aba
MT
25pkg_list_groups() {
26 grep ^GROUP $BASEDIR/lfs/* | awk '{ print $3 }' | sort | uniq
27}
28
29pkg_list_packages() {
020b04c0
MT
30 echo "====== List of softwares used to build $NAME Version: $VERSION ======"
31 local package
32 for i in $BASEDIR/lfs/*; do
33 package=$(basename $i)
34 ( unset NAME VERSION
35 eval $(pkg_info ${package})
36 [ "$NAME" = "" ] && exit
37 echo " * [[.:package:$package|${NAME}-${VERSION}]] - ${SHORT}"
38 )
39 done
aef37aba
MT
40}
41
d6ec57e7
MT
42pkg_info() {
43 cd $BASEDIR/lfs && $EXTRA_MAKE make -f $1 \
44 CONFIG_ROOT=$CONFIG_ROOT \
45 LINKER=$LINKER \
46 TOOLS_DIR=$TOOLS_DIR \
47 MACHINE="$MACHINE" \
48 MACHINE_REAL="$MACHINE_REAL" \
49 IFS_HOST="$IFS_HOST" \
50 IFS_TARGET="$IFS_TARGET" \
51 TARGET="$TARGET" \
52 LFS_BASEDIR=$BASEDIR \
53 LFS=$LFS \
54 INSTALLER_DIR=$INSTALLER_DIR \
55 PARALLELISMFLAGS=$PARALLELISMFLAGS \
56 KVER=$KVER \
57 STAGE=$STAGE \
58 STAGE_ORDER=$STAGE_ORDER \
59 info
60}
020b04c0
MT
61
62pkg_info_wiki() {
63 (
64 unset NAME VERSION
65 eval $(pkg_info ${1})
66
67 [ "$NAME" = "" ] && exit
68
69 # Output everything in wiki format
70 echo "^ $NAME ^^"
71 echo "| Version: | $VERSION |"
72 echo "| Release: | $RELEASE |"
73 echo "| Group: | $GROUP |"
74 echo "| License: | $LICENSE |"
75 echo "| Maintainer: | $MAINTAINER |"
76 echo "| $DESC ||"
77 echo "| Website: | $URL |"
78 if [ "$DEBUG" = "yes" ]; then
79 echo "<color red>This is a debug-package.</color>"
80 fi
81 if [ "$EXTRA" = "yes" ]; then
82 echo "<color green>This is an extra package.</color>"
83 fi
84 echo
85 for file in $(find $BASEDIR/src/rootfiles -name "$1" | xargs cat); do
86 echo " $file"
87 done
88 )
89}
2a5ec6a1
MT
90
91pkg_deps() {
92 (
93 unset NAME VERSION
94 eval $(pkg_info ${1})
95 echo $DEPS
96 )
97}
7f62382d
MT
98
99pkg_files() {
100 (
101 unset NAME VERSION
102 eval $(pkg_info ${1})
103 for i in $FILES; do
104 echo $i
105 done
106 )
107}