From: Markos Chandras <markos.chandras@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] libcap: Add optional support for libattr capabilities
Date: Fri, 15 Mar 2013 16:22:38 +0000 [thread overview]
Message-ID: <1363364558-5321-1-git-send-email-markos.chandras@gmail.com> (raw)
From: Markos Chandras <markos.chandras@imgtec.com>
libcap can optionally link to libattr to support extra
file capabilities. Link to this library and pull it as
dependency if BR2_PACKAGE_ATTR is selected.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
package/libcap/libcap.mk | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/package/libcap/libcap.mk b/package/libcap/libcap.mk
index dcd3a18..c319335 100644
--- a/package/libcap/libcap.mk
+++ b/package/libcap/libcap.mk
@@ -15,18 +15,25 @@ LIBCAP_LICENSE_FILES = License
LIBCAP_DEPENDENCIES = host-libcap
LIBCAP_INSTALL_STAGING = YES
+ifeq ($(BR2_PACKAGE_ATTR),y)
+ LIBCAP_DEPENDENCIES += host-attr attr
+ HAVE_LIBATTR = yes
+else
+ HAVE_LIBATTR = no
+endif
+
define LIBCAP_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
- LIBATTR=no BUILD_CC="$(HOSTCC)" BUILD_CFLAGS="$(HOST_CFLAGS)"
+ LIBATTR=$(HAVE_LIBATTR) BUILD_CC="$(HOSTCC)" BUILD_CFLAGS="$(HOST_CFLAGS)"
endef
define LIBCAP_INSTALL_STAGING_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(STAGING_DIR) \
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=$(HAVE_LIBATTR) DESTDIR=$(STAGING_DIR) \
prefix=/usr lib=lib install
endef
define LIBCAP_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(TARGET_DIR) \
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=$(HAVE_LIBATTR) DESTDIR=$(TARGET_DIR) \
prefix=/usr lib=lib install
endef
@@ -38,11 +45,11 @@ endef
LIBCAP_POST_PATCH_HOOKS += LIBCAP_DISABLE_PROGS
define HOST_LIBCAP_BUILD_CMDS
- $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) LIBATTR=no
+ $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) LIBATTR=$(HAVE_LIBATTR)
endef
define HOST_LIBCAP_INSTALL_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(HOST_DIR) \
+ $(HOST_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=$(HAVE_LIBATTR) DESTDIR=$(HOST_DIR) \
prefix=/usr lib=lib install
endef
--
1.7.1
next reply other threads:[~2013-03-15 16:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 16:22 Markos Chandras [this message]
2013-03-16 18:11 ` [Buildroot] [PATCH] libcap: Add optional support for libattr capabilities Thomas Petazzoni
2013-03-16 19:52 ` Markos Chandras
2013-03-18 20:30 ` Peter Korsgaard
2013-03-18 21:10 ` Markos Chandras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363364558-5321-1-git-send-email-markos.chandras@gmail.com \
--to=markos.chandras@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox