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

Contents of /sys-libs/libselinux/libselinux-2.2.2-r5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Apr 8 18:28:33 2015 UTC (3 years, 7 months ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +3 -3 lines
Drop old Python implementations

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)

1 # Copyright 1999-2015 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.2.2-r5.ebuild,v 1.4 2014/07/14 15:35:53 swift Exp $
4
5 EAPI="5"
6 PYTHON_COMPAT=( python2_7 python3_3 )
7
8 inherit multilib python-r1 toolchain-funcs eutils multilib-minimal
9
10 SEPOL_VER="2.2"
11
12 DESCRIPTION="SELinux userland library"
13 HOMEPAGE="http://userspace.selinuxproject.org"
14 SRC_URI="http://userspace.selinuxproject.org/releases/20131030/${P}.tar.gz
15 http://dev.gentoo.org/~swift/patches/${PN}/patchbundle-${P}-r5.tar.gz"
16
17 LICENSE="public-domain"
18 SLOT="0"
19 KEYWORDS="amd64 x86"
20 IUSE="python static-libs"
21
22 RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}
23 >=dev-libs/libpcre-8.30-r2[static-libs?]
24 python? ( ${PYTHON_DEPS} )"
25 DEPEND="${RDEPEND}
26 virtual/pkgconfig
27 python? ( >=dev-lang/swig-2.0.9 )"
28
29 src_prepare() {
30 EPATCH_MULTI_MSG="Applying libselinux patches ... " \
31 EPATCH_SUFFIX="patch" \
32 EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
33 EPATCH_FORCE="yes" \
34 epatch
35
36 epatch_user
37
38 multilib_copy_sources
39 }
40
41 multilib_src_compile() {
42 tc-export PKG_CONFIG RANLIB
43 local PCRE_CFLAGS=$(${PKG_CONFIG} libpcre --cflags)
44 local PCRE_LIBS=$(${PKG_CONFIG} libpcre --libs)
45 export PCRE_{CFLAGS,LIBS}
46
47 emake \
48 AR="$(tc-getAR)" \
49 CC="$(tc-getCC)" \
50 LIBDIR="\$(PREFIX)/$(get_libdir)" \
51 SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
52 LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
53 all
54
55 if multilib_is_native_abi && use python; then
56 building() {
57 python_export PYTHON_INCLUDEDIR PYTHON_LIBPATH
58 emake \
59 CC="$(tc-getCC)" \
60 PYINC="-I${PYTHON_INCLUDEDIR}" \
61 PYTHONLIBDIR="${PYTHON_LIBPATH}" \
62 PYPREFIX="${EPYTHON##*/}" \
63 LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
64 pywrap
65 }
66 python_foreach_impl building
67 fi
68 }
69
70 multilib_src_install() {
71 LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
72 emake DESTDIR="${D}" install
73
74 if multilib_is_native_abi && use python; then
75 installation() {
76 LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" install-pywrap
77 }
78 python_foreach_impl installation
79 fi
80
81 use static-libs || rm "${D}"/usr/lib*/*.a
82 }
83
84 pkg_postinst() {
85 # Fix bug 473502
86 for POLTYPE in ${POLICY_TYPES};
87 do
88 mkdir -p /etc/selinux/${POLTYPE}/contexts/files
89 touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local
90 # Fix bug 516608
91 for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
92 sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE};
93 done
94 done
95 }

  ViewVC Help
Powered by ViewVC 1.1.20