]> git.ipfire.org Git - ipfire-3.x.git/blame - tools/make-packages
Added new package: dosfstools.
[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() {
12b17e35
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 printf " * %-30s" ${NAME}-${VERSION}
38 echo "${SHORT}"
39 )
40 done
41}
42
43pkg_list_packages_wiki() {
020b04c0
MT
44 echo "====== List of softwares used to build $NAME Version: $VERSION ======"
45 local package
46 for i in $BASEDIR/lfs/*; do
47 package=$(basename $i)
48 ( unset NAME VERSION
49 eval $(pkg_info ${package})
50 [ "$NAME" = "" ] && exit
51 echo " * [[.:package:$package|${NAME}-${VERSION}]] - ${SHORT}"
52 )
53 done
aef37aba
MT
54}
55
d6ec57e7
MT
56pkg_info() {
57 cd $BASEDIR/lfs && $EXTRA_MAKE make -f $1 \
58 CONFIG_ROOT=$CONFIG_ROOT \
59 LINKER=$LINKER \
60 TOOLS_DIR=$TOOLS_DIR \
61 MACHINE="$MACHINE" \
62 MACHINE_REAL="$MACHINE_REAL" \
63 IFS_HOST="$IFS_HOST" \
64 IFS_TARGET="$IFS_TARGET" \
65 TARGET="$TARGET" \
66 LFS_BASEDIR=$BASEDIR \
67 LFS=$LFS \
68 INSTALLER_DIR=$INSTALLER_DIR \
69 PARALLELISMFLAGS=$PARALLELISMFLAGS \
70 KVER=$KVER \
71 STAGE=$STAGE \
72 STAGE_ORDER=$STAGE_ORDER \
73 info
74}
020b04c0
MT
75
76pkg_info_wiki() {
77 (
78 unset NAME VERSION
79 eval $(pkg_info ${1})
80
81 [ "$NAME" = "" ] && exit
82
83 # Output everything in wiki format
84 echo "^ $NAME ^^"
85 echo "| Version: | $VERSION |"
86 echo "| Release: | $RELEASE |"
87 echo "| Group: | $GROUP |"
88 echo "| License: | $LICENSE |"
89 echo "| Maintainer: | $MAINTAINER |"
90 echo "| $DESC ||"
91 echo "| Website: | $URL |"
92 if [ "$DEBUG" = "yes" ]; then
93 echo "<color red>This is a debug-package.</color>"
94 fi
95 if [ "$EXTRA" = "yes" ]; then
96 echo "<color green>This is an extra package.</color>"
97 fi
98 echo
99 for file in $(find $BASEDIR/src/rootfiles -name "$1" | xargs cat); do
100 echo " $file"
101 done
102 )
103}
2a5ec6a1
MT
104
105pkg_deps() {
106 (
107 unset NAME VERSION
108 eval $(pkg_info ${1})
109 echo $DEPS
110 )
111}
7f62382d
MT
112
113pkg_files() {
114 (
115 unset NAME VERSION
116 eval $(pkg_info ${1})
117 for i in $FILES; do
118 echo $i
119 done
120 )
121}