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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Oct 6 16:36:49 2012 UTC (21 months, 3 weeks ago) by swift
Branch: MAIN
Changes since 1.2: +2 -2 lines
Stabilization

(Portage version: 2.1.11.9/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-r2.ebuild,v 1.2 2012/10/03 20:42:02 vapier Exp $
4
5 EAPI="4"
6 PYTHON_DEPEND="python? *"
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="2.5 *-jython *-pypy-*"
9 USE_RUBY="ruby18"
10 RUBY_OPTIONAL="yes"
11
12 inherit multilib python toolchain-funcs eutils ruby-ng
13
14 SEPOL_VER="2.1.4"
15
16 DESCRIPTION="SELinux userland library"
17 HOMEPAGE="http://userspace.selinuxproject.org"
18 SRC_URI="http://userspace.selinuxproject.org/releases/20120216/${P}.tar.gz"
19
20 LICENSE="public-domain"
21 SLOT="0"
22 KEYWORDS="amd64 x86"
23 IUSE="python ruby"
24
25 RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}
26 ruby? ( $(ruby_implementations_depend) )"
27 DEPEND="${RDEPEND}
28 ruby? ( dev-lang/swig )
29 python? ( dev-lang/swig )"
30
31 S="${WORKDIR}/${P}"
32
33 pkg_setup() {
34 if use python; then
35 python_pkg_setup
36 fi
37
38 if use ruby; then
39 ruby-ng_pkg_setup
40 fi
41 }
42
43 src_unpack() {
44 default
45 }
46
47 src_prepare() {
48 # fix up paths for multilib
49 sed -i \
50 -e "/^LIBDIR/s/lib/$(get_libdir)/" \
51 -e "/^SHLIBDIR/s/lib/$(get_libdir)/" \
52 src/Makefile utils/Makefile || die
53 epatch "${FILESDIR}/${P}-mountsys.patch"
54 }
55
56 src_compile() {
57 emake AR="$(tc-getAR)" CC="$(tc-getCC)" LDFLAGS="-fPIC ${LDFLAGS}" all || die
58
59 if use python; then
60 python_copy_sources src
61 building() {
62 emake CC="$(tc-getCC)" PYINC="-I$(python_get_includedir)" PYTHONLIBDIR="$(python_get_library -l)" PYPREFIX="python-$(python_get_version)" LDFLAGS="-fPIC ${LDFLAGS}" pywrap
63 }
64 python_execute_function -s --source-dir src building
65 fi
66
67 if use ruby; then
68 emake CC="$(tc-getCC)" rubywrap || die
69 fi
70 }
71
72 src_install() {
73 emake DESTDIR="${D}" install || die
74
75 if use python; then
76 installation() {
77 emake DESTDIR="${D}" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" install-pywrap
78 }
79 python_execute_function -s --source-dir src installation
80 fi
81
82 if use ruby; then
83 emake DESTDIR="${D}" install-rubywrap || die
84 fi
85 }
86
87 pkg_postinst() {
88 if use python; then
89 python_mod_optimize selinux
90 fi
91 }
92
93 pkg_postrm() {
94 if use python; then
95 python_mod_cleanup selinux
96 fi
97 }

  ViewVC Help
Powered by ViewVC 1.1.20