summaryrefslogtreecommitdiff
path: root/recipes/libcap
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/libcap')
-rw-r--r--recipes/libcap/libcap-1.10/make.patch20
-rw-r--r--recipes/libcap/libcap-1.10/makenames.patch13
-rw-r--r--recipes/libcap/libcap-1.10/syscall.patch20
-rw-r--r--recipes/libcap/libcap2-2.16/make.patch23
-rw-r--r--recipes/libcap/libcap2_2.16.bb31
-rw-r--r--recipes/libcap/libcap_1.10.bb29
6 files changed, 136 insertions, 0 deletions
diff --git a/recipes/libcap/libcap-1.10/make.patch b/recipes/libcap/libcap-1.10/make.patch
new file mode 100644
index 0000000000..5788099f08
--- /dev/null
+++ b/recipes/libcap/libcap-1.10/make.patch
@@ -0,0 +1,20 @@
+Index: libcap-1.10.orig/Make.Rules
+===================================================================
+--- libcap-1.10.orig.orig/Make.Rules 1999-11-18 07:06:02.000000000 +0100
++++ libcap-1.10.orig/Make.Rules 2006-03-20 23:05:56.083854920 +0100
+@@ -41,15 +41,11 @@
+
+ # Compilation specifics
+
+-CC=gcc
+-COPTFLAGS=-O2
+ DEBUG=-g #-DDEBUG
+ WARNINGS=-ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
+ -Wpointer-arith -Wcast-qual -Wcast-align \
+ -Wtraditional -Wstrict-prototypes -Wmissing-prototypes \
+ -Wnested-externs -Winline -Wshadow -pedantic
+-LD=ld
+-LDFLAGS=-s #-g
+
+ IPATH=-I$(topdir)/libcap/include
+ INCS=$(topdir)/libcap/include/sys/capability.h
diff --git a/recipes/libcap/libcap-1.10/makenames.patch b/recipes/libcap/libcap-1.10/makenames.patch
new file mode 100644
index 0000000000..445f2116ec
--- /dev/null
+++ b/recipes/libcap/libcap-1.10/makenames.patch
@@ -0,0 +1,13 @@
+Index: libcap-1.10.orig/libcap/Makefile
+===================================================================
+--- libcap-1.10.orig.orig/libcap/Makefile 2006-03-20 23:11:05.696786600 +0100
++++ libcap-1.10.orig/libcap/Makefile 2006-03-20 23:14:29.527799576 +0100
+@@ -45,7 +45,7 @@
+ all: $(MINLIBNAME)
+
+ _makenames: _makenames.c cap_names.sed
+- $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
++ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) $< -o $@
+
+ cap_names.h: _makenames
+ ./_makenames > cap_names.h
diff --git a/recipes/libcap/libcap-1.10/syscall.patch b/recipes/libcap/libcap-1.10/syscall.patch
new file mode 100644
index 0000000000..86163f2b1a
--- /dev/null
+++ b/recipes/libcap/libcap-1.10/syscall.patch
@@ -0,0 +1,20 @@
+Index: libcap-1.10/libcap/cap_sys.c
+===================================================================
+--- libcap-1.10.orig/libcap/cap_sys.c 2007-05-24 10:59:24.000000000 +0200
++++ libcap-1.10/libcap/cap_sys.c 2007-05-24 11:01:42.000000000 +0200
+@@ -11,6 +11,7 @@
+ #define __LIBRARY__
+ #include <linux/unistd.h>
+
++#if 0
+ _syscall2(int, capget,
+ cap_user_header_t, header,
+ cap_user_data_t, data)
+@@ -18,6 +19,7 @@
+ _syscall2(int, capset,
+ cap_user_header_t, header,
+ const cap_user_data_t, data)
++#endif
+
+ /*
+ * $Log: cap_sys.c,v $
diff --git a/recipes/libcap/libcap2-2.16/make.patch b/recipes/libcap/libcap2-2.16/make.patch
new file mode 100644
index 0000000000..3672f77c63
--- /dev/null
+++ b/recipes/libcap/libcap2-2.16/make.patch
@@ -0,0 +1,23 @@
+--- libcap-2.16/Make.Rules.orig 2009-03-07 18:50:23.000000000 +0100
++++ libcap-2.16/Make.Rules 2009-03-07 18:50:44.000000000 +0100
+@@ -45,19 +45,12 @@
+ 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
++LD=$(CC) -Wl,-x -shared
+ 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
+
+ SYSTEM_HEADERS = /usr/include
+ INCS=$(topdir)/libcap/include/sys/capability.h
diff --git a/recipes/libcap/libcap2_2.16.bb b/recipes/libcap/libcap2_2.16.bb
new file mode 100644
index 0000000000..8c9803d392
--- /dev/null
+++ b/recipes/libcap/libcap2_2.16.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "Libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) draft 15 capabilities."
+PRIORITY = "optional"
+SECTION = "libs"
+LICENSE = "GPL"
+DEPENDS = "bison-native flex-native libattr"
+PR = "r0"
+
+CFLAGS_append = " -I${S}/libcap/include"
+LDFLAGS_prepend = "-L../libcap"
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/security/linux-privs/libcap2/libcap-${PV}.tar.bz2 \
+ file://make.patch;patch=1 \
+ "
+
+S = "${WORKDIR}/libcap-${PV}"
+
+FILES_${PN} = "${libdir}"
+FILES_${PN}-dev = "${includedir}"
+
+do_install() {
+ install -d ${D}${includedir}/sys
+ install -m 0644 libcap/include/sys/capability.h ${D}${includedir}/sys/
+ install -d ${D}${libdir}
+ oe_libinstall -s -C libcap libcap ${D}${libdir}
+}
+
+do_stage() {
+ install -d ${STAGING_INCDIR}/sys
+ install -m 0644 libcap/include/sys/capability.h ${STAGING_INCDIR}/sys/
+ oe_libinstall -s -C libcap libcap ${STAGING_LIBDIR}
+}
diff --git a/recipes/libcap/libcap_1.10.bb b/recipes/libcap/libcap_1.10.bb
new file mode 100644
index 0000000000..172acaca6e
--- /dev/null
+++ b/recipes/libcap/libcap_1.10.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) draft 15 capabilities."
+PRIORITY = "optional"
+SECTION = "libs"
+LICENSE = "GPL"
+DEPENDS = "bison-native flex-native"
+PR = "r1"
+
+CFLAGS_append = " -I${S}/libcap/include"
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/security/linux-privs/kernel-2.4/${PN}-${PV}.tar.bz2 \
+ file://makenames.patch;patch=1 \
+ file://make.patch;patch=1 \
+ file://syscall.patch;patch=1"
+
+FILES_${PN} = "${libdir}"
+FILES_${PN}-dev = "${includedir}"
+
+do_install() {
+ install -d ${D}${includedir}/sys
+ install -m 0644 libcap/include/sys/capability.h ${D}${includedir}/sys/
+ install -d ${D}${libdir}
+ oe_libinstall -s -C libcap libcap ${D}${libdir}
+}
+
+do_stage() {
+ install -d ${STAGING_INCDIR}/sys
+ install -m 0644 libcap/include/sys/capability.h ${STAGING_INCDIR}/sys/
+ oe_libinstall -s -C libcap libcap ${STAGING_LIBDIR}
+}