]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - pkgs/core/bash/bash.nm
naoki: Initial checkin.
[people/amarx/ipfire-3.x.git] / pkgs / core / bash / bash.nm
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
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 #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include ../../Config
26
27 PKG_NAME = bash
28 PKG_VER = 4.0
29 PKG_REL = 0
30
31 PKG_MAINTAINER =
32 PKG_GROUP = System/Tools
33 PKG_URL = http://www.gnu.org/software/bash/
34 PKG_LICENSE = GPLv2+
35 PKG_SUMMARY = Bash is short for born again shell.
36
37 define PKG_DESCRIPTION
38 Bash is the shell, or command language interpreter, that will appear in \
39 the GNU operating system. Bash is an sh-compatible shell that incorporates \
40 useful features from the Korn shell (ksh) and C shell (csh). It is intended \
41 to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard.
42 endef
43
44 PKG_DEPS += readline
45
46 PKG_TARBALL = $(THISAPP).tar.gz
47
48 # This patch modifies Bash to use /dev/urandom (settable with
49 # --with-randomdev=) for $RANDOM, instead of getpid() and gettimeofday().
50 # The test is "( echo $RANDOM; ( echo $RANDOM ); ( echo $RANDOM ) )":
51 PKG_PATCHES += $(THISAPP)-rng.patch
52
53 # This patch fixes various reportded issures. It is the latest posted
54 # patch from linuxfromscratch.org.
55 PKG_PATCHES += $(THISAPP)-fixes-4.patch
56
57 PKG_PATCHES += $(THISAPP)-paths-1.patch
58 PKG_PATCHES += $(THISAPP)-profile-1.patch
59
60 include ../../Rules
61
62 ###############################################################################
63 # Installation Details
64 ###############################################################################
65
66 $(STAGE_PREPARE): $(OBJECTS)
67 @$(PRE_PREPARE)
68 cd $(DIR_SRC) && $(DO_EXTRACT) $(DIR_DL)/$(PKG_TARBALL)
69
70 $(DO_PATCHES)
71
72 # Bash uses the RTLD_LAZY option when loading libraries. We want to use
73 # RTLD_NOW (it is defined from <dlfcn.h>:
74 cd $(DIR_APP) && sed -e "s/filename, RTLD_LAZY/filename, RTLD_NOW/" \
75 -i builtins/enable.def
76
77 @$(POST_PREPARE)
78
79
80 $(STAGE_BUILD): $(STAGE_PREPARE)
81 @$(PRE_BUILD)
82
83 cd $(DIR_APP) && sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/$(THISAPP)|" \
84 Makefile.in
85
86 cd $(DIR_APP) && \
87 ac_cv_func_working_mktime=yes \
88 ./configure \
89 $(CONFIGURE_ARCH) \
90 --prefix=/usr \
91 --bindir=/bin \
92 --without-bash-malloc \
93 --with-installed-readline
94
95 cd $(DIR_APP) && make #$(PARALLELISMFLAGS)
96
97 @$(POST_BUILD)
98
99 $(STAGE_INSTALL): $(STAGE_BUILD)
100 @$(PRE_INSTALL)
101
102 cd $(DIR_APP) && make install DESTDIR=$(BUILDROOT)
103
104 # Bash startup files
105 cp -avf $(DIR_SOURCE)/bash/{bashrc,profile,shells} $(BUILDROOT)/etc
106
107 # /etc/profile.d
108 -mkdir -pv $(BUILDROOT)/etc/profile.d
109 cp -vf $(DIR_SOURCE)/profile.d/* $(BUILDROOT)/etc/profile.d
110
111 @$(POST_INSTALL)