diff --git a/scripts/build b/scripts/build index 08b1bb7811..3b402e8410 100755 --- a/scripts/build +++ b/scripts/build @@ -445,24 +445,17 @@ export SYSROOT_PREFIX="${PKG_ORIG_SYSROOT_PREFIX}" if [ "${TARGET}" = "target" -o "${TARGET}" = "init" ]; then if [ -d ${INSTALL} ]; then - rm -rf ${INSTALL}/{usr/,}include - rm -rf ${INSTALL}/{usr/,}lib/cmake - rm -rf ${INSTALL}/{usr/,}lib/pkgconfig rm -rf ${INSTALL}/{usr/,}man - rm -rf ${INSTALL}/{usr/,}share/aclocal rm -rf ${INSTALL}/{usr/,}share/bash-completion rm -rf ${INSTALL}/{usr/,}share/doc rm -rf ${INSTALL}/{usr/,}share/gtk-doc rm -rf ${INSTALL}/{usr/,}share/info rm -rf ${INSTALL}/{usr/,}share/locale rm -rf ${INSTALL}/{usr/,}share/man - rm -rf ${INSTALL}/{usr/,}share/pkgconfig rm -rf ${INSTALL}/{usr/,}share/zsh rm -rf ${INSTALL}/{usr/,}var find ${INSTALL} \( -name "*.orig" \ -o -name "*.rej" \ - -o -name "*.a" \ - -o -name "*.la" \ -o -name "*.o" \ -o -name "*.in" \ -o -name ".git*" \) \ diff --git a/scripts/install b/scripts/install index 2c0aec42e7..5e435600ce 100755 --- a/scripts/install +++ b/scripts/install @@ -138,7 +138,22 @@ if [ "${TARGET}" = "target" ] ; then fi if [ -n "${PKG_INSTALL}" -a -d "${PKG_INSTALL}" ]; then - cp -PR ${PKG_INSTALL}/* ${INSTALL} + tar \ + -C "${PKG_INSTALL}" \ + --exclude=./usr/include \ + --exclude=./usr/lib/cmake \ + --exclude=./usr/lib/pkgconfig \ + --exclude=./usr/share/aclocal \ + --exclude=./usr/share/pkgconfig \ + --exclude=./include \ + --exclude=./lib/cmake \ + --exclude=./lib/pkgconfig \ + --exclude=./share/aclocal \ + --exclude=./share/pkgconfig \ + --exclude=./.* \ + --exclude='*.a' \ + --exclude='*.la' \ + -cf - . | tar -C "${INSTALL}" -xf - fi if [ "${TARGET}" = "target" ] ; then