summaryrefslogtreecommitdiffhomepage
path: root/subr/pkg_install_files.subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-05-26 18:50:52 +0100
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-05-26 18:50:52 +0100
commit8e39bd5d9682d2e7259d9bb5944ecbe1b8a4500d (patch)
tree2ceef5d8135cc9a2f15f6434d5f332dfc2022786 /subr/pkg_install_files.subr
parente7be9c882dc7a50221c667778169df58c87e8a2c (diff)
downloadmidipix_build-8e39bd5d9682d2e7259d9bb5944ecbe1b8a4500d.tar.bz2
midipix_build-8e39bd5d9682d2e7259d9bb5944ecbe1b8a4500d.tar.xz
subr/pkg_install{,_files}.subr: call pkgp_install{,_files}_perms() as early as possible.
Diffstat (limited to 'subr/pkg_install_files.subr')
-rw-r--r--subr/pkg_install_files.subr25
1 files changed, 25 insertions, 0 deletions
diff --git a/subr/pkg_install_files.subr b/subr/pkg_install_files.subr
index 19c1a15b..7bfedb77 100644
--- a/subr/pkg_install_files.subr
+++ b/subr/pkg_install_files.subr
@@ -10,6 +10,30 @@ pkgp_install_files() {
fi;
};
+pkgp_install_files_perms() {
+ local _destdir="" _fname="" IFS;
+ for _destdir in "${PKG_DESTDIR}" "${PKG_DESTDIR_HOST}"; do
+ if [ -e "${_destdir}" ]; then
+ rtl_set_IFS_nl;
+ for _fname in $(find "${_destdir}" -type d); do
+ if ! rtl_fileop chmod 0755 "${_fname}"; then
+ return 1;
+ fi;
+ done;
+ for _fname in $(find "${_destdir}" \( -not -perm /0111 \) -type f); do
+ if ! rtl_fileop chmod 0644 "${_fname}"; then
+ return 1;
+ fi;
+ done;
+ for _fname in $(find "${_destdir}" -perm /0111 -type f); do
+ if ! rtl_fileop chmod 0755 "${_fname}"; then
+ return 1;
+ fi;
+ done;
+ fi;
+ done;
+};
+
pkgp_install_files_pkgconfig() {
local _pc_path="";
for _pc_path in $(find "${PKG_DESTDIR}" -name \*.pc); do
@@ -44,6 +68,7 @@ pkgp_install_files_strip() {
pkg_install_files() {
if ! pkgp_install_files\
+ || ! pkgp_install_files_perms\
|| ! pkgp_install_files_pkgconfig\
|| ! pkgp_install_files_strip; then
return 1;