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

Contents of /sys-apps/policycoreutils/policycoreutils-2.0.55.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Fri Aug 12 18:46:59 2011 UTC (3 years, 3 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +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.55.ebuild,v 1.6 2011/07/08 10:54:27 ssuominen Exp $
4
5 IUSE="nls"
6
7 inherit eutils python
8
9 EXTRAS_VER="1.19"
10 SEMNG_VER="2.0"
11 SELNX_VER="2.0"
12
13 # BUGFIX_PATCH="${FILESDIR}/policycoreutils-1.30.6.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 RDEPEND="${COMMON_DEPS}
31 dev-python/sepolgen"
32
33 DEPEND="${COMMON_DEPS}
34 nls? ( sys-devel/gettext )"
35
36 S2=${WORKDIR}/policycoreutils-extra
37
38 src_unpack() {
39 unpack ${A}
40 cd "${S}"
41
42 [ ! -z "${BUGFIX_PATCH}" ] && epatch "${BUGFIX_PATCH}"
43
44 # rlpkg is more useful than fixfiles
45 sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
46 || die "fixfiles sed 1 failed"
47 sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
48 || die "fixfiles sed 2 failed"
49
50 local SUBDIRS="`cd ${S} && find -type d | cut -d/ -f2`"
51
52 if ! use nls; then
53 for i in ${SUBDIRS}; do
54 # disable locale stuff
55 sed -i -e s/-DUSE_NLS// "${S}/${i}/Makefile" \
56 || die "${i} NLS sed failed"
57 done
58 fi
59
60 # Gentoo Fixes
61 for i in ${SUBDIRS}; do
62 # add in CFLAGS
63 sed -i -e "s:-Wall:-Wall ${CFLAGS}:g" "${S}/${i}/Makefile" \
64 || die "${i} Makefile CFLAGS fix failed."
65 done
66 }
67
68 src_compile() {
69 einfo "Compiling policycoreutils"
70 emake -C "${S}" PYLIBVER="python$(python_get_version)" AUDIT_LOG_PRIV=y || die
71 einfo "Compiling policycoreutils-extra"
72 emake -C "${S2}" || die
73 }
74
75 src_install() {
76 python_need_rebuild
77
78 einfo "Installing policycoreutils"
79 make DESTDIR="${D}" -C "${S}" PYLIBVER="python$(python_get_version)" AUDIT_LOG_PRIV=y install || die
80 einfo "Installing policycoreutils-extra"
81 make DESTDIR="${D}" -C "${S2}" install || die
82
83 # remove redhat-style init script
84 rm -fR "${D}/etc/rc.d"
85
86 # compatibility symlinks
87 dosym /sbin/setfiles /usr/sbin/setfiles
88 dosym /lib/rc/runscript_selinux.so /lib/rcscripts/runscript_selinux.so
89
90 if has_version '<sys-libs/pam-0.99'; then
91 # install compat pam.d entries
92 # for older pam
93 make DESTDIR="${D}" -C "${S2}/pam.d" install || die
94 fi
95 }
96
97 pkg_postinst() {
98 python_mod_optimize $(python_get_sitedir)/seobject.py
99 }
100
101 pkg_postrm() {
102 python_mod_cleanup $(python_get_sitedir)/seobject.py
103 }

  ViewVC Help
Powered by ViewVC 1.1.20