wok-next view libcap/receipt @ rev 16583

Fix python-rpi-adafruit PACKAGE name
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 04 05:46:01 2014 +0200 (2014-05-04)
parents 6c3718ca17b6
children 132cb5109518
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 LICENSE="BSD"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://sites.google.com/site/fullycapable/"
11 WGET_URL="http://ftp.df.lth.se/pub/linux/libs/security/linux-privs/libcap2/$TARBALL"
12 HOST_ARCH="i486 arm"
14 DEPENDS="attr"
15 BUILD_DEPENDS="gperf pam-dev attr-dev"
17 # Handle cross compilation.
18 case "$ARCH" in
19 i?86) BUILD_DEPENDS="$BUILD_DEPENDS perl" ;;
20 arm*) ARCH_ARGS="CC=$HOST_SYSTEM-gcc BUILD_CC=gcc" ;;
21 esac
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 # Linux headers are now sanitized properly for userspace, so patch
27 # libcap. Based on http://bugs.gentoo.org/265304 and
28 # http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg183775.html
29 [ $(grep -c "#define __user" < libcap/include/sys/capability.h) -eq 0 ] \
30 || patch -p1 << EOP
31 --- libcap-2.16/libcap/include/sys/capability.h.orig 2009-03-05 11:19:00.000000000 -0300
32 +++ libcap-2.16/libcap/include/sys/capability.h 2009-03-05 11:19:38.000000000 -0300
33 @@ -22,18 +22,6 @@ extern "C" {
34 #include <sys/types.h>
35 #include <stdint.h>
37 -/*
38 - * Make sure we can be included from userland by preventing
39 - * capability.h from including other kernel headers
40 - */
41 -#define _LINUX_TYPES_H
42 -#define _LINUX_FS_H
43 -#define __LINUX_COMPILER_H
44 -#define __user
45 -
46 -typedef unsigned int __u32;
47 -typedef __u32 __le32;
48 -
49 #include <linux/capability.h>
51 /*
52 EOP
53 sed -i -e 's/\} __user \*cap_user_/\} \*cap_user_/g' \
54 libcap/include/linux/capability.h
55 make DYNAMIC=yes ${ARCH_ARGS} &&
56 make RAISE_SETCAP=no DESTDIR=$DESTDIR install
57 }
59 # Rules to gen a SliTaz package suitable for Tazpkg.
60 genpkg_rules()
61 {
62 mkdir -p $fs/lib
63 cp -a $install/lib/*.so* $fs/lib
64 cp -a $install/sbin $fs
65 }