/[gentoo-x86]/sys-libs/libselinux/libselinux-2.1.9.ebuild
Gentoo

Contents of /sys-libs/libselinux/libselinux-2.1.9.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Tue Jun 26 05:03:37 2012 UTC (2 years, 6 months ago) by floppym
Branch: MAIN
Changes since 1.2: +2 -2 lines
Restrict pypy per Arfrever.

(Portage version: 2.2.0_alpha113/cvs/Linux x86_64)

1 swift 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 floppym 1.3 # $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-2.1.9.ebuild,v 1.2 2012/04/29 10:06:56 swift Exp $
4 swift 1.1
5     EAPI="2"
6     PYTHON_DEPEND="python? *"
7     SUPPORT_PYTHON_ABIS="1"
8 floppym 1.3 RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
9 swift 1.1
10     inherit multilib python toolchain-funcs
11    
12     SEPOL_VER="2.1.4"
13    
14     DESCRIPTION="SELinux userland library"
15     HOMEPAGE="http://userspace.selinuxproject.org"
16     SRC_URI="http://userspace.selinuxproject.org/releases/20120216/${P}.tar.gz"
17    
18     LICENSE="public-domain"
19     SLOT="0"
20 swift 1.2 KEYWORDS="amd64 x86"
21 swift 1.1 IUSE="python ruby"
22    
23     RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}
24     ruby? ( dev-lang/ruby )"
25     DEPEND="${RDEPEND}
26     ruby? ( dev-lang/swig )
27     python? ( dev-lang/swig )"
28    
29     pkg_setup() {
30     if use python; then
31     python_pkg_setup
32     fi
33     }
34    
35     src_prepare() {
36     # fix up paths for multilib
37     sed -i -e "/^LIBDIR/s/lib/$(get_libdir)/" "${S}/src/Makefile" \
38     || die "Fix for multilib LIBDIR failed."
39     sed -i -e "/^SHLIBDIR/s/lib/$(get_libdir)/" "${S}/src/Makefile" \
40     || die "Fix for multilib SHLIBDIR failed."
41     }
42    
43     src_compile() {
44     emake AR="$(tc-getAR)" CC="$(tc-getCC)" LDFLAGS="-fPIC ${LDFLAGS}" all || die
45    
46     if use python; then
47     python_copy_sources src
48     building() {
49     emake CC="$(tc-getCC)" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" LDFLAGS="-fPIC ${LDFLAGS}" pywrap
50     }
51     python_execute_function -s --source-dir src building
52     fi
53    
54     if use ruby; then
55     emake CC="$(tc-getCC)" rubywrap || die
56     fi
57     }
58    
59     src_install() {
60     emake DESTDIR="${D}" install || die
61    
62     if use python; then
63     installation() {
64     emake DESTDIR="${D}" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" install-pywrap
65     }
66     python_execute_function -s --source-dir src installation
67     fi
68    
69     if use ruby; then
70     emake DESTDIR="${D}" install-rubywrap || die
71     fi
72     }
73    
74     pkg_postinst() {
75     if use python; then
76     python_mod_optimize selinux
77     fi
78     }
79    
80     pkg_postrm() {
81     if use python; then
82     python_mod_cleanup selinux
83     fi
84     }

  ViewVC Help
Powered by ViewVC 1.1.20