/[gentoo-x86]/sys-apps/policycoreutils/policycoreutils-2.0.69-r1.ebuild
Gentoo

Contents of /sys-apps/policycoreutils/policycoreutils-2.0.69-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Aug 12 18:46:59 2011 UTC (3 years ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Removed deprecated versions

(Portage version: 2.1.10.3/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-2.0.69-r1.ebuild,v 1.4 2011/07/08 10:54:28 ssuominen Exp $
4
5 IUSE="nls"
6
7 inherit eutils python
8
9 EXTRAS_VER="1.20"
10 SEMNG_VER="2.0.33"
11 SELNX_VER="2.0"
12
13 #BUGFIX_PATCH="${FILESDIR}/policycoreutils-2.0.62-po.diff"
14
15 DESCRIPTION="SELinux core utilities"
16 HOMEPAGE="http://userspace.selinuxproject.org"
17 SRC_URI="http://userspace.selinuxproject.org/releases/current/devel/${P}.tar.gz
18 mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
19 LICENSE="GPL-2"
20 SLOT="0"
21 KEYWORDS="~amd64 ~x86"
22
23 COMMON_DEPS=">=sys-libs/libselinux-${SELNX_VER}
24 >=sys-libs/glibc-2.4
25 >=sys-process/audit-1.5.1
26 >=sys-libs/libcap-1.10-r10
27 sys-libs/pam
28 >=sys-libs/libsemanage-${SEMNG_VER}"
29
30 # pax-utils for scanelf used by rlpkg
31 RDEPEND="${COMMON_DEPS}
32 dev-python/sepolgen
33 app-misc/pax-utils"
34
35 DEPEND="${COMMON_DEPS}
36 nls? ( sys-devel/gettext )"
37
38 S2=${WORKDIR}/policycoreutils-extra
39
40 src_unpack() {
41 unpack ${A}
42 cd "${S}"
43
44 [ ! -z "${BUGFIX_PATCH}" ] && epatch "${BUGFIX_PATCH}"
45
46 # rlpkg is more useful than fixfiles
47 sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
48 || die "fixfiles sed 1 failed"
49 sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
50 || die "fixfiles sed 2 failed"
51
52 local SUBDIRS="`cd ${S} && find -type d | cut -d/ -f2`"
53
54 if ! use nls; then
55 for i in ${SUBDIRS}; do
56 # disable locale stuff
57 sed -i -e s/-DUSE_NLS// "${S}/${i}/Makefile" \
58 || die "${i} NLS sed failed"
59 done
60 fi
61
62 # Gentoo Fixes
63 for i in ${SUBDIRS}; do
64 # add in CFLAGS
65 sed -i -e "s:-Wall:-Wall ${CFLAGS}:g" "${S}/${i}/Makefile" \
66 || die "${i} Makefile CFLAGS fix failed."
67 done
68 }
69
70 src_compile() {
71 einfo "Compiling policycoreutils"
72 emake -C "${S}" PYLIBVER="python$(python_get_version)" AUDIT_LOG_PRIV=y || die
73 einfo "Compiling policycoreutils-extra"
74 emake -C "${S2}" || die
75 }
76
77 src_install() {
78 python_need_rebuild
79
80 einfo "Installing policycoreutils"
81 make DESTDIR="${D}" -C "${S}" PYLIBVER="python$(python_get_version)" AUDIT_LOG_PRIV=y install || die
82 einfo "Installing policycoreutils-extra"
83 make DESTDIR="${D}" -C "${S2}" install || die
84
85 # remove redhat-style init script
86 rm -fR "${D}/etc/rc.d"
87
88 # compatibility symlinks
89 dosym /sbin/setfiles /usr/sbin/setfiles
90 dosym /lib/rc/runscript_selinux.so /lib/rcscripts/runscript_selinux.so
91
92 if has_version '<sys-libs/pam-0.99'; then
93 # install compat pam.d entries
94 # for older pam
95 make DESTDIR="${D}" -C "${S2}/pam.d" install || die
96 fi
97 }
98
99 pkg_postinst() {
100 python_mod_optimize $(python_get_sitedir)/seobject.py
101 }
102
103 pkg_postrm() {
104 python_mod_cleanup $(python_get_sitedir)/seobject.py
105 }

  ViewVC Help
Powered by ViewVC 1.1.20