/[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 - (hide annotations) (download)
Wed Jul 22 13:20:53 2009 UTC (5 years, 5 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 pebenito 1.1 # Copyright 1999-2008 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 pebenito 1.5 # $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 pebenito 1.1
5     IUSE="nls"
6    
7 hawking 1.4 inherit eutils python multilib
8 pebenito 1.1
9     EXTRAS_VER="1.18"
10 pebenito 1.3 SEMNG_VER="1.10.9"
11 pebenito 1.1 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 pebenito 1.2 KEYWORDS="alpha amd64 mips ppc sparc x86"
22 pebenito 1.1
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 pebenito 1.2 cd "${S}"
38 pebenito 1.1
39     [ ! -z "${BUGFIX_PATCH}" ] && epatch "${BUGFIX_PATCH}"
40    
41     # rlpkg is more useful than fixfiles
42 pebenito 1.2 sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \
43 pebenito 1.1 || die "fixfiles sed 1 failed"
44 pebenito 1.2 sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \
45 pebenito 1.1 || 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 pebenito 1.2 sed -i -e s/-DUSE_NLS// "${S}/${i}/Makefile" \
53 pebenito 1.1 || die "${i} NLS sed failed"
54     done
55     fi
56    
57     # Gentoo Fixes
58     for i in ${SUBDIRS}; do
59     # add in CFLAGS
60 pebenito 1.2 sed -i -e "s:-Wall:-Wall ${CFLAGS}:g" "${S}/${i}/Makefile" \
61 pebenito 1.1 || die "${i} Makefile CFLAGS fix failed."
62     done
63     }
64    
65     src_compile() {
66     python_version
67    
68     einfo "Compiling policycoreutils"
69 pebenito 1.2 emake -C "${S}" PYLIBVER="python${PYVER}" AUDIT_LOG_PRIV=y || die
70 pebenito 1.1 einfo "Compiling policycoreutils-extra"
71 pebenito 1.2 emake -C "${S2}" || die
72 pebenito 1.1 }
73    
74     src_install() {
75     python_version
76    
77     einfo "Installing policycoreutils"
78 pebenito 1.2 make DESTDIR="${D}" -C "${S}" PYLIBVER="python${PYVER}" AUDIT_LOG_PRIV=y install || die
79 pebenito 1.1 einfo "Installing policycoreutils-extra"
80 pebenito 1.2 make DESTDIR="${D}" -C "${S2}" install || die
81 pebenito 1.1
82     # remove redhat-style init script
83 pebenito 1.2 rm -fR "${D}/etc/rc.d"
84 pebenito 1.1
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 pebenito 1.2 make DESTDIR="${D}" -C "${S2}/pam.d" install || die
92 pebenito 1.1 fi
93     }
94    
95     pkg_postinst() {
96     python_version
97 hawking 1.4 python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages
98 pebenito 1.1 }
99    
100     pkg_postrm() {
101 hawking 1.4 python_mod_cleanup
102 pebenito 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20