/[gentoo-x86]/sys-apps/policycoreutils/policycoreutils-2.1.10-r5.ebuild
Gentoo

Contents of /sys-apps/policycoreutils/policycoreutils-2.1.10-r5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Sun Jul 7 18:02:54 2013 UTC (13 months, 2 weeks ago) by swift
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Summer cleaning

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

1 swift 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 swift 1.3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.1.10-r5.ebuild,v 1.2 2012/10/06 16:39:54 swift Exp $
4 swift 1.1
5     EAPI="4"
6     PYTHON_DEPEND="*"
7     PYTHON_USE_WITH="xml"
8     SUPPORT_PYTHON_ABIS="1"
9     RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
10    
11     inherit multilib python toolchain-funcs eutils
12    
13     EXTRAS_VER="1.22"
14     SEMNG_VER="2.1.6"
15     SELNX_VER="2.1.9"
16     SEPOL_VER="2.1.4"
17    
18 swift 1.2 IUSE="audit pam dbus"
19 swift 1.1
20     DESCRIPTION="SELinux core utilities"
21     HOMEPAGE="http://userspace.selinuxproject.org"
22     SRC_URI="http://userspace.selinuxproject.org/releases/20120216/${P}.tar.gz
23     http://dev.gentoo.org/~swift/patches/policycoreutils/patchbundle-${P}-gentoo-r3.tar.gz
24     mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
25    
26     LICENSE="GPL-2"
27     SLOT="0"
28 swift 1.2 KEYWORDS="amd64 x86"
29 swift 1.1
30     COMMON_DEPS=">=sys-libs/libselinux-${SELNX_VER}[python]
31     >=sys-libs/glibc-2.4
32     >=sys-libs/libcap-1.10-r10
33     >=sys-libs/libsemanage-${SEMNG_VER}[python]
34     sys-libs/libcap-ng
35     >=sys-libs/libsepol-${SEPOL_VER}
36     sys-devel/gettext
37     dev-python/ipy
38     dbus? (
39     sys-apps/dbus
40     dev-libs/dbus-glib
41     )
42     audit? ( >=sys-process/audit-1.5.1 )
43     pam? ( sys-libs/pam )"
44    
45     ### libcgroup -> seunshare
46     ### dbus -> restorecond
47    
48     # pax-utils for scanelf used by rlpkg
49     RDEPEND="${COMMON_DEPS}
50     dev-python/sepolgen
51     app-misc/pax-utils"
52    
53     DEPEND="${COMMON_DEPS}"
54    
55     S2=${WORKDIR}/policycoreutils-extra
56    
57     src_prepare() {
58     # rlpkg is more useful than fixfiles
59     sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
60     || die "fixfiles sed 1 failed"
61     sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
62     || die "fixfiles sed 2 failed"
63    
64     EPATCH_MULTI_MSG="Applying policycoreutils patches ... " \
65     EPATCH_SUFFIX="patch" \
66     EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
67     EPATCH_FORCE="yes" \
68     epatch
69    
70     # Overwrite gl.po, id.po and et.po with valid PO file
71     cp "${S}/po/sq.po" "${S}/po/gl.po" || die "failed to copy ${S}/po/sq.po to gl.po"
72     cp "${S}/po/sq.po" "${S}/po/id.po" || die "failed to copy ${S}/po/sq.po to id.po"
73     cp "${S}/po/sq.po" "${S}/po/et.po" || die "failed to copy ${S}/po/sq.po to et.po"
74     }
75    
76     src_compile() {
77     local use_audit="n";
78     local use_pam="n";
79     local use_dbus="n";
80     local use_sesandbox="n";
81    
82     use audit && use_audit="y";
83     use pam && use_pam="y";
84     use dbus && use_dbus="y";
85    
86     python_copy_sources semanage sandbox
87     building() {
88     einfo "Compiling policycoreutils"
89     emake -C "${S}" AUDIT_LOG_PRIVS="y" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" CC="$(tc-getCC)" PYLIBVER="python$(python_get_version)" || die
90     einfo "Compiling policycoreutils-extra "
91     emake -C "${S2}" AUDIT_LOG_PRIVS="y" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" CC="$(tc-getCC)" PYLIBVER="python$(python_get_version)" || die
92     }
93     python_execute_function -s --source-dir semanage building
94     }
95    
96     src_install() {
97     local use_audit="n";
98     local use_pam="n";
99     local use_dbus="n";
100     local use_sesandbox="n";
101    
102     use audit && use_audit="y";
103     use pam && use_pam="y";
104     use dbus && use_dbus="y";
105    
106     # Python scripts are present in many places. There are no extension modules.
107     installation() {
108     einfo "Installing policycoreutils"
109     emake -C "${S}" DESTDIR="${T}/images/${PYTHON_ABI}" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" AUDIT_LOG_PRIV="y" PYLIBVER="python$(python_get_version)" install || return 1
110    
111     einfo "Installing policycoreutils-extra"
112     emake -C "${S2}" DESTDIR="${T}/images/${PYTHON_ABI}" SHLIBDIR="${D}$(get_libdir)/rc" install || return 1
113     }
114     python_execute_function installation
115     python_merge_intermediate_installation_images "${T}/images"
116    
117     # remove redhat-style init script
118     rm -fR "${D}/etc/rc.d"
119    
120     # compatibility symlinks
121     dosym /sbin/setfiles /usr/sbin/setfiles
122     dosym /$(get_libdir)/rc/runscript_selinux.so /$(get_libdir)/rcscripts/runscript_selinux.so
123    
124     # location for permissive definitions
125     dodir /var/lib/selinux
126     keepdir /var/lib/selinux
127     }
128    
129     pkg_postinst() {
130     python_mod_optimize seobject.py
131     }
132    
133     pkg_postrm() {
134     python_mod_cleanup seobject.py
135     }

  ViewVC Help
Powered by ViewVC 1.1.20