]>
Commit | Line | Data |
---|---|---|
cd1a2927 | 1 | ############################################################################### |
cd1a2927 | 2 | # # |
70df8302 | 3 | # IPFire.org - A linux based firewall # |
ce4adf03 | 4 | # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # |
70df8302 MT |
5 | # # |
6 | # This program is free software: you can redistribute it and/or modify # | |
cd1a2927 | 7 | # it under the terms of the GNU General Public License as published by # |
70df8302 | 8 | # the Free Software Foundation, either version 3 of the License, or # |
cd1a2927 MT |
9 | # (at your option) any later version. # |
10 | # # | |
70df8302 | 11 | # This program is distributed in the hope that it will be useful, # |
cd1a2927 MT |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
70df8302 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # |
cd1a2927 | 18 | # # |
cd1a2927 MT |
19 | ############################################################################### |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
be472d5a MT |
27 | PKG_NAME = bash |
28 | VER = 3.2 | |
ce4adf03 | 29 | PKG_VER = 0 |
cd1a2927 | 30 | |
be472d5a | 31 | THISAPP = $(PKG_NAME)-$(VER) |
cd1a2927 | 32 | DL_FILE = $(THISAPP).tar.gz |
cd1a2927 MT |
33 | DIR_APP = $(DIR_SRC)/$(THISAPP) |
34 | ||
6679675b | 35 | OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) |
cd1a2927 | 36 | |
ce4adf03 MT |
37 | MAINTAINER = |
38 | GROUP = System/Tools | |
39 | EXTRA = no | |
40 | DEBUG = no | |
41 | DEPS = | |
42 | ||
43 | URL = http://www.gnu.org/software/bash/ | |
44 | LICENSE = GPLv2+ | |
45 | SHORT_DESC = Bash is short for born again shell. | |
46 | ||
47 | define LONG_DESC | |
48 | Bash is the shell, or command language interpreter, that will appear in \ | |
49 | the GNU operating system. Bash is an sh-compatible shell that incorporates \ | |
50 | useful features from the Korn shell (ksh) and C shell (csh). It is intended \ | |
51 | to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. | |
52 | endef | |
53 | ||
cd1a2927 MT |
54 | ############################################################################### |
55 | # Top-level Rules | |
56 | ############################################################################### | |
dd714b8a | 57 | |
ce4adf03 MT |
58 | objects = $(DL_FILE) \ |
59 | $(THISAPP)-fixes-8.patch \ | |
60 | $(PKG_NAME)-doc-$(VER).tar.gz \ | |
88068980 MT |
61 | $(THISAPP)-arc4random-1.patch \ |
62 | $(THISAPP)-rng.patch | |
cd1a2927 | 63 | |
ce4adf03 | 64 | download: $(objects) |
cd1a2927 | 65 | |
6679675b | 66 | install: $(OBJECT) |
cd1a2927 | 67 | |
ce4adf03 MT |
68 | package: |
69 | @$(DO_PACKAGE) | |
70 | ||
71 | $(objects): | |
cd1a2927 MT |
72 | @$(LOAD) |
73 | ||
cd1a2927 MT |
74 | ############################################################################### |
75 | # Installation Details | |
76 | ############################################################################### | |
77 | ||
6679675b | 78 | $(OBJECT): $(objects) |
cd1a2927 | 79 | @$(PREBUILD) |
ce4adf03 MT |
80 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE) |
81 | ||
90b09c23 MT |
82 | cd $(DIR_APP) && patch -Np1 < $(DIR_PATCHES)/$(THISAPP)-fixes-8.patch |
83 | ||
88068980 MT |
84 | ifeq "$(STAGE)" "toolchain" |
85 | # This patch modifies Bash to use /dev/urandom (settable with | |
86 | # --with-randomdev=) for $RANDOM, instead of getpid() and gettimeofday(). | |
87 | # The test is "( echo $RANDOM; ( echo $RANDOM ); ( echo $RANDOM ) )": | |
88 | cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-rng.patch | |
89 | ||
90 | # Bash uses the RTLD_LAZY option when loading libraries. We want to use | |
91 | # RTLD_NOW (it is defined from <dlfcn.h>: | |
92 | cd $(DIR_APP) && sed -e "s/filename, RTLD_LAZY/filename, RTLD_NOW/" \ | |
93 | -i builtins/enable.def | |
94 | ||
898ddaa6 MT |
95 | cd $(DIR_APP) && \ |
96 | ac_cv_func_working_mktime=yes \ | |
97 | ./configure \ | |
88068980 | 98 | $(CONFIGURE_ARCH) \ |
898ddaa6 | 99 | --prefix=$(TOOLS_DIR) \ |
88068980 | 100 | --without-bash-malloc |
2fd71e85 | 101 | cd $(DIR_APP) && make #$(PARALLELISMFLAGS) |
be472d5a MT |
102 | cd $(DIR_APP) && make install |
103 | ln -sf bash $(TOOLS_DIR)/bin/sh | |
3888140c MT |
104 | |
105 | # Without the following lines, stage2 will not work | |
106 | if [ ! -e $(LFS)/bin/bash ]; then \ | |
107 | install -d $(LFS)/bin && \ | |
108 | ln -sf $(TOOLS_DIR)/bin/bash $(LFS)/bin && \ | |
109 | ln -sf bash $(LFS)/bin/sh; \ | |
110 | fi | |
0e61af85 MT |
111 | endif |
112 | ||
113 | ifeq "$(STAGE)" "base" | |
114 | cd $(DIR_APP) && tar -xvf $(DIR_DL)/$(PKG_NAME)-doc-$(VER).tar.gz | |
115 | cd $(DIR_APP) && sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/$(THISAPP)|" \ | |
116 | Makefile.in | |
563992bd | 117 | cd $(DIR_APP) && patch -Np1 < $(DIR_PATCHES)/$(THISAPP)-arc4random-1.patch |
898ddaa6 MT |
118 | cd $(DIR_APP) && \ |
119 | ac_cv_func_working_mktime=yes \ | |
120 | ./configure \ | |
121 | --prefix=/usr \ | |
122 | --bindir=/bin \ | |
123 | --without-bash-malloc \ | |
124 | --with-installed-readline | |
2fd71e85 | 125 | cd $(DIR_APP) && make #$(PARALLELISMFLAGS) |
0e61af85 MT |
126 | cd $(DIR_APP) && make install |
127 | endif | |
128 | ||
cd1a2927 MT |
129 | @rm -rf $(DIR_APP) |
130 | @$(POSTBUILD) |