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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Oct 9 20:00:12 2012 UTC (21 months, 2 weeks ago) by swift
Branch: MAIN
New upstream SELinux utilities release

(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.1 2012/09/08 18:44:22 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.8"
13
14 DESCRIPTION="SELinux userland library"
15 HOMEPAGE="http://userspace.selinuxproject.org"
16 SRC_URI="http://userspace.selinuxproject.org/releases/20120924/${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 >=dev-libs/libpcre-8.30-r2
25 ruby? ( dev-lang/ruby )"
26 DEPEND="${RDEPEND}
27 virtual/pkgconfig
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
39 src_unpack() {
40 default
41 }
42
43 src_prepare() {
44 # fix up paths for multilib
45 sed -i \
46 -e "/^LIBDIR/s/lib/$(get_libdir)/" \
47 -e "/^SHLIBDIR/s/lib/$(get_libdir)/" \
48 src/Makefile utils/Makefile || die
49 epatch "${FILESDIR}/${P}-mountsys.patch"
50 }
51
52 src_compile() {
53 emake AR="$(tc-getAR)" CC="$(tc-getCC)" LDFLAGS="-fPIC $(pkg-config --libs libpcre) ${LDFLAGS}" all || die
54
55 if use python; then
56 python_copy_sources src
57 building() {
58 emake CC="$(tc-getCC)" PYINC="-I$(python_get_includedir)" PYTHONLIBDIR="$(python_get_library -l)" PYPREFIX="python-$(python_get_version)" LDFLAGS="-fPIC $(pkg-config --libs libpcre) ${LDFLAGS}" pywrap
59 }
60 python_execute_function -s --source-dir src building
61 fi
62
63 if use ruby; then
64 emake CC="$(tc-getCC)" rubywrap || die
65 fi
66 }
67
68 src_install() {
69 emake DESTDIR="${D}" install || die
70
71 if use python; then
72 installation() {
73 emake DESTDIR="${D}" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" install-pywrap
74 }
75 python_execute_function -s --source-dir src installation
76 fi
77
78 if use ruby; then
79 emake DESTDIR="${D}" install-rubywrap || die
80 fi
81 }
82
83 pkg_postinst() {
84 if use python; then
85 python_mod_optimize selinux
86 fi
87 }
88
89 pkg_postrm() {
90 if use python; then
91 python_mod_cleanup selinux
92 fi
93 }

  ViewVC Help
Powered by ViewVC 1.1.20