# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: $ DESCRIPTION="POSIX 1003.1e capabilities" HOMEPAGE="http://linux.kernel.org/pub/linux/libs/security/linux-privs/" SRC_URI="http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.4/${P}.tar.bz2" LICENSE="GPL-2" DEPEND="virtual/glibc >=virtual/linux-sources-2.2 python? ( >=virtual/python-2.2.1 >=dev-lang/swig-1.3.10 )" RDEPEND=">=virtual/linux-sources-2.2 python? ( >=virtual/python-2.2.1 )" src_unpack() { unpack ${A} cd ${S} patch -p1 < ${FILESDIR}/${PF}-python.patch || die } src_compile() { myflags= if use python ; then PYTHONVER="`python -V 2>&1 | sed 's/^Python //'|sed 's/\([0-9]*\.[0-9]*\).*/\1/'`" myflags="${myflags} PYTHON=1 PYTHONMODDIR=/usr/lib/python${PYTHONVER}/site-packages" CFLAGS="${CFLAGS} -I/usr/include/python${PYTHONVER}" fi emake COPTFLAG="${CFLAGS}" DEBUG="" $myflags || die } src_install() { myflags= if use python ; then PYTHONVER="`python -V 2>&1 | sed 's/^Python //'|sed 's/\([0-9]*\.[0-9]*\).*/\1/'`" myflags="${myflags} PYTHON=1 PYTHONMODDIR=${D}/usr/lib/python${PYTHONVER}/site-packages" fi make install FAKEROOT="${D}" man_prefix=/usr/share $myflags || die dodoc CHANGELOG dodoc README dodoc License }