4 |
# needs pkgbuild_dir (mage) |
# needs pkgbuild_dir (mage) |
5 |
|
|
6 |
# SMAGE2 |
# SMAGE2 |
7 |
# version: 0.3.6-r15 |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.10 2005-06-01 15:49:20 niro Exp $ |
8 |
|
|
9 |
#01.10.2004 |
#01.10.2004 |
10 |
# added ccache support |
# added ccache support |
339 |
done |
done |
340 |
} |
} |
341 |
|
|
342 |
|
mstriplibs() { |
343 |
|
local stripdir="$@" |
344 |
|
|
345 |
|
[ -z "${stripdir}" ] && stripdir=${BINDIR} |
346 |
|
find ${stripdir} | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |
347 |
|
} |
348 |
|
|
349 |
|
mstripbins() { |
350 |
|
local stripdir="$@" |
351 |
|
|
352 |
|
[ -z "${stripdir}" ] && stripdir=${BINDIR} |
353 |
|
find ${stripdir} | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |
354 |
|
} |
355 |
|
|
356 |
setup_distcc_environment(){ |
setup_distcc_environment(){ |
357 |
if [ -x /usr/bin/distcc ] |
if [ -x /usr/bin/distcc ] |
358 |
then |
then |
651 |
${MLIBDIR}/compressdoc -g -9 ${BUILDDIR}/builded/usr/share/info |
${MLIBDIR}/compressdoc -g -9 ${BUILDDIR}/builded/usr/share/info |
652 |
fi |
fi |
653 |
|
|
654 |
|
# stripping all bins and libs |
655 |
|
case ${NOSTRIP} in |
656 |
|
true|TRUE|yes|y) |
657 |
|
echo -e "NOSTRIP=true detected; Package will not be stripped ..." |
658 |
|
;; |
659 |
|
*) |
660 |
|
echo -e "Stripping binaries ..." |
661 |
|
mstripbins ${BINDIR} |
662 |
|
echo -e "Stripping libraries ..." |
663 |
|
mstriplibs ${BINDIR} |
664 |
|
;; |
665 |
|
esac |
666 |
|
|
667 |
#the new buildpkg command |
#the new buildpkg command |
668 |
case ${NOPKGBUILD} in |
case ${NOPKGBUILD} in |
669 |
true|TRUE|yes|y) |
true|TRUE|yes|y) |