build: clean usr/local/ on packages too

Some packages use configure_target() but don't set the /usr prefix.
This commit is contained in:
Andre Heider 2019-12-12 09:06:53 +01:00
parent 912a91619b
commit d31c44664c
2 changed files with 14 additions and 9 deletions

View File

@ -445,15 +445,15 @@ export SYSROOT_PREFIX="${PKG_ORIG_SYSROOT_PREFIX}"
if [ "${TARGET}" = "target" -o "${TARGET}" = "init" ]; then if [ "${TARGET}" = "target" -o "${TARGET}" = "init" ]; then
if [ -d ${INSTALL} ]; then if [ -d ${INSTALL} ]; then
rm -rf ${INSTALL}/{usr/,}man rm -rf ${INSTALL}/{usr/local/,usr/,}man
rm -rf ${INSTALL}/{usr/,}share/bash-completion rm -rf ${INSTALL}/{usr/local/,usr/,}share/bash-completion
rm -rf ${INSTALL}/{usr/,}share/doc rm -rf ${INSTALL}/{usr/local/,usr/,}share/doc
rm -rf ${INSTALL}/{usr/,}share/gtk-doc rm -rf ${INSTALL}/{usr/local/,usr/,}share/gtk-doc
rm -rf ${INSTALL}/{usr/,}share/info rm -rf ${INSTALL}/{usr/local/,usr/,}share/info
rm -rf ${INSTALL}/{usr/,}share/locale rm -rf ${INSTALL}/{usr/local/,usr/,}share/locale
rm -rf ${INSTALL}/{usr/,}share/man rm -rf ${INSTALL}/{usr/local/,usr/,}share/man
rm -rf ${INSTALL}/{usr/,}share/zsh rm -rf ${INSTALL}/{usr/local/,usr/,}share/zsh
rm -rf ${INSTALL}/{usr/,}var rm -rf ${INSTALL}/{usr/local/,usr/,}var
find ${INSTALL} \( -name "*.orig" \ find ${INSTALL} \( -name "*.orig" \
-o -name "*.rej" \ -o -name "*.rej" \
-o -name "*.o" \ -o -name "*.o" \

View File

@ -140,6 +140,11 @@ fi
if [ -n "${PKG_INSTALL}" -a -d "${PKG_INSTALL}" ]; then if [ -n "${PKG_INSTALL}" -a -d "${PKG_INSTALL}" ]; then
tar \ tar \
-C "${PKG_INSTALL}" \ -C "${PKG_INSTALL}" \
--exclude=./usr/local/include \
--exclude=./usr/local/lib/cmake \
--exclude=./usr/local/lib/pkgconfig \
--exclude=./usr/local/share/aclocal \
--exclude=./usr/local/share/pkgconfig \
--exclude=./usr/include \ --exclude=./usr/include \
--exclude=./usr/lib/cmake \ --exclude=./usr/lib/cmake \
--exclude=./usr/lib/pkgconfig \ --exclude=./usr/lib/pkgconfig \