diff options
-rw-r--r-- | mk/package.mk | 10 | ||||
-rw-r--r-- | mk/pkg-bottom.mk | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/mk/package.mk b/mk/package.mk index c0b5c04e6..9f40c337a 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -173,7 +173,7 @@ endif done @mkdir -p $${PACKAGE_DIR} '$${STAGING_PARENT}/pkg' \ '$${STAGING_DIR}/scripts' -ifneq ($(strip $(7)),noremove) +ifeq (,$(filter noremove,$(7))) if test -s '$${STAGING_PARENT}/pkg/$(1)'; then \ cd '$${STAGING_DIR}'; \ while read fn; do \ @@ -200,7 +200,10 @@ endif '$${STAGING_PARENT}/pkg/$(1)' | 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/$(1)' | \ + done +ifeq (,$(filter noscripts,$(7))) + cd '$${STAGING_DIR}'; grep 'usr/s*bin/' \ + '$${STAGING_PARENT}/pkg/$(1)' | \ while read fn; do \ b="$$$$(dd if="$$$$fn" bs=2 count=1 2>/dev/null)"; \ [[ $$$$b = '#!' ]] || continue; \ @@ -208,12 +211,13 @@ endif echo "scripts/$$$$(basename "$$$$fn")" \ >>'$${STAGING_PARENT}/pkg/$(1)'; \ done +endif $${IPKG_BUILD} $${IDIR_$(1)} $${PACKAGE_DIR} $(MAKE_TRACE) clean-targets: clean-dev-$(1) clean-dev-$(1): -ifneq ($(strip $(7)),noremove) +ifeq (,$(filter noremove,$(7))) if test -s '$${STAGING_PARENT}/pkg/$(1)'; then \ cd '$${STAGING_DIR}'; \ while read fn; do \ 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 \ |