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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Jun 16 18:06:29 2013 UTC (16 months, 1 week ago) by swift
Branch: MAIN
Changes since 1.1: +2 -2 lines
Stabilization of sepolgen

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

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-r2.ebuild,v 1.1 2013/05/18 18:03:42 swift Exp $
4
5 EAPI="3"
6 PYTHON_DEPEND="*"
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="*-jython *-pypy-* 3.*"
9
10 inherit python eutils
11
12 DESCRIPTION="SELinux policy generation library"
13 HOMEPAGE="http://userspace.selinuxproject.org"
14 SRC_URI="http://userspace.selinuxproject.org/releases/20130423/${P}.tar.gz
15 http://dev.gentoo.org/~swift/patches/sepolgen/patchbundle-${P}-r1.tar.gz"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="amd64 x86"
20 IUSE=""
21
22 DEPEND=">=sys-libs/libselinux-2.0[python]
23 app-admin/setools[python]"
24 RDEPEND="${DEPEND}"
25
26 src_prepare() {
27 # fix up default paths to not be RH specific
28 sed -i -e 's:/usr/share/selinux/devel:/usr/share/selinux/strict:' \
29 "${S}/src/sepolgen/defaults.py" || die
30
31 EPATCH_MULTI_MSG="Applying sepolgen patches ... " \
32 EPATCH_SUFFIX="patch" \
33 EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
34 EPATCH_FORCE="yes" \
35 epatch
36
37 epatch_user
38
39 python_src_prepare
40 }
41
42 src_compile() {
43 :
44 }
45
46 src_test() {
47 if has_version sec-policy/selinux-base-policy; then
48 python_src_test
49 else
50 ewarn "Sepolgen requires sec-policy/selinux-base-policy to run tests."
51 fi
52 }
53
54 src_install() {
55 installation() {
56 emake DESTDIR="${D}" PYTHONLIBDIR="$(python_get_sitedir)" install
57 }
58 python_execute_function installation
59
60 # Create sepolgen.conf with different devel location definition
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 }
65
66 pkg_postinst() {
67 python_mod_optimize sepolgen
68 }
69
70 pkg_postrm() {
71 python_mod_cleanup sepolgen
72 }

  ViewVC Help
Powered by ViewVC 1.1.20