]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - make.sh
naoki: Initial checkin.
[people/ms/ipfire-3.x.git] / make.sh
1 #!/bin/bash
2 ###############################################################################
3 # #
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2007, 2008, 2009 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
23 NAME="IPFire" # Software name
24 SNAME="ipfire" # Short name
25 VERSION="3.0-prealpha2" # Version number
26 SLOGAN="Gluttony" # Software slogan
27
28 BASEDIR=/ipfire-3.x
29
30 . ${BASEDIR}/tools/ui-functions
31
32 NAOKI=${BASEDIR}/tools/naoki
33
34 while [ $# -gt 0 ]; do
35 case "${1}" in
36 --debug|-d)
37 DEBUG=1
38 log DEBUG "Debugging mode enabled by command line."
39 ;;
40 *)
41 action=${1}
42 shift
43 break
44 ;;
45 esac
46 shift
47 done
48
49 function package() {
50 local action=${1}
51 shift
52
53 case "${action}" in
54 dependencies|deps)
55 echo -e "${BOLD}Build dependencies:${NORMAL} $(package_build_dependencies $@)"
56 echo -e "${BOLD}Dependencies:${NORMAL} $(package_dependencies $@)"
57 ;;
58 find)
59 find_package $@
60 ;;
61 list)
62 ${NAOKI} --toolchain list
63 ;;
64 profile|info)
65 ${NAOKI} profile $@
66 ;;
67 _info)
68 package_info $(find_package $@)
69 ;;
70 esac
71 }
72
73 function listmatch() {
74 local arg=${1}
75 shift
76
77 local value
78 for value in $@; do
79 if [ "${arg}" == "${value}" ]; then
80 return 0
81 fi
82 done
83 return 1
84 }
85
86
87 case "${action}" in
88 package|pkg)
89 package $@
90 ;;
91 toolchain)
92 TOOLCHAIN=1
93 ${NAOKI} --toolchain tree
94 ;;
95 toolchain_build)
96 for i in $($0 toolchain); do
97 ${NAOKI} --toolchain toolchain ${i}
98 done
99 ;;
100 tree)
101 ${NAOKI} tree
102 ;;
103 esac