xbps-src: create a new hook that collects shlib-provides.

This is necessary to be able to collect shlib-provides for 32bit pkgs,
which are autogenerated.

The strip-and-debug-pkgs hook now just does what its name mentions:
 strip binaries and create -dbg pkgs.
This commit is contained in:
Juan RP 2015-01-30 12:20:00 +01:00
parent c3073185f6
commit 6c395cb76e
2 changed files with 54 additions and 19 deletions

View file

@ -1,7 +1,6 @@
# This hook executes the following tasks:
# - strips ELF binaries/libraries
# - generates -dbg pkgs
# - generates shlib-provides file for xbps-create(8)
make_debug() {
local dname= fname= dbgfile=
@ -111,14 +110,6 @@ hook() {
return 1
fi
echo " Stripped library: ${f#$PKGDESTDIR}"
_soname=$(${OBJDUMP} -p "$f"|grep SONAME|awk '{print $2}')
pattern="^[[:alnum:]]+(.*)+\.so(\.[0-9]+)*$"
if [[ ${_soname} =~ $pattern ]]; then
if [ ! -e ${PKGDESTDIR}/usr/lib/${fname} ]; then
continue
fi
echo "${_soname}" >> ${PKGDESTDIR}/.shlib-provides
fi
attach_debug "$f"
;;
application/x-archive*)
@ -131,16 +122,6 @@ hook() {
echo " Stripped static library: ${f#$PKGDESTDIR}";;
esac
done
for f in ${shlib_provides}; do
echo "$f" >> ${PKGDESTDIR}/.shlib-provides
done
if [ -s "$PKGDESTDIR/.shlib-provides" ]; then
cat $PKGDESTDIR/.shlib-provides | tr '\n' ' ' > $PKGDESTDIR/shlib-provides
echo >> $PKGDESTDIR/shlib-provides
rm -f $PKGDESTDIR/.shlib-provides
fi
create_debug_pkg
return $?
}