summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rules/host-libcap.make19
-rw-r--r--rules/libcap.in7
-rw-r--r--rules/libcap.make59
3 files changed, 67 insertions, 18 deletions
diff --git a/rules/host-libcap.make b/rules/host-libcap.make
index 0366a0505..0c753b8e4 100644
--- a/rules/host-libcap.make
+++ b/rules/host-libcap.make
@@ -1,6 +1,7 @@
# -*-makefile-*-
#
# Copyright (C) 2010 by Marc Kleine-Budde <mkl@pengutronix.de>
+# Copyright (C) 2010 by Robert Schwebel <r.schwebel@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
@@ -13,24 +14,6 @@
#
HOST_PACKAGES-$(PTXCONF_HOST_LIBCAP) += host-libcap
-#
-# Paths and names
-#
-HOST_LIBCAP_VERSION := 2.18
-HOST_LIBCAP := libcap-$(HOST_LIBCAP_VERSION)
-HOST_LIBCAP_SUFFIX := tar.gz
-HOST_LIBCAP_URL := http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/$(HOST_LIBCAP).$(HOST_LIBCAP_SUFFIX)
-HOST_LIBCAP_SOURCE := $(SRCDIR)/$(HOST_LIBCAP).$(HOST_LIBCAP_SUFFIX)
-HOST_LIBCAP_DIR := $(HOST_BUILDDIR)/$(HOST_LIBCAP)
-
-# ----------------------------------------------------------------------------
-# Get
-# ----------------------------------------------------------------------------
-
-$(HOST_LIBCAP_SOURCE):
- @$(call targetinfo)
- @$(call get, HOST_LIBCAP)
-
# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------
diff --git a/rules/libcap.in b/rules/libcap.in
new file mode 100644
index 000000000..c82065807
--- /dev/null
+++ b/rules/libcap.in
@@ -0,0 +1,7 @@
+## SECTION=system_libraries
+
+config LIBCAP
+ tristate
+ prompt "libcap"
+ help
+ A library for getting and setting POSIX.1e capabilities.
diff --git a/rules/libcap.make b/rules/libcap.make
new file mode 100644
index 000000000..25549177e
--- /dev/null
+++ b/rules/libcap.make
@@ -0,0 +1,59 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2010 by Robert Schwebel <r.schwebel@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBCAP) += libcap
+
+#
+# Paths and names
+#
+LIBCAP_VERSION := 2.19
+LIBCAP := libcap-$(LIBCAP_VERSION)
+LIBCAP_SUFFIX := tar.bz2
+LIBCAP_URL := http://ftp.kernel.org/pub/linux/libs/security/linux-privs/libcap2/$(LIBCAP).$(LIBCAP_SUFFIX)
+LIBCAP_SOURCE := $(SRCDIR)/$(LIBCAP).$(LIBCAP_SUFFIX)
+LIBCAP_DIR := $(BUILDDIR)/$(LIBCAP)
+LIBCAP_LICENSE := unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBCAP_MAKE_OPT := \
+ prefix= PAM_CAP=no LIBATTR=no lib=lib \
+ CC=$(CROSS_CC) \
+ BUILD_CC=$(HOSTCC)
+
+LIBCAP_INSTALL_OPT := $(LIBCAP_MAKE_OPT) install
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libcap.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, libcap)
+ @$(call install_fixup, libcap,PRIORITY,optional)
+ @$(call install_fixup, libcap,SECTION,base)
+ @$(call install_fixup, libcap,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
+ @$(call install_fixup, libcap,DESCRIPTION,missing)
+
+ @$(call install_copy, libcap, 0, 0, 0755, -, /sbin/getpcaps)
+ @$(call install_copy, libcap, 0, 0, 0755, -, /sbin/capsh)
+ @$(call install_lib, libcap, 0, 0, 0644, libcap)
+
+ @$(call install_finish, libcap)
+
+ @$(call touch)
+
+# vim: syntax=make