diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2010-03-02 22:47:13 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2010-04-09 11:03:54 +0200 |
commit | 7ec49b9af7eef4cb43615e58e7f166fddaae94e6 (patch) | |
tree | 5298619e452d4e054939545134f276381972a740 /package | |
parent | c040b2c0105120bcd71046e346842f9917b4445a (diff) | |
download | buildroot-novena-7ec49b9af7eef4cb43615e58e7f166fddaae94e6.tar.gz buildroot-novena-7ec49b9af7eef4cb43615e58e7f166fddaae94e6.zip |
libcap: new package
Needed as a dependency of cdrkit, which contains genisomage, useful
for generating ISO9660 filesystem images.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package')
-rw-r--r-- | package/Config.in | 1 | ||||
-rw-r--r-- | package/libcap/Config.in | 10 | ||||
-rw-r--r-- | package/libcap/libcap-2.19-build-system.patch | 55 | ||||
-rw-r--r-- | package/libcap/libcap.mk | 27 |
4 files changed, 93 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in index a74206310..f3f42139c 100644 --- a/package/Config.in +++ b/package/Config.in @@ -295,6 +295,7 @@ source "package/libupnp/Config.in" endmenu menu "Other" +source "package/libcap/Config.in" source "package/libdaemon/Config.in" source "package/libelf/Config.in" source "package/libevent/Config.in" diff --git a/package/libcap/Config.in b/package/libcap/Config.in new file mode 100644 index 000000000..f1fc8fa16 --- /dev/null +++ b/package/libcap/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBCAP + bool "libcap" + help + This library implements the user-space interfaces to the + POSIX 1003.1e capabilities available in Linux kernels. These + capabilities are a partitioning of the all powerful root + privilege into a set of distinct privileges. + + http://sites.google.com/site/fullycapable/ + diff --git a/package/libcap/libcap-2.19-build-system.patch b/package/libcap/libcap-2.19-build-system.patch new file mode 100644 index 000000000..42a5518ff --- /dev/null +++ b/package/libcap/libcap-2.19-build-system.patch @@ -0,0 +1,55 @@ +--- + Make.Rules | 15 ++++++++------- + libcap/Makefile | 2 +- + 2 files changed, 9 insertions(+), 8 deletions(-) + +Index: libcap-2.19/Make.Rules +=================================================================== +--- libcap-2.19.orig/Make.Rules ++++ libcap-2.19/Make.Rules +@@ -45,24 +45,25 @@ + KERNEL_HEADERS := $(topdir)/libcap/include + IPATH += -I$(topdir)/libcap/include -I$(KERNEL_HEADERS) + +-CC := gcc +-CFLAGS := -O2 +-BUILD_CC := $(CC) +-BUILD_CFLAGS := $(CFLAGS) $(IPATH) +-AR := ar +-RANLIB := ranlib ++CC ?= gcc ++CFLAGS ?= -O2 ++CC_FOR_BUILD ?= $(CC) ++CFLAGS_FOR_BUILD ?= $(CFLAGS) ++AR ?= ar ++RANLIB ?= ranlib + DEBUG = -g #-DDEBUG + WARNINGS=-fPIC -Wall -Wwrite-strings \ + -Wpointer-arith -Wcast-qual -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes \ + -Wnested-externs -Winline -Wshadow + LD=$(CC) -Wl,-x -shared +-LDFLAGS := #-g ++LDFLAGS ?= #-g + + SYSTEM_HEADERS = /usr/include + INCS=$(topdir)/libcap/include/sys/capability.h + LDFLAGS += -L$(topdir)/libcap + CFLAGS += -Dlinux $(WARNINGS) $(DEBUG) $(IPATH) ++CFLAGS_FOR_BUILD += $(IPATH) + PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi) + INDENT := $(shell if [ -n "$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi) + DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi) +Index: libcap-2.19/libcap/Makefile +=================================================================== +--- libcap-2.19.orig/libcap/Makefile ++++ libcap-2.19/libcap/Makefile +@@ -33,7 +33,7 @@ + endif + + _makenames: _makenames.c cap_names.list.h +- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@ ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@ + + cap_names.h: _makenames + ./_makenames > cap_names.h diff --git a/package/libcap/libcap.mk b/package/libcap/libcap.mk new file mode 100644 index 000000000..3ea5e51aa --- /dev/null +++ b/package/libcap/libcap.mk @@ -0,0 +1,27 @@ +LIBCAP_VERSION=2.19 +LIBCAP_SOURCE=libcap-$(LIBCAP_VERSION).tar.bz2 +LIBCAP_SITE=http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/ +LIBCAP_INSTALL_STAGING=YES + +define LIBCAP_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) LIBATTR=no +endef + +define LIBCAP_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(STAGING_DIR) install +endef + +define LIBCAP_INSTALL_TARGET_CMDS + install -D $(STAGING_DIR)/usr/lib/libcap.so.* $(TARGET_DIR)/usr/lib +endef + +define HOST_LIBCAP_BUILD_CMDS + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) LIBATTR=no +endef + +define HOST_LIBCAP_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) LIBATTR=no DESTDIR=$(HOST_DIR) install +endef + +$(eval $(call GENTARGETS,package,libcap)) +$(eval $(call GENTARGETS,package,libcap,host)) |