summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-05-01 17:37:02 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-05-26 08:15:08 +0200
commit75e60fe045c7961f374965034aab15cf16f19d6f (patch)
tree7881721836565b476021e4c09b6f20f3a6f9bf00 /rules
parent5efcadb3dc32132b3ea73035ecd617c9e7ac873c (diff)
downloadptxdist-75e60fe045c7961f374965034aab15cf16f19d6f.tar.gz
ptxdist-75e60fe045c7961f374965034aab15cf16f19d6f.tar.xz
install: add new 'install_glob' command
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules')
-rw-r--r--rules/post/install.make28
1 files changed, 28 insertions, 0 deletions
diff --git a/rules/post/install.make b/rules/post/install.make
index 7da3f0406..c40e36eb6 100644
--- a/rules/post/install.make
+++ b/rules/post/install.make
@@ -185,6 +185,34 @@ install_archive = \
echo "ptxd_install_archive '$$DIR' '$$DST' '$$OWN' '$$GRP'" >> "$(STATEDIR)/$$XPKG.cmds"
#
+# install_glob
+#
+# Installs all files and subdirectories with user/group ownership and
+# permissions via fakeroot.
+#
+#
+# $1: xpkg label
+# $2: OWN, use '-' to use the real UID of each file/directory
+# $3: GID, use '-' to use the real GID of each file/directory
+# $4: the toplevel directory, or "-": to use $(PKG_PKGDIR)/$destination
+# $5: the target directory.
+# $6: the search patterns for 'find -path'
+# $7: the search patterns for '! find -path'
+# $8: strip
+#
+install_glob = \
+ XPKG=$(subst _,-,$(strip $(1))); \
+ OWN=$(strip $(2)); \
+ GRP=$(strip $(3)); \
+ DIR=$(strip $(4)); \
+ DST=$(strip $(5)); \
+ YGLOB="$(strip $(6))"; \
+ NGLOB="$(strip $(7))"; \
+ STRIP=$(strip $(8)); \
+ $(call install_check, install_tree); \
+ echo "ptxd_install_glob '$$DIR' '$$DST' '$$YGLOB' '$$NGLOB' '$$OWN' '$$GRP' '$$STRIP'" >> "$(STATEDIR)/$$XPKG.cmds"
+
+#
# install_spec
#
# Installs files specified by a spec file