Lines 169-176
src_unpack() {
Link Here
|
169 |
|
169 |
|
170 |
src_compile() { |
170 |
src_compile() { |
171 |
busybox_set_env |
171 |
busybox_set_env |
|
|
172 |
|
173 |
# work around broken ass powerpc compilers |
172 |
use ppc64 && append-flags -mminimal-toc $(test-flags-CC -fno-stack-protector) |
174 |
use ppc64 && append-flags -mminimal-toc $(test-flags-CC -fno-stack-protector) |
173 |
use ppc && append-flags $(test-flags-CC -fno-stack-protector) |
175 |
use ppc && append-flags $(test-flags-CC -fno-stack-protector) |
|
|
176 |
|
174 |
emake CROSS="${CROSS}" busybox || die "build failed" |
177 |
emake CROSS="${CROSS}" busybox || die "build failed" |
175 |
if ! use static ; then |
178 |
if ! use static ; then |
176 |
mv busybox_unstripped{,.bak} |
179 |
mv busybox_unstripped{,.bak} |
Lines 203-229
src_install() {
Link Here
|
203 |
&& dosym busybox /bin/bb \ |
206 |
&& dosym busybox /bin/bb \ |
204 |
|| dobin bb |
207 |
|| dobin bb |
205 |
|
208 |
|
206 |
if use make-symlinks ; then |
209 |
# bundle up the symlink files for use later |
207 |
if [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then |
210 |
make CROSS="${CROSS}" install || die |
208 |
ewarn "setting USE=make-symlinks and emerging to / is very dangerous." |
211 |
rm _install/bin/busybox |
209 |
ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." |
212 |
tar cf busybox-links.tar -C _install . || die |
210 |
ewarn "If you are creating a binary only and not merging this is probably ok." |
213 |
insinto /usr/share/${PN} |
211 |
ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is realy what you want." |
214 |
doins busybox-links.tar || die |
212 |
die "silly options will destroy your system" |
|
|
213 |
fi |
214 |
make CROSS="${CROSS}" install || die |
215 |
cp -pPR _install/${x}/* "${D}"/ || die "copying links for ${x} failed" |
216 |
cd "${D}" |
217 |
# XXX: should really move this to pkg_preinst() ... |
218 |
local symlink |
219 |
for symlink in {,usr/}{bin,sbin}/* linuxrc ; do |
220 |
[[ -L ${symlink} ]] || continue |
221 |
[[ -e ${ROOT}/${symlink} ]] \ |
222 |
&& eerror "Deleting symlink ${symlink} because it exists in ${ROOT}" \ |
223 |
&& rm ${symlink} |
224 |
done |
225 |
cd "${S}" |
226 |
fi |
227 |
|
215 |
|
228 |
dodoc AUTHORS README TODO |
216 |
dodoc AUTHORS README TODO |
229 |
|
217 |
|
Lines 234-242
src_install() {
Link Here
|
234 |
dodoc *.pod |
222 |
dodoc *.pod |
235 |
dohtml *.html *.sgml |
223 |
dohtml *.html *.sgml |
236 |
|
224 |
|
237 |
# no man files? |
|
|
238 |
# cd ../man && doman *.1 |
239 |
|
240 |
cd ../examples || die |
225 |
cd ../examples || die |
241 |
docinto examples |
226 |
docinto examples |
242 |
dodoc inittab depmod.pl *.conf *.script undeb unrpm |
227 |
dodoc inittab depmod.pl *.conf *.script undeb unrpm |
Lines 244-266
src_install() {
Link Here
|
244 |
cd bootfloppy || die |
229 |
cd bootfloppy || die |
245 |
docinto bootfloppy |
230 |
docinto bootfloppy |
246 |
dodoc * etc/* etc/init.d/* 2>/dev/null |
231 |
dodoc * etc/* etc/init.d/* 2>/dev/null |
|
|
232 |
} |
247 |
|
233 |
|
248 |
cd ../../ || die |
234 |
pkg_preinst() { |
249 |
if has buildpkg ${FEATURES} && has keepwork ${FEATURES} ; then |
235 |
if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then |
250 |
cd "${S}" |
236 |
ewarn "setting USE=make-symlinks and emerging to / is very dangerous." |
251 |
# this should install to the ./_install/ dir by default. |
237 |
ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." |
252 |
# we make a micro pkg of busybox that can be used for |
238 |
ewarn "If you are creating a binary only and not merging this is probably ok." |
253 |
# embedded systems -solar |
239 |
ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is realy what you want." |
254 |
if ! use make-symlinks ; then |
240 |
die "silly options will destroy your system" |
255 |
make CROSS="${CROSS}" install || die |
|
|
256 |
fi |
257 |
cd ./_install/ \ |
258 |
&& tar --no-same-owner -jcvf ${WORKDIR}/${MY_P}-${ARCH}.bz2 . \ |
259 |
&& cd .. |
260 |
fi |
241 |
fi |
|
|
242 |
|
243 |
mv "${D}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die |
261 |
} |
244 |
} |
262 |
|
245 |
|
263 |
pkg_postinst() { |
246 |
pkg_postinst() { |
|
|
247 |
if use make-symlinks ; then |
248 |
cd "${T}" || die |
249 |
mkdir _install |
250 |
tar xf busybox-links.tar -C _install || die |
251 |
cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" |
252 |
fi |
253 |
|
264 |
if use savedconfig ; then |
254 |
if use savedconfig ; then |
265 |
local config_dir="${PORTAGE_CONFIGROOT:-${ROOT}}/etc/portage/savedconfig" |
255 |
local config_dir="${PORTAGE_CONFIGROOT:-${ROOT}}/etc/portage/savedconfig" |
266 |
einfo "Saving this build config to ${config_dir}/${PF}.config" |
256 |
einfo "Saving this build config to ${config_dir}/${PF}.config" |
Lines 275-280
pkg_postinst() {
Link Here
|
275 |
einfo "if you want to add or remove functionality for ${PN}" |
265 |
einfo "if you want to add or remove functionality for ${PN}" |
276 |
echo |
266 |
echo |
277 |
} |
267 |
} |
278 |
|
|
|
279 |
|
280 |
|