From 912a91619b9e804a1eb19ba420c99860de3ae017 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Thu, 12 Dec 2019 09:05:15 +0100 Subject: [PATCH] build: don't wipe devel files from packages, just don't install them With the upcoming usage of the standard install_pkg folder for addon dependencies, the devel files need to be accessible, e.g. ffmpegx for tvheadend. So don't wipe them from the package install folder, just skip copying them to the image. --- scripts/build | 7 ------- scripts/install | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 8 deletions(-) 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