Magellan Linux

Contents of /smage/trunk/core/bash/bash-3.2-r5.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6 - (show annotations) (download)
Sun Jan 11 01:07:49 2009 UTC (15 years, 3 months ago) by niro
File size: 3706 byte(s)
-fixed old cvs headers
1 # $Id$
2
3 PNAME="bash"
4 PVER="3.2"
5 PBUILD="r5"
6
7 PATCH_LEVEL="33"
8
9 PCATEGORIE="app-shells"
10 STATE="unstable"
11
12 DESCRIPTION="The standard GNU Bourne again shell."
13 HOMEPAGE="http://www.gnu.org/software/bash/bash.html"
14
15 DEPEND=">= sys-libs/ncurses-5.6"
16
17 SRCFILE="${PNAME}-${PVER}.tar.gz"
18 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
19
20 sminclude mtools alx
21
22 SRC_URI=(
23 gnu://${PNAME}/${SRCFILE}
24 mirror://${PNAME}/${SRCFILE}
25 mirror://${PNAME}/dot.bashrc
26 mirror://${PNAME}/dot.bash_profile
27 mirror://${PNAME}/dot.bash_logout
28 mirror://${PNAME}/bashrc
29 mirror://${PNAME}/bash_logout
30 $(for ((i=1;i <= PATCH_LEVEL; i++))
31 do
32 ver=00${i}
33 [[ ${i} -ge 10 ]] && ver=0${i}
34 [[ ${i} -ge 100 ]] && ver=${i}
35 echo "gnu://${PNAME}/${PNAME}-${PVER}-patches/${PNAME}${PVER/./}-${ver}"
36 echo "mirror://${PNAME}/${PNAME}${PVER/./}-${ver}"
37 done)
38 mirror://${PNAME}/${PNAME}-3.0-parallel-build.patch
39 mirror://${PNAME}/${PNAME}-${PVER}-ulimit.patch
40 mirror://${PNAME}/${PNAME}-3.0-trap-fg-signals.patch
41 )
42
43 src_prepare()
44 {
45 munpack ${SRCFILE} || die
46 cd ${SRCDIR}
47
48 # apply all upstream patches
49 local i
50 local ver
51 for ((i=1; i <= PATCH_LEVEL; i++))
52 do
53 ver=00${i}
54 [[ ${i} -ge 10 ]] && ver=0${i}
55 [[ ${i} -ge 100 ]] && ver=${i}
56
57 mpatch ${PNAME}${PVER/./}-${ver} || die
58 done
59
60 # fix parallel make
61 mpatch ${PNAME}-3.0-parallel-build.patch || die
62
63 # other redhat patches:
64
65 # adds more functionality to ulimit
66 mpatch ${PNAME}-${PVER}-ulimit.patch || die
67
68 # don't barf on handled signals in scripts
69 mpatch ${PNAME}-3.0-trap-fg-signals.patch || die
70
71 # enable SSH_SOURCE_BASHRC
72 sed -i 's:^.*\(#define SSH_SOURCE_BASHRC\).*$:\1:' config-top.h || die
73
74 # location of the default mail directory
75 # (not using config-top.h but config.h.in to suppress annoying warnings)
76 sed -i 's:^\(#define DEFAULT_MAIL_DIRECTORY\).*:\1 "/usr/spool/mail":' config.h.in || die
77
78 # run the startup files
79 echo '#define NON_INTERACTIVE_LOGIN_SHELLS' >> config-top.h || die
80
81 # location of system-wide bashrc
82 echo '#define SYS_BASHRC "/etc/bash/bashrc"' >> config-top.h || die
83
84 # location of system-wide bash_logout
85 echo '#define SYS_BASH_LOGOUT "/etc/bash/bash_logout"' >> config-top.h || die
86
87 # Force pgrp synchronization
88 # (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=81653)
89 #
90 # The session will hang cases where you 'su' (not 'su -') and
91 # then run a piped command in emacs.
92 # This problem seem to happen due to scheduler changes kernel
93 # side - although reproduceble with later 2.4 kernels, it is
94 # especially easy with 2.6 kernels.
95 echo '#define PGRP_PIPE 1' >> config-bot.h || die
96 }
97
98 src_compile()
99 {
100 cd ${SRCDIR}
101
102 mconfigure \
103 --bindir=/bin \
104 --disable-profiling \
105 --with-curses \
106 --without-gnu-malloc \
107 || die
108
109 # on x86_64 parallel is broken; patch not work
110 mmake -j1 || die
111 }
112
113 src_install()
114 {
115 cd ${SRCDIR}
116 make DESTDIR=${BINDIR} bindir=/bin install || die
117
118 # some needed symlinks
119 mlink bash /bin/sh || die
120 mlink bash /bin/rbash || die
121
122 # install skeletons
123 for i in bashrc bash_profile bash_logout
124 do
125 minstalletc dot.${i} .${i} /etc/skel || die
126 done
127
128 # install global rcs
129 minstalletc bashrc bashrc /etc/bash || die
130 minstalletc bash_logout bash_logout /etc/bash || die
131
132 minstalldocs ABOUT-NLS AUTHORS CHANGES COMPAT COPYING MANIFEST \
133 NEWS NOTES POSIX RBASH README || die
134 }
135
136 postinstall()
137 {
138 # install skeletons for root, as bash is our default shell
139 if [[ ! -f ${MROOT}/root/.bashrc ]]
140 then
141 install -m0644 ${MROOT}/etc/skel/.bashrc ${MROOT}/root
142 fi
143 if [[ ! -f ${MROOT}/root/.bash_profile ]]
144 then
145 install -m0644 ${MROOT}/etc/skel/.bash_profile ${MROOT}/root
146 fi
147 if [[ ! -f ${MROOT}/root/.bash_logout ]]
148 then
149 install -m0644 ${MROOT}/etc/skel/.bash_logout ${MROOT}/root
150 fi
151 }

Properties

Name Value
svn:keywords Id