summaryrefslogtreecommitdiff
path: root/mk/pkg-bottom.mk
diff options
context:
space:
mode:
authorThorsten Glaser <tg@herc.mirbsd.org>2009-09-12 13:18:43 +0000
committerWaldemar Brodkorb <wbx@openadk.org>2009-09-13 20:13:55 +0200
commit2fe7aa2130f3e72d2b39ed0929cfc6ae803cecd4 (patch)
tree251360acfff8badac1dd4a39d08362615e53bc1f /mk/pkg-bottom.mk
parent8e74f954ca7991808417952399524a5f8bd89b7f (diff)
patch
From c056028f24ed7f93528e9643a2d7297789c20891 Mon Sep 17 00:00:00 2001 From: Thorsten Glaser <tg@mirbsd.org> Date: Sat, 12 Sep 2009 13:07:42 +0000 Subject: [PATCH] Fix PKG_OPTS+=noscripts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit • Fix check PKG_OPTS for “noremove” (like DEB_BUILD_OPTIONS) • Add code for “noscripts”, as defined and requested by wbx Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Diffstat (limited to 'mk/pkg-bottom.mk')
-rw-r--r--mk/pkg-bottom.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk
index a3692acdd..cf4c62f95 100644
--- a/mk/pkg-bottom.mk
+++ b/mk/pkg-bottom.mk
@@ -121,7 +121,7 @@ endif
$(SED) "s,^prefix=.*,prefix=${STAGING_DIR}/usr," $$a; \
done
@env ${MAKE_ENV} ${MAKE} post-install $(MAKE_TRACE)
-ifneq ($(strip ${PKG_OPTS}),noremove)
+ifeq (,$(filter noremove,${PKG_OPTS}))
if test -s '${STAGING_PARENT}/pkg/${PKG_NAME}'; then \
cd '${STAGING_DIR}'; \
while read fn; do \
@@ -143,7 +143,10 @@ endif
'${STAGING_PARENT}/pkg/${PKG_NAME}' | while read fn; do \
chmod u+w $$fn; \
$(SED) "s,\(^libdir='\| \|-L\|^dependency_libs='\)/usr/lib,\1$(STAGING_DIR)/usr/lib,g" $$fn; \
- done; grep 'usr/s*bin/' '${STAGING_PARENT}/pkg/${PKG_NAME}' | \
+ done
+ifeq (,$(filter noscripts,${PKG_OPTS}))
+ @cd '${STAGING_DIR}'; grep 'usr/s*bin/' \
+ '${STAGING_PARENT}/pkg/${PKG_NAME}' | \
while read fn; do \
b="$$(dd if="$$fn" bs=2 count=1 2>/dev/null)"; \
[[ $$b = '#!' ]] || continue; \
@@ -151,6 +154,7 @@ endif
echo "scripts/$$(basename "$$fn")" \
>>'${STAGING_PARENT}/pkg/${PKG_NAME}'; \
done
+endif
touch $@
${_IPKGS_COOKIE}:
@@ -202,7 +206,7 @@ package: ${ALL_IPKGS}
clean-targets: clean-dev-generic
clean-dev-generic:
-ifneq ($(strip ${PKG_OPTS}),noremove)
+ifeq (,$(filter noremove,${PKG_OPTS}))
if test -s '${STAGING_PARENT}/pkg/${PKG_NAME}'; then \
cd '${STAGING_DIR}'; \
while read fn; do \