Magellan Linux

Annotation of /trunk/core/bash/bash-3.2-r6.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 28 - (hide annotations) (download)
Fri Oct 10 23:25:33 2008 UTC (15 years, 8 months ago) by niro
File size: 3824 byte(s)
- moved to 'core'
1 niro 28 # $Header: /magellan-cvs/smage/bash/bash-3.2-r5.smage2,v 1.1 2008/02/09 13:41:59 niro Exp $
2    
3     PNAME="bash"
4     PVER="3.2"
5     PBUILD="r6"
6    
7     PATCH_LEVEL="39"
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
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     UP2DATE="updatecmd_gnu ${PNAME} gz"
44    
45     src_prepare()
46     {
47     munpack ${SRCFILE} || die
48     cd ${SRCDIR}
49    
50     # apply all upstream patches
51     local i
52     local ver
53     for ((i=1; i <= PATCH_LEVEL; i++))
54     do
55     ver=00${i}
56     [[ ${i} -ge 10 ]] && ver=0${i}
57     [[ ${i} -ge 100 ]] && ver=${i}
58    
59     mpatch ${PNAME}${PVER/./}-${ver} || die
60     done
61    
62     # fix parallel make
63     mpatch ${PNAME}-3.0-parallel-build.patch || die
64    
65     # other redhat patches:
66    
67     # adds more functionality to ulimit
68     mpatch ${PNAME}-${PVER}-ulimit.patch || die
69    
70     # don't barf on handled signals in scripts
71     mpatch ${PNAME}-3.0-trap-fg-signals.patch || die
72    
73     # enable SSH_SOURCE_BASHRC
74     sed -i 's:^.*\(#define SSH_SOURCE_BASHRC\).*$:\1:' config-top.h || die
75    
76     # location of the default mail directory
77     # (not using config-top.h but config.h.in to suppress annoying warnings)
78     sed -i 's:^\(#define DEFAULT_MAIL_DIRECTORY\).*:\1 "/usr/spool/mail":' config.h.in || die
79    
80     # run the startup files
81     echo '#define NON_INTERACTIVE_LOGIN_SHELLS' >> config-top.h || die
82    
83     # location of system-wide bashrc
84     echo '#define SYS_BASHRC "/etc/bash/bashrc"' >> config-top.h || die
85    
86     # location of system-wide bash_logout
87     echo '#define SYS_BASH_LOGOUT "/etc/bash/bash_logout"' >> config-top.h || die
88    
89     # Force pgrp synchronization
90     # (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=81653)
91     #
92     # The session will hang cases where you 'su' (not 'su -') and
93     # then run a piped command in emacs.
94     # This problem seem to happen due to scheduler changes kernel
95     # side - although reproduceble with later 2.4 kernels, it is
96     # especially easy with 2.6 kernels.
97     echo '#define PGRP_PIPE 1' >> config-bot.h || die
98     }
99    
100     src_compile()
101     {
102     cd ${SRCDIR}
103    
104     mconfigure \
105     --bindir=/bin \
106     --disable-profiling \
107     --with-curses \
108     --without-gnu-malloc \
109     || die
110    
111     # on x86_64 parallel is broken; patch not work
112     mmake -j1 || die
113     }
114    
115     src_install()
116     {
117     cd ${SRCDIR}
118     make DESTDIR=${BINDIR} bindir=/bin install || die
119    
120     # some needed symlinks
121     mlink bash /bin/sh || die
122     mlink bash /bin/rbash || die
123    
124     # install skeletons
125     for i in bashrc bash_profile bash_logout
126     do
127     minstalletc dot.${i} .${i} /etc/skel || die
128     done
129    
130     # install global rcs
131     minstalletc bashrc bashrc /etc/bash || die
132     minstalletc bash_logout bash_logout /etc/bash || die
133    
134     minstalldocs ABOUT-NLS AUTHORS CHANGES COMPAT COPYING MANIFEST \
135     NEWS NOTES POSIX RBASH README || die
136     }
137    
138     postinstall()
139     {
140     # install skeletons for root, as bash is our default shell
141     if [[ ! -f ${MROOT}/root/.bashrc ]]
142     then
143     install -m0644 ${MROOT}/etc/skel/.bashrc ${MROOT}/root
144     fi
145     if [[ ! -f ${MROOT}/root/.bash_profile ]]
146     then
147     install -m0644 ${MROOT}/etc/skel/.bash_profile ${MROOT}/root
148     fi
149     if [[ ! -f ${MROOT}/root/.bash_logout ]]
150     then
151     install -m0644 ${MROOT}/etc/skel/.bash_logout ${MROOT}/root
152     fi
153     }

Properties

Name Value
svn:keywords Id