wok-6.x annotate libcap/receipt @ rev 17650
Up: libcap 2.24
author | Alexander Medvedev <devl547@gmail.com> |
---|---|
date | Sat Feb 14 22:17:55 2015 +0000 (2015-02-14) |
parents | ac2ee8823dfa |
children | ee294d252003 |
rev | line source |
---|---|
pankso@6 | 1 # SliTaz package receipt. |
pankso@6 | 2 |
pankso@6 | 3 PACKAGE="libcap" |
devl547@17650 | 4 VERSION="2.24" |
pankso@211 | 5 CATEGORY="system-tools" |
pankso@6 | 6 SHORT_DESC="Support for getting/setting POSIX.1e capabilities." |
pankso@6 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15472 | 8 LICENSE="BSD" |
devl547@17650 | 9 TARBALL="$PACKAGE-$VERSION.tar.xz" |
pascal@12722 | 10 WEB_SITE="http://sites.google.com/site/fullycapable/" |
pascal@12721 | 11 WGET_URL="http://ftp.df.lth.se/pub/linux/libs/security/linux-privs/libcap2/$TARBALL" |
pankso@16236 | 12 HOST_ARCH="i486 arm" |
pankso@6 | 13 |
pankso@16236 | 14 DEPENDS="attr" |
pankso@16236 | 15 BUILD_DEPENDS="gperf pam-dev attr-dev" |
pankso@16236 | 16 |
pankso@16236 | 17 # Handle cross compilation. |
pankso@16236 | 18 case "$ARCH" in |
pankso@16236 | 19 i?86) BUILD_DEPENDS="$BUILD_DEPENDS perl" ;; |
pankso@16236 | 20 arm*) ARCH_ARGS="CC=$HOST_SYSTEM-gcc BUILD_CC=gcc" ;; |
pankso@16236 | 21 esac |
pascal@15472 | 22 |
pankso@6 | 23 # Rules to configure and make the package. |
pankso@6 | 24 compile_rules() |
pankso@6 | 25 { |
pankso@16236 | 26 # Linux headers are now sanitized properly for userspace, so patch |
pankso@16236 | 27 # libcap. Based on http://bugs.gentoo.org/265304 and |
pankso@16236 | 28 # http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg183775.html |
pankso@16236 | 29 [ $(grep -c "#define __user" < libcap/include/sys/capability.h) -eq 0 ] \ |
pankso@16236 | 30 || patch -p1 << EOP |
rcx@3661 | 31 --- libcap-2.16/libcap/include/sys/capability.h.orig 2009-03-05 11:19:00.000000000 -0300 |
rcx@3661 | 32 +++ libcap-2.16/libcap/include/sys/capability.h 2009-03-05 11:19:38.000000000 -0300 |
rcx@3661 | 33 @@ -22,18 +22,6 @@ extern "C" { |
rcx@3661 | 34 #include <sys/types.h> |
rcx@3661 | 35 #include <stdint.h> |
rcx@3661 | 36 |
rcx@3661 | 37 -/* |
rcx@3661 | 38 - * Make sure we can be included from userland by preventing |
rcx@3661 | 39 - * capability.h from including other kernel headers |
rcx@3661 | 40 - */ |
rcx@3661 | 41 -#define _LINUX_TYPES_H |
rcx@3661 | 42 -#define _LINUX_FS_H |
rcx@3661 | 43 -#define __LINUX_COMPILER_H |
rcx@3661 | 44 -#define __user |
rcx@3661 | 45 - |
rcx@3661 | 46 -typedef unsigned int __u32; |
rcx@3661 | 47 -typedef __u32 __le32; |
rcx@3661 | 48 - |
rcx@3661 | 49 #include <linux/capability.h> |
rcx@3661 | 50 |
rcx@3661 | 51 /* |
rcx@3661 | 52 EOP |
pankso@16236 | 53 sed -i -e 's/\} __user \*cap_user_/\} \*cap_user_/g' \ |
pankso@16236 | 54 libcap/include/linux/capability.h |
pankso@16236 | 55 make DYNAMIC=yes ${ARCH_ARGS} && |
slaxemulator@10133 | 56 make RAISE_SETCAP=no DESTDIR=$DESTDIR install |
pankso@6 | 57 } |
pankso@6 | 58 |
pankso@6 | 59 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@6 | 60 genpkg_rules() |
pankso@6 | 61 { |
pascal@2197 | 62 mkdir -p $fs/lib |
pascal@15472 | 63 cp -a $install/lib/*.so* $fs/lib |
pascal@15472 | 64 cp -a $install/sbin $fs |
pankso@6 | 65 } |