wok-current view libcap/receipt @ rev 5264
Up: cmake (2.6.4)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Apr 13 23:50:01 2010 +0200 (2010-04-13) |
parents | 759a344ac7ab |
children | 45f312f988e6 |
line source
1 # SliTaz package receipt.
3 PACKAGE="libcap"
4 VERSION="2.16"
5 CATEGORY="system-tools"
6 SHORT_DESC="Support for getting/setting POSIX.1e capabilities."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="linux glibc-base attr"
9 BUILD_DEPENDS="slitaz-toolchain gperf pam pam-dev attr-dev"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WEB_SITE="http://www.kernel.org/pub/linux/libs/security/linux-privs/"
12 WGET_URL="${WEB_SITE}libcap2/$TARBALL"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 # if [ ! -d $WOK/linux/taz ]; then
18 # tazwok cook linux
19 # fi
20 cd $src
21 # sed -i -e s/'\\n'/"' -e '1i"/g -e 's/| indent -kr//' libcap/Makefile
22 # mkdir -p libcap/include/attr
23 # ln -s $WOK/linux/$(ls $WOK/linux/taz)/include/linux/xattr.h \
24 # libcap/include/attr/
26 # Linux headers are now sanitized properly for userspace, so patch libcap
27 # Based on http://bugs.gentoo.org/265304 and http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg183775.html
28 [ $(grep -c "#define __user" < libcap/include/sys/capability.h) -eq 0 ] || patch -p1 << EOP
29 --- libcap-2.16/libcap/include/sys/capability.h.orig 2009-03-05 11:19:00.000000000 -0300
30 +++ libcap-2.16/libcap/include/sys/capability.h 2009-03-05 11:19:38.000000000 -0300
31 @@ -22,18 +22,6 @@ extern "C" {
32 #include <sys/types.h>
33 #include <stdint.h>
35 -/*
36 - * Make sure we can be included from userland by preventing
37 - * capability.h from including other kernel headers
38 - */
39 -#define _LINUX_TYPES_H
40 -#define _LINUX_FS_H
41 -#define __LINUX_COMPILER_H
42 -#define __user
43 -
44 -typedef unsigned int __u32;
45 -typedef __u32 __le32;
46 -
47 #include <linux/capability.h>
49 /*
50 EOP
52 sed -i -e 's/\} __user \*cap_user_/\} \*cap_user_/g' libcap/include/linux/capability.h
53 make DYNAMIC=yes &&
54 make DESTDIR=$src/_pkg install
55 }
57 # Rules to gen a SliTaz package suitable for Tazpkg.
58 genpkg_rules()
59 {
60 mkdir -p $fs/lib
61 cp -a $_pkg/lib/*.so* $fs/lib
62 cp -a $_pkg/sbin $fs
63 }