wok-current annotate libcap/receipt @ rev 8580
imported patch get/tinyproxy
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sun Feb 13 22:57:56 2011 +0100 (2011-02-13) |
parents | 8752c40cc534 |
children | 835c69c5272f |
rev | line source |
---|---|
pankso@6 | 1 # SliTaz package receipt. |
pankso@6 | 2 |
pankso@6 | 3 PACKAGE="libcap" |
slaxemulator@6902 | 4 VERSION="2.19" |
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@5003 | 8 DEPENDS="linux glibc-base attr" |
slaxemulator@6902 | 9 BUILD_DEPENDS="slitaz-toolchain gperf pam pam-dev attr-dev perl" |
rcx@3661 | 10 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pankso@6 | 11 WEB_SITE="http://www.kernel.org/pub/linux/libs/security/linux-privs/" |
pascal@1563 | 12 WGET_URL="${WEB_SITE}libcap2/$TARBALL" |
pankso@6 | 13 |
pankso@6 | 14 # Rules to configure and make the package. |
pankso@6 | 15 compile_rules() |
pankso@6 | 16 { |
rcx@3661 | 17 # if [ ! -d $WOK/linux/taz ]; then |
rcx@3661 | 18 # tazwok cook linux |
rcx@3661 | 19 # fi |
pankso@6 | 20 cd $src |
rcx@3661 | 21 # sed -i -e s/'\\n'/"' -e '1i"/g -e 's/| indent -kr//' libcap/Makefile |
rcx@3661 | 22 # mkdir -p libcap/include/attr |
rcx@3661 | 23 # ln -s $WOK/linux/$(ls $WOK/linux/taz)/include/linux/xattr.h \ |
rcx@3661 | 24 # libcap/include/attr/ |
rcx@3661 | 25 |
rcx@3661 | 26 # Linux headers are now sanitized properly for userspace, so patch libcap |
rcx@3661 | 27 # Based on http://bugs.gentoo.org/265304 and http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg183775.html |
rcx@3661 | 28 [ $(grep -c "#define __user" < libcap/include/sys/capability.h) -eq 0 ] || patch -p1 << EOP |
rcx@3661 | 29 --- libcap-2.16/libcap/include/sys/capability.h.orig 2009-03-05 11:19:00.000000000 -0300 |
rcx@3661 | 30 +++ libcap-2.16/libcap/include/sys/capability.h 2009-03-05 11:19:38.000000000 -0300 |
rcx@3661 | 31 @@ -22,18 +22,6 @@ extern "C" { |
rcx@3661 | 32 #include <sys/types.h> |
rcx@3661 | 33 #include <stdint.h> |
rcx@3661 | 34 |
rcx@3661 | 35 -/* |
rcx@3661 | 36 - * Make sure we can be included from userland by preventing |
rcx@3661 | 37 - * capability.h from including other kernel headers |
rcx@3661 | 38 - */ |
rcx@3661 | 39 -#define _LINUX_TYPES_H |
rcx@3661 | 40 -#define _LINUX_FS_H |
rcx@3661 | 41 -#define __LINUX_COMPILER_H |
rcx@3661 | 42 -#define __user |
rcx@3661 | 43 - |
rcx@3661 | 44 -typedef unsigned int __u32; |
rcx@3661 | 45 -typedef __u32 __le32; |
rcx@3661 | 46 - |
rcx@3661 | 47 #include <linux/capability.h> |
rcx@3661 | 48 |
rcx@3661 | 49 /* |
rcx@3661 | 50 EOP |
rcx@3661 | 51 |
rcx@3661 | 52 sed -i -e 's/\} __user \*cap_user_/\} \*cap_user_/g' libcap/include/linux/capability.h |
rcx@3661 | 53 make DYNAMIC=yes && |
rcx@3661 | 54 make DESTDIR=$src/_pkg install |
pankso@6 | 55 } |
pankso@6 | 56 |
pankso@6 | 57 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@6 | 58 genpkg_rules() |
pankso@6 | 59 { |
pascal@2197 | 60 mkdir -p $fs/lib |
rcx@3661 | 61 cp -a $_pkg/lib/*.so* $fs/lib |
pankso@6 | 62 cp -a $_pkg/sbin $fs |
pankso@6 | 63 } |