Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/busybox: ChangeLog busybox-1.9.2.ebuild
Date: Sat, 19 Apr 2008 22:18:14
Message-Id: E1JnLNr-0005hp-FV@stork.gentoo.org
1 vapier 08/04/19 22:18:11
2
3 Modified: ChangeLog
4 Added: busybox-1.9.2.ebuild
5 Log:
6 Version bump.
7 (Portage version: 2.2_pre5)
8
9 Revision Changes Path
10 1.182 sys-apps/busybox/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.182&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?rev=1.182&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/ChangeLog?r1=1.181&r2=1.182
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v
19 retrieving revision 1.181
20 retrieving revision 1.182
21 diff -u -r1.181 -r1.182
22 --- ChangeLog 13 Feb 2008 03:27:00 -0000 1.181
23 +++ ChangeLog 19 Apr 2008 22:18:10 -0000 1.182
24 @@ -1,6 +1,11 @@
25 # ChangeLog for sys-apps/busybox
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.181 2008/02/13 03:27:00 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.182 2008/04/19 22:18:10 vapier Exp $
29 +
30 +*busybox-1.9.2 (19 Apr 2008)
31 +
32 + 19 Apr 2008; Mike Frysinger <vapier@g.o> +busybox-1.9.2.ebuild:
33 + Version bump.
34
35 *busybox-1.9.0 (06 Feb 2008)
36
37
38
39
40 1.1 sys-apps/busybox/busybox-1.9.2.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/busybox-1.9.2.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/busybox/busybox-1.9.2.ebuild?rev=1.1&content-type=text/plain
44
45 Index: busybox-1.9.2.ebuild
46 ===================================================================
47 # Copyright 1999-2008 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.9.2.ebuild,v 1.1 2008/04/19 22:18:10 vapier Exp $
50
51 inherit eutils flag-o-matic savedconfig toolchain-funcs
52
53 ################################################################################
54 # BUSYBOX ALTERNATE CONFIG MINI-HOWTO
55 #
56 # Busybox can be modified in many different ways. Here's a few ways to do it:
57 #
58 # (1) Emerge busybox with FEATURES=keepwork so the work directory won't
59 # get erased afterwards. Add a definition like ROOT=/my/root/path to the
60 # start of the line if you're installing to somewhere else than the root
61 # directory. This command will save the default configuration to
62 # ${PORTAGE_CONFIGROOT} (or ${ROOT} if ${PORTAGE_CONFIGROOT} is not
63 # defined), and it will tell you that it has done this. Note the location
64 # where the config file was saved.
65 #
66 # FEATURES=keepwork USE=savedconfig emerge busybox
67 #
68 # (2) Go to the work directory and change the configuration of busybox using its
69 # menuconfig feature.
70 #
71 # cd /var/tmp/portage/busybox*/work
72 # make menuconfig
73 #
74 # (3) Save your configuration to the default location and copy it to the
75 # one of the locations listed in /usr/portage/eclass/savedconfig.eclass
76 #
77 # (4) Emerge busybox with USE=savedconfig to use the configuration file you
78 # just generated.
79 #
80 ################################################################################
81 #
82 # (1) Alternatively skip the above steps and simply emerge busybox without
83 # USE=savedconfig.
84 #
85 # (2) Edit the file it saves by hand. ${ROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF}
86 #
87 # (3) Remerge busybox as using USE=savedconfig.
88 #
89 ################################################################################
90
91 #SNAPSHOT=20040726
92 SNAPSHOT=""
93
94 DESCRIPTION="Utilities for rescue and embedded systems"
95 HOMEPAGE="http://www.busybox.net/"
96 if [[ -n ${SNAPSHOT} ]] ; then
97 MY_P=${PN}
98 SRC_URI="http://www.busybox.net/downloads/snapshots/${PN}-${SNAPSHOT}.tar.bz2"
99 else
100 MY_P=${PN}-${PV/_/-}
101 SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2"
102 fi
103
104 LICENSE="GPL-2"
105 SLOT="0"
106 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
107 IUSE="debug make-symlinks pam selinux static"
108 RESTRICT="test"
109
110 DEPEND="selinux? ( sys-libs/libselinux )
111 pam? ( sys-libs/pam )"
112
113 S=${WORKDIR}/${MY_P}
114
115 busybox_config_option() {
116 case $1 in
117 y) sed -i -e "s:.*CONFIG_$2.*set:CONFIG_$2=y:g" .config;;
118 n) sed -i -e "s:CONFIG_$2=y:# CONFIG_$2 is not set:g" .config;;
119 *) use $1 \
120 && busybox_config_option y $2 \
121 || busybox_config_option n $2
122 return 0
123 ;;
124 esac
125 einfo $(grep "CONFIG_$2[= ]" .config)
126 }
127
128 src_unpack() {
129 unset KBUILD_OUTPUT #88088
130
131 unpack ${MY_P}.tar.bz2
132 cd "${S}"
133
134 # patches go here!
135 epatch "${FILESDIR}"/busybox-1.7.0-bb.patch
136
137 # work around broken ass powerpc compilers
138 use ppc64 && append-flags -mminimal-toc
139 # flag cleanup
140 sed -i -r \
141 -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \
142 Makefile.flags || die
143 sed -i '/^#error Aborting compilation./d' applets/applets.c || die
144 use elibc_glibc && sed -i 's:-Wl,--gc-sections::' Makefile
145 cat <<-EOF >> Makefile.flags
146 CROSS_COMPILE := ${CHOST}-
147 HOSTCC := $(tc-getBUILD_CC)
148 SKIP_STRIP = y
149 EOF
150
151 # check for a busybox config before making one of our own.
152 # if one exist lets return and use it.
153
154 restore_config .config
155 if [ -f .config ]; then
156 yes "" | emake -j1 oldconfig > /dev/null
157 return 0
158 else
159 ewarn "Could not locate user configfile, so we will save a default one"
160 fi
161
162 # setup the config file
163 emake -j1 allyesconfig > /dev/null
164 busybox_config_option n DMALLOC
165 busybox_config_option n FEATURE_SUID_CONFIG
166 busybox_config_option n BUILD_AT_ONCE
167 busybox_config_option n BUILD_LIBBUSYBOX
168
169 # If these are not set and we are using a uclibc/busybox setup
170 # all calls to system() will fail.
171 busybox_config_option y FEATURE_SH_IS_ASH
172 busybox_config_option n FEATURE_SH_IS_NONE
173
174 if use static && use pam ; then
175 ewarn "You cannot have USE='static pam'. Assuming static is more important."
176 fi
177 use static \
178 && busybox_config_option n PAM \
179 || busybox_config_option pam PAM
180 busybox_config_option static STATIC
181 busybox_config_option debug DEBUG
182 use debug \
183 && busybox_config_option y NO_DEBUG_LIB \
184 && busybox_config_option n DMALLOC \
185 && busybox_config_option n EFENCE
186
187 busybox_config_option selinux SELINUX
188
189 # default a bunch of uncommon options to off
190 for opt in LOCALE_SUPPORT TFTP FTP{GET,PUT} IPCALC TFTP HUSH \
191 LASH MSH INETD DPKG RPM2CPIO RPM FOLD LOGNAME OD CRONTAB \
192 UUDECODE UUENCODE SULOGIN DC DEBUG_YANK_SUSv2 DEBUG_INIT \
193 DEBUG_CROND_OPTION FEATURE_UDHCP_DEBUG TASKSET
194 do
195 busybox_config_option n ${opt}
196 done
197
198 emake -j1 oldconfig > /dev/null
199 }
200
201 src_compile() {
202 unset KBUILD_OUTPUT #88088
203
204 emake busybox || die "build failed"
205 if ! use static && ! use pam ; then
206 mv busybox_unstripped{,.bak}
207 emake CONFIG_STATIC=y busybox || die "static build failed"
208 mv busybox_unstripped bb
209 mv busybox_unstripped{.bak,}
210 fi
211 }
212
213 src_install() {
214 unset KBUILD_OUTPUT #88088
215 save_config .config
216
217 into /
218 newbin busybox_unstripped busybox || die
219 if use static || use pam ; then
220 dosym busybox /bin/bb || die
221 dosym bb /bin/busybox.static || die
222 else
223 dobin bb || die
224 fi
225
226 insinto /$(get_libdir)/rcscripts/addons
227 doins "${FILESDIR}"/mdev-start.sh || die
228
229 # bundle up the symlink files for use later
230 emake install || die
231 rm _install/bin/busybox
232 tar cf busybox-links.tar -C _install . || : #;die
233 insinto /usr/share/${PN}
234 doins busybox-links.tar || die
235 newins .config ${PF}.config || die
236
237 dodoc AUTHORS README TODO
238
239 cd docs || die
240 docinto txt
241 dodoc *.txt
242 docinto pod
243 dodoc *.pod
244 dohtml *.html *.sgml
245
246 cd ../examples || die
247 docinto examples
248 dodoc inittab depmod.pl *.conf *.script undeb unrpm
249
250 cd bootfloppy || die
251 docinto bootfloppy
252 dodoc * etc/* etc/init.d/* 2>/dev/null
253 }
254
255 pkg_preinst() {
256 if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then
257 ewarn "setting USE=make-symlinks and emerging to / is very dangerous."
258 ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)."
259 ewarn "If you are creating a binary only and not merging this is probably ok."
260 ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is realy what you want."
261 die "silly options will destroy your system"
262 fi
263
264 if use make-symlinks ; then
265 mv "${D}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die
266 fi
267 }
268
269 pkg_postinst() {
270 if use make-symlinks ; then
271 cd "${T}" || die
272 mkdir _install
273 tar xf busybox-links.tar -C _install || die
274 cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed"
275 fi
276
277 echo
278 einfo "This ebuild has support for user defined configs"
279 einfo "Please read this ebuild for more details and re-emerge as needed"
280 einfo "if you want to add or remove functionality for ${PN}"
281 echo
282 }
283
284
285
286 --
287 gentoo-commits@l.g.o mailing list