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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Nov 17 16:53:48 2012 UTC (2 years ago) by swift
Branch: MAIN
Changes since 1.1: +2 -2 lines
Stabilize SELinux userspace utilities

(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-r3.ebuild,v 1.1 2012/10/09 20:00:12 swift Exp $
4
5 EAPI="4"
6 PYTHON_DEPEND="python? *"
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="2.5 *-jython *-pypy-*"
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 S="${WORKDIR}/${P}"
30
31 pkg_setup() {
32 if use python; then
33 python_pkg_setup
34 fi
35 }
36
37 src_unpack() {
38 default
39 }
40
41 src_prepare() {
42 # fix up paths for multilib
43 sed -i \
44 -e "/^LIBDIR/s/lib/$(get_libdir)/" \
45 -e "/^SHLIBDIR/s/lib/$(get_libdir)/" \
46 src/Makefile utils/Makefile || die
47 epatch "${FILESDIR}/${P}-mountsys.patch"
48 epatch "${FILESDIR}/${P}-support_ruby19.patch"
49 }
50
51 src_compile() {
52 emake AR="$(tc-getAR)" CC="$(tc-getCC)" LDFLAGS="-fPIC ${LDFLAGS}" all || die
53
54 if use python; then
55 python_copy_sources src
56 building() {
57 emake CC="$(tc-getCC)" PYINC="-I$(python_get_includedir)" PYTHONLIBDIR="$(python_get_library -l)" PYPREFIX="python-$(python_get_version)" LDFLAGS="-fPIC ${LDFLAGS}" pywrap
58 }
59 python_execute_function -s --source-dir src building
60 fi
61
62 if use ruby; then
63 emake CC="$(tc-getCC)" rubywrap || die
64 fi
65 }
66
67 src_install() {
68 emake DESTDIR="${D}" install || die
69
70 if use python; then
71 installation() {
72 emake DESTDIR="${D}" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" install-pywrap
73 }
74 python_execute_function -s --source-dir src installation
75 fi
76
77 if use ruby; then
78 emake DESTDIR="${D}" install-rubywrap || die
79 fi
80 }
81
82 pkg_postinst() {
83 if use python; then
84 python_mod_optimize selinux
85 fi
86 }
87
88 pkg_postrm() {
89 if use python; then
90 python_mod_cleanup selinux
91 fi
92 }

  ViewVC Help
Powered by ViewVC 1.1.20