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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Aug 6 07:46:08 2012 UTC (20 months, 2 weeks ago) by patrick
Branch: MAIN
Changes since 1.3: +2 -2 lines
Restricting python ABIs that don't work

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

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-2.1.9-r1.ebuild,v 1.3 2012/07/10 20:07:42 swift Exp $
4
5 EAPI="4"
6 PYTHON_DEPEND="python? *"
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="*-jython *-pypy-* 2.5 2.6 3.*"
9
10 inherit multilib python toolchain-funcs eutils
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 KEYWORDS="amd64 x86"
21 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 epatch "${FILESDIR}/${P}-mountsys.patch"
42 }
43
44 src_compile() {
45 emake AR="$(tc-getAR)" CC="$(tc-getCC)" LDFLAGS="-fPIC ${LDFLAGS}" all || die
46
47 if use python; then
48 python_copy_sources src
49 building() {
50 emake CC="$(tc-getCC)" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" LDFLAGS="-fPIC ${LDFLAGS}" pywrap
51 }
52 python_execute_function -s --source-dir src building
53 fi
54
55 if use ruby; then
56 emake CC="$(tc-getCC)" rubywrap || die
57 fi
58 }
59
60 src_install() {
61 emake DESTDIR="${D}" install || die
62
63 if use python; then
64 installation() {
65 emake DESTDIR="${D}" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" install-pywrap
66 }
67 python_execute_function -s --source-dir src installation
68 fi
69
70 if use ruby; then
71 emake DESTDIR="${D}" install-rubywrap || die
72 fi
73 }
74
75 pkg_postinst() {
76 if use python; then
77 python_mod_optimize selinux
78 fi
79 }
80
81 pkg_postrm() {
82 if use python; then
83 python_mod_cleanup selinux
84 fi
85 }

  ViewVC Help
Powered by ViewVC 1.1.20