xbps-src: added strip_cmd variable, can be overriden per template.

This commit is contained in:
Juan RP 2011-07-17 17:47:31 +02:00
parent c3523a9402
commit d9f155607c
2 changed files with 4 additions and 6 deletions

View file

@ -42,10 +42,8 @@ strip_files_real()
{
local lver
if ! command -v strip 2>&1 >/dev/null; then
return 0
fi
[ -n "$nostrip" -o -n "$noarch" ] && return 0
[ -z "$strip_cmd" ] && strip_cmd=strip
if [ -n "$revision" ]; then
lver="${version}_${revision}"
@ -57,10 +55,10 @@ strip_files_real()
find ${DESTDIR} -type f | while read f; do
case "$(file -bi "$f")" in
application/x-executable*)
strip "$f" && \
${strip_cmd} "$f" && \
echo " Stripped executable: $(basename $f)";;
application/x-sharedlib*|application/x-archive*)
strip -S "$f" && \
${strip_cmd} -S "$f" && \
echo " Stripped library: $(basename $f)";;
esac
done

View file

@ -87,7 +87,7 @@ info_tmpl()
#
reset_tmpl_vars()
{
local TMPL_VARS="pkgname distfiles configure_args \
local TMPL_VARS="pkgname distfiles configure_args strip_cmd \
make_build_args make_install_args build_style \
short_desc maintainer long_desc checksum wrksrc \
make_cmd bootstrap register_shell keep_empty_dirs \