summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris PeBenito <pebenito@gentoo.org>2003-07-02 19:18:01 +0000
committerChris PeBenito <pebenito@gentoo.org>2003-07-02 19:18:01 +0000
commit9864608c536660e286ba5a31459e2a6996458471 (patch)
tree2cc532237d41709fc1587db5a720b233e0c3dac7 /app-admin
parentinitial setools commit (diff)
downloadgentoo-2-9864608c536660e286ba5a31459e2a6996458471.tar.gz
gentoo-2-9864608c536660e286ba5a31459e2a6996458471.tar.bz2
gentoo-2-9864608c536660e286ba5a31459e2a6996458471.zip
initial setools commit
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/setools/ChangeLog9
-rw-r--r--app-admin/setools/Manifest5
-rw-r--r--app-admin/setools/files/digest-setools-200306091
-rw-r--r--app-admin/setools/setools-20030609.ebuild102
4 files changed, 114 insertions, 3 deletions
diff --git a/app-admin/setools/ChangeLog b/app-admin/setools/ChangeLog
new file mode 100644
index 000000000000..94b8c6d5e296
--- /dev/null
+++ b/app-admin/setools/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for app-admin/setools
+# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/ChangeLog,v 1.1 2003/07/02 19:17:56 pebenito Exp $
+
+*setools-20030609 (02 Jul 2003)
+
+ 02 Jul 2003; Chris PeBenito <pebenito@gentoo.org> setools-20030609.ebuild:
+ Initial commit
+
diff --git a/app-admin/setools/Manifest b/app-admin/setools/Manifest
index 9af1a45ecf83..353b6e076d6e 100644
--- a/app-admin/setools/Manifest
+++ b/app-admin/setools/Manifest
@@ -1,4 +1,3 @@
-MD5 0968f69dd239816460b557bafb9a83b1 setools-20030609.ebuild 2407
+MD5 74cc055b48f08f6cce8c72908a6da12a setools-20030609.ebuild 2957
+MD5 43f0311815e84f50f8d2fb9233f44fcf ChangeLog 346
MD5 452654a1740a7defb4b5a8b2644c8285 files/digest-setools-20030609 65
-MD5 21e45fa8bb8b27a0359f0843ac817253 files/seuser.fc 110
-MD5 e0c0632a7843201f926afdecfc947443 files/seuser.te 4596
diff --git a/app-admin/setools/files/digest-setools-20030609 b/app-admin/setools/files/digest-setools-20030609
new file mode 100644
index 000000000000..94bc85646d76
--- /dev/null
+++ b/app-admin/setools/files/digest-setools-20030609
@@ -0,0 +1 @@
+MD5 a920713baf3578c4761c801bb82b9592 setools-20030609.tgz 247154
diff --git a/app-admin/setools/setools-20030609.ebuild b/app-admin/setools/setools-20030609.ebuild
new file mode 100644
index 000000000000..5af7420d4027
--- /dev/null
+++ b/app-admin/setools/setools-20030609.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/setools-20030609.ebuild,v 1.1 2003/07/02 19:17:56 pebenito Exp $
+
+DESCRIPTION="SELinux graphical policy tools"
+HOMEPAGE="http://www.tresys.com/selinux_policy_tools.html"
+SRC_URI="http://www.tresys.com/Downloads/selinux-tools/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+S="${WORKDIR}/setools"
+KEYWORDS="~x86"
+IUSE="selinux"
+
+DEPEND="sys-devel/bison
+ sys-devel/flex
+ dev-lang/tk"
+
+RDEPEND="dev-lang/tk
+ >=dev-tcltk/bwidget-1.4.1
+ selinux? ( sys-apps/selinux-small )"
+
+src_compile() {
+ # fix stupid hard-coded paths
+ cd ${S}/libapol
+ sed -e 's:local/::g' < apol_tcl.h > apol_tcl.h.new
+ mv -f apol_tcl.h.new apol_tcl.h
+ cd ${S}/apol
+ sed -e 's:local/selinux/::' < head.tcl > head.tcl.new
+ mv -f head.tcl.new head.tcl
+ cd ${S}/sepct
+ sed -e 's:local/::g' < top.tcl > top.tcl.new
+ mv -f top.tcl.new top.tcl
+ cd ${S}/seuser
+ sed -e 's:local/selinux/::' < seuser_head.tcl > seuser_head.tcl.new
+ mv -f seuser_head.tcl.new seuser_head.tcl
+ sed -e "s:/etc/security/selinux/src/policy/users:${POLICYDIR}/users:" \
+ -e "s:/etc/security/selinux/src/policy$:${POLICYDIR}:" \
+ < seuser.conf > seuser.conf.new
+ mv -f seuser.conf.new seuser.conf
+ cd ${S}
+
+ # fix the Makefile to listen to portage CFLAGS
+ sed -e 's:-g:$(EXTRA_CFLAGS):' < Makefile > Makefile.new
+ mv -f Makefile.new Makefile
+
+ # adjust for tcl/tk versions
+ has_version '>=dev-lang/tk-8.4' && \
+ TCL_LIBS="-ltk8.4 -ltcl8.4 -lfl -lm" || \
+ TCL_LIBS="-ltk8.3 -ltcl8.3 -lfl -lm"
+
+ emake TCL_LIBS="${TCL_LIBS}" EXTRA_CFLAGS="${CFLAGS}" all \
+ || die "compile failed"
+
+ if [ "`use selinux`" ]; then
+ # fix up the scripts we're going to install
+ cd ${S}/seuser
+
+ sed -e 's:local/selinux/::g' < seuseradd > seuseradd.new
+ sed -e 's:local/selinux/::g' < seuserdel > seuserdel.new
+ sed -e 's:local/selinux/::g' < seusermod > seusermod.new
+ mv -f seuseradd.new seuseradd
+ mv -f seuserdel.new seuserdel
+ mv -f seusermod.new seusermod
+
+ # fix up the file contexts
+ cd ${S}/policy
+ sed -e 's:local/selinux/::' -e 's:local/::' \
+ < seuser.fc > seuser.fc.new
+ mv -f seuser.fc.new seuser.fc
+ fi
+}
+
+src_install() {
+ dobin ${S}/apol/apol
+ dobin ${S}/awish/awish
+ dobin ${S}/sepct/sepcut
+
+ insinto /usr/lib/apol
+ doins ${S}/apol/{apol.tcl,apol_help.txt}
+ doins ${S}/sepct/sepcut_help.txt
+
+ if [ "`use selinux`" ]; then
+ dobin ${S}/seuser/{seuser,seuseradd,seuserdel,seusermod}
+ doins ${S}/seuser/{se_user.tcl,seuser_help.txt,seuser.conf}
+
+ insinto ${POLICYDIR}/domains/program
+ doins ${S}/policy/seuser.te
+ insinto ${POLICYDIR}/file_contexts/program
+ doins ${S}/policy/seuser.fc
+ fi
+
+ dodoc COPYING ChangeLog-setools README
+}
+
+pkg_postinst() {
+ if [ "`use selinux`" ]; then
+ einfo "A policy for the seuser program has been installed into"
+ einfo "${POLICYDIR}. Please reload your policy at relabel"
+ einfo "setools: rlpkg setools"
+ fi
+}