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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue May 13 02:22:47 2008 UTC (5 years, 11 months ago) by pebenito
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
sys-apps/policycoreutils: Mark 1.34.15 stable, clear old ebuilds.
(Portage version: 2.1.5_rc6)

1 # Copyright 1999-2007 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.11.ebuild,v 1.2 2007/10/19 14:57:32 pebenito Exp $
4
5 IUSE="nls"
6
7 inherit eutils python
8
9 EXTRAS_VER="1.18"
10 SEMNG_VER="1.10"
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-libs/pam
26 =sys-libs/libsemanage-${SEMNG_VER}*"
27
28 DEPEND="${RDEPEND}
29 nls? ( sys-devel/gettext )"
30
31 S2=${WORKDIR}/policycoreutils-extra
32
33 src_unpack() {
34 unpack ${A}
35 cd "${S}"
36
37 [ ! -z "${BUGFIX_PATCH}" ] && epatch "${BUGFIX_PATCH}"
38
39 # This warning makes no sense, in this context
40 sed -i -e '/FILE/ s/;/=NULL;/' "${S}/audit2why/audit2why.c" \
41 || die "audit2why sed failed"
42
43 # rlpkg is more useful than fixfiles
44 sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
45 || die "fixfiles sed 1 failed"
46 sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
47 || die "fixfiles sed 2 failed"
48
49 local SUBDIRS="`cd ${S} && find -type d | cut -d/ -f2`"
50
51 if ! useq nls; then
52 for i in ${SUBDIRS}; do
53 # disable locale stuff
54 sed -i -e s/-DUSE_NLS// "${S}/${i}/Makefile" \
55 || die "${i} NLS sed failed"
56 done
57 fi
58
59 # Gentoo Fixes
60 for i in ${SUBDIRS}; do
61 sed -i -e "s:-Wall:-Wall ${CFLAGS}:g" \
62 -e '/^AUDITH/d' \
63 "${S}/${i}/Makefile" \
64 || die "${i} Makefile CFLAGS fix failed."
65
66 # disable audit support because the required version
67 # in portage does not exist yet
68 done
69 }
70
71 src_compile() {
72 python_version
73
74 einfo "Compiling policycoreutils"
75 emake -C "${S}" PYLIBVER="python${PYVER}" || die
76 einfo "Compiling policycoreutils-extra"
77 emake -C "${S2}" || die
78 }
79
80 src_install() {
81 python_version
82
83 einfo "Installing policycoreutils"
84 make DESTDIR="${D}" -C "${S}" PYLIBVER="python${PYVER}" install || die
85 einfo "Installing policycoreutils-extra"
86 make DESTDIR="${D}" -C "${S2}" install || die
87
88 # remove redhat-style init script
89 rm -fR "${D}/etc/rc.d"
90
91 # compatibility symlink
92 dosym /sbin/setfiles /usr/sbin/setfiles
93
94 if has_version '<sys-libs/pam-0.99'; then
95 # install compat pam.d entries
96 # for older pam
97 make DESTDIR="${D}" -C "${S2}/pam.d" install || die
98 fi
99 }
100
101 pkg_postinst() {
102 python_version
103 python_mod_optimize "${ROOT}usr/lib/python${PYVER}/site-packages"
104 }
105
106 pkg_postrm() {
107 python_version
108 python_mod_cleanup "${ROOT}usr/lib/python${PYVER}/site-packages"
109 }

  ViewVC Help
Powered by ViewVC 1.1.20