/[gentoo-x86]/dev-python/sepolgen/sepolgen-1.1.9-r3.ebuild
Gentoo

Contents of /dev-python/sepolgen/sepolgen-1.1.9-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Sep 30 18:38:10 2013 UTC (12 months, 3 weeks ago) by swift
Branch: MAIN
Changes since 1.2: +15 -5 lines
Fix circular dep on selinux-base

(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key 0x2EDD52403B68AF47)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/sepolgen/sepolgen-1.1.9-r3.ebuild,v 1.2 2013/09/25 18:36:00 swift Exp $
4
5 EAPI="5"
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit python-r1 eutils
9
10 DESCRIPTION="SELinux policy generation library"
11 HOMEPAGE="http://userspace.selinuxproject.org"
12 SRC_URI="http://userspace.selinuxproject.org/releases/20130423/${P}.tar.gz
13 http://dev.gentoo.org/~swift/patches/sepolgen/patchbundle-${P}-r2.tar.gz"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE=""
19
20 DEPEND=">=sys-libs/libselinux-2.0[python]
21 app-admin/setools[python]
22 ${PYTHON_DEPS}"
23 RDEPEND="${DEPEND}"
24
25 src_prepare() {
26 EPATCH_MULTI_MSG="Applying sepolgen patches ... " \
27 EPATCH_SUFFIX="patch" \
28 EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
29 EPATCH_FORCE="yes" \
30 epatch
31
32 epatch_user
33
34 python_copy_sources
35 }
36
37 src_compile() {
38 :
39 }
40
41 src_test() {
42 if has_version sec-policy/selinux-base-policy; then
43 invoke_sepolgen_test() {
44 emake test
45 }
46 python_foreach_impl invoke_sepolgen_test
47 else
48 ewarn "Sepolgen requires sec-policy/selinux-base-policy to run tests."
49 fi
50 }
51
52 src_install() {
53 installation() {
54 emake DESTDIR="${D}" PYTHONLIBDIR="$(python_get_sitedir)" install
55 }
56 python_foreach_impl installation
57
58 # Create sepolgen.conf with different devel location definition
59 if [[ -f /etc/selinux/config ]];
60 then
61 local selinuxtype=$(awk -F'=' '/^SELINUXTYPE/ {print $2}' /etc/selinux/config);
62 mkdir -p "${D}"/etc/selinux || die "Failed to create selinux directory";
63 echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include" > "${D}"/etc/selinux/sepolgen.conf;
64 else
65 local selinuxtype="${POLICY_TYPES%% *}";
66 if [[ -n "${selinuxtype}" ]];
67 then
68 echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include" > "${D}"/etc/selinux/sepolgen.conf;
69 else
70 echo "SELINUX_DEVEL_PATH=/usr/share/selinux/strict/include" > "${D}"/etc/selinux/sepolgen.conf;
71 fi
72 fi
73 }

  ViewVC Help
Powered by ViewVC 1.1.20