Search:  
Gentoo Wiki

Ucpt:Sec-policy/polgen/polgen-1.1.ebuild

#

Image:Ebuild_file.png Sec-policy/polgen/polgen-1.1.ebuild

Download - Bugs - Discussion - History

Back to the Index
inherit eutils

DESCRIPTION="Automated Policy Generation"
SRC_URI="http://www.mitre.org/tech/selinux/polgen-1.1.tar.gz"
HOMEPAGE="http://www.mitre.org/tech/selinux/"

SLOT=""
LICENSE="GPL2, polgen"
KEYWORDS="x86"
IUSE=""

DEPEND=">=sys-libs/libsepol-1.6"

src_unpack() {
	cd ${WORKDIR}
	tar xzf ${DISTDIR}/${A}
}

src_install() {
	./configure --prefix=${D}/usr
	make install
	dodoc NEWS README COPYING AUTHORS ChangeLog doc/polgen.html
	
	# adjust prefix path in scripts
	cd ${D}/usr/bin
	D_ESCAPED="`echo ${D} | sed 's/\//\\\\\//g'`"
	einfo "D_ESCAPED=${D_ESCAPED}"
	for F in *; do
		if grep "${D}" "$F" > /dev/null 2>&1; then
			cp "$F" "$F.tmp"
			cat "$F.tmp" | sed "s/${D_ESCAPED}//g" > "$F"
			rm -f "$F.tmp"
		fi
	done
	
	# install convenience scripts
	for F in polgen_install_tempfiles polgen_uninstall_tempfiles polgen_trace; do
		cp ${FILESDIR}/$F ${D}/usr/bin/.
		chmod 755 ${D}/usr/bin/$F
	done
}
 #
Retrieved from "http://www.gentoo-wiki.info/Ucpt:Sec-policy/polgen/polgen-1.1.ebuild"

Last modified: Thu, 11 Aug 2005 19:15:00 +0000 Hits: 2,033