wok view libcap/receipt @ rev 14674
edje-dev: Up to 1.7.7
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Thu Jun 06 22:08:32 2013 +0200 (2013-06-06) |
parents | 5575fdb0cda6 |
children | 6c3718ca17b6 |
line source
1 # SliTaz package receipt.
3 PACKAGE="libcap"
4 VERSION="2.19"
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 perl"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WEB_SITE="http://sites.google.com/site/fullycapable/"
12 WGET_URL="http://ftp.df.lth.se/pub/linux/libs/security/linux-privs/libcap2/$TARBALL"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 # if [ ! -d $WOK/linux/taz ]; then
18 # if [ -x /usr/bin/cook ]; then
19 # cook linux
20 # else
21 # tazwok cook linux
22 # fi
23 # fi
24 cd $src
25 # sed -i -e s/'\\n'/"' -e '1i"/g -e 's/| indent -kr//' libcap/Makefile
26 # mkdir -p libcap/include/attr
27 # ln -s $WOK/linux/$(ls $WOK/linux/taz)/include/linux/xattr.h \
28 # libcap/include/attr/
30 # Linux headers are now sanitized properly for userspace, so patch libcap
31 # Based on http://bugs.gentoo.org/265304 and http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg183775.html
32 [ $(grep -c "#define __user" < libcap/include/sys/capability.h) -eq 0 ] || patch -p1 << EOP
33 --- libcap-2.16/libcap/include/sys/capability.h.orig 2009-03-05 11:19:00.000000000 -0300
34 +++ libcap-2.16/libcap/include/sys/capability.h 2009-03-05 11:19:38.000000000 -0300
35 @@ -22,18 +22,6 @@ extern "C" {
36 #include <sys/types.h>
37 #include <stdint.h>
39 -/*
40 - * Make sure we can be included from userland by preventing
41 - * capability.h from including other kernel headers
42 - */
43 -#define _LINUX_TYPES_H
44 -#define _LINUX_FS_H
45 -#define __LINUX_COMPILER_H
46 -#define __user
47 -
48 -typedef unsigned int __u32;
49 -typedef __u32 __le32;
50 -
51 #include <linux/capability.h>
53 /*
54 EOP
56 sed -i -e 's/\} __user \*cap_user_/\} \*cap_user_/g' libcap/include/linux/capability.h
57 make DYNAMIC=yes &&
58 make RAISE_SETCAP=no DESTDIR=$DESTDIR install
59 }
61 # Rules to gen a SliTaz package suitable for Tazpkg.
62 genpkg_rules()
63 {
64 mkdir -p $fs/lib
65 cp -a $_pkg/lib/*.so* $fs/lib
66 cp -a $_pkg/sbin $fs
67 }