diff options
author | Thorsten Glaser <tg@herc.mirbsd.org> | 2009-09-12 13:18:43 +0000 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2009-09-13 20:13:55 +0200 |
commit | 2fe7aa2130f3e72d2b39ed0929cfc6ae803cecd4 (patch) | |
tree | 251360acfff8badac1dd4a39d08362615e53bc1f | |
parent | 8e74f954ca7991808417952399524a5f8bd89b7f (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>
-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 \ |