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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Jul 22 13:20:53 2009 UTC (4 years, 8 months ago) by pebenito
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Drop alpha, mips, ppc, sparc selinux support part 3.
(Portage version: 2.2_rc33/cvs/Linux x86_64)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-1.34.15.ebuild,v 1.4 2008/05/29 17:58:30 hawking Exp $
4
5 IUSE="nls"
6
7 inherit eutils python multilib
8
9 EXTRAS_VER="1.18"
10 SEMNG_VER="1.10.9"
11 SELNX_VER="1.34"
12
13 # BUGFIX_PATCH="${FILESDIR}/policycoreutils-1.30.6.diff"
14
15 DESCRIPTION="SELinux core utilities"
16 HOMEPAGE="http://www.nsa.gov/selinux"
17 SRC_URI="http://www.nsa.gov/selinux/archives/${P}.tgz
18 mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
19 LICENSE="GPL-2"
20 SLOT="0"
21 KEYWORDS="alpha amd64 mips ppc sparc x86"
22
23 RDEPEND=">=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 DEPEND="${RDEPEND}
31 nls? ( sys-devel/gettext )"
32
33 S2=${WORKDIR}/policycoreutils-extra
34
35 src_unpack() {
36 unpack ${A}
37 cd "${S}"
38
39 [ ! -z "${BUGFIX_PATCH}" ] && epatch "${BUGFIX_PATCH}"
40
41 # rlpkg is more useful than fixfiles
42 sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
43 || die "fixfiles sed 1 failed"
44 sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
45 || die "fixfiles sed 2 failed"
46
47 local SUBDIRS="`cd ${S} && find -type d | cut -d/ -f2`"
48
49 if ! useq nls; then
50 for i in ${SUBDIRS}; do
51 # disable locale stuff
52 sed -i -e s/-DUSE_NLS// "${S}/${i}/Makefile" \
53 || die "${i} NLS sed failed"
54 done
55 fi
56
57 # Gentoo Fixes
58 for i in ${SUBDIRS}; do
59 # add in CFLAGS
60 sed -i -e "s:-Wall:-Wall ${CFLAGS}:g" "${S}/${i}/Makefile" \
61 || die "${i} Makefile CFLAGS fix failed."
62 done
63 }
64
65 src_compile() {
66 python_version
67
68 einfo "Compiling policycoreutils"
69 emake -C "${S}" PYLIBVER="python${PYVER}" AUDIT_LOG_PRIV=y || die
70 einfo "Compiling policycoreutils-extra"
71 emake -C "${S2}" || die
72 }
73
74 src_install() {
75 python_version
76
77 einfo "Installing policycoreutils"
78 make DESTDIR="${D}" -C "${S}" PYLIBVER="python${PYVER}" AUDIT_LOG_PRIV=y install || die
79 einfo "Installing policycoreutils-extra"
80 make DESTDIR="${D}" -C "${S2}" install || die
81
82 # remove redhat-style init script
83 rm -fR "${D}/etc/rc.d"
84
85 # compatibility symlink
86 dosym /sbin/setfiles /usr/sbin/setfiles
87
88 if has_version '<sys-libs/pam-0.99'; then
89 # install compat pam.d entries
90 # for older pam
91 make DESTDIR="${D}" -C "${S2}/pam.d" install || die
92 fi
93 }
94
95 pkg_postinst() {
96 python_version
97 python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages
98 }
99
100 pkg_postrm() {
101 python_mod_cleanup
102 }

  ViewVC Help
Powered by ViewVC 1.1.20