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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Tue Jan 4 01:11:35 2005 UTC (9 years, 8 months ago) by pebenito
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
updates for embedded systems

1 pebenito 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 pebenito 1.4 # $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreutils-1.18.ebuild,v 1.3 2004/11/23 00:42:08 pebenito Exp $
4 pebenito 1.1
5     IUSE="build"
6    
7     inherit eutils
8    
9     EXTRAS_VER="1.9"
10 pebenito 1.3 SEPOL_VER="1.2"
11 pebenito 1.1
12     DESCRIPTION="SELinux core utilities"
13     HOMEPAGE="http://www.nsa.gov/selinux"
14     SRC_URI="http://www.nsa.gov/selinux/archives/${P}.tgz
15     mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2"
16     LICENSE="GPL-2"
17     SLOT="0"
18     KEYWORDS="~x86 ~ppc ~sparc ~amd64"
19    
20     DEPEND=">=sys-libs/libselinux-${PV}
21 pebenito 1.3 >=sys-libs/libsepol-${SEPOL_VER}
22 pebenito 1.1 sys-devel/gettext
23 pebenito 1.3 !build? ( sys-libs/pam )
24     build? ( sys-apps/baselayout )"
25 pebenito 1.1
26     S2=${WORKDIR}/policycoreutils-extra
27    
28     src_unpack() {
29     unpack ${A}
30    
31     cd ${S}
32    
33     # dont install fixfiles cron script
34     sed -i -e '/^all/s/fixfiles//' ${S}/scripts/Makefile \
35     || die "fixfiles sed 1 failed"
36     sed -i -e '/fixfiles/d' ${S}/scripts/Makefile \
37     || die "fixfiles sed 2 failed"
38    
39     # fix up to accept Gentoo CFLAGS
40     local SUBDIRS="`cd ${S} && find -type d | cut -d/ -f2`"
41     for i in ${SUBDIRS}; do
42     sed -i -e "s:-Wall:-Wall ${CFLAGS}:g" ${S}/${i}/Makefile \
43     || die "${i} Makefile CFLAGS fix failed."
44     done
45     }
46    
47     src_compile() {
48     if use build; then
49     einfo "Compiling setfiles"
50     emake -C ${S}/setfiles || die
51     else
52     einfo "Compiling policycoreutils"
53     emake -C ${S} || die
54     einfo "Compiling policycoreutils-extra"
55     emake -C ${S2} || die
56     fi
57     }
58    
59     src_install() {
60     if use build; then
61     dosbin ${S}/setfiles/setfiles
62     else
63     einfo "Installing policycoreutils"
64     make DESTDIR="${D}" -C ${S} install || die
65     einfo "Installing policycoreutils-extra"
66     make DESTDIR="${D}" -C ${S2} install || die
67     fi
68     }
69 pebenito 1.3
70     pkg_postinst() {
71     if use build; then
72     # need to ensure these
73     mkdir -p ${ROOT}/selinux
74     touch ${ROOT}/selinux/.keep
75     mkdir -p ${ROOT}/sys
76     touch ${ROOT}/sys/.keep
77     mkdir -p ${ROOT}/dev/pts
78     touch ${ROOT}/dev/pts/.keep
79     chmod 0666 ${ROOT}/dev/{ptmx,tty}
80     fi
81     }

  ViewVC Help
Powered by ViewVC 1.1.20