rio: update to 0.2.0
[void-pkg.git] / common / hooks / post-install / 99-pkglint-warn-cross-cruft.sh
blob16e6c5ff65695a007ceb23f981dc3b02e76568e1
1 # This hook warns if :
2 # - Any text file /usr/{bin,lib,libexec,share} contains $XBPS_CROSS_BASE
3 # - Any text file /usr/{bin,lib,libexec,share} contains $XBPS_WRAPPERDIR
5 hook() {
6 if [ -z "$CROSS_BUILD" ]; then
7 return 0
8 fi
9 for d in bin lib libexec share; do
10 for f in $PKGDESTDIR/usr/$d/* $PKGDESTDIR/usr/$d/**/*; do
11 case "$(file -bi "$f")" in
12 text/*) if grep -q -e "$XBPS_CROSS_BASE" \
13 -e "$XBPS_WRAPPERDIR" "$f"; then
14 msg_warn "${f#$PKGDESTDIR} has cross cruft\n"
17 esac
18 done
19 done
20 return 0;