/[gentoo-x86]/sys-apps/rsbac-admin/rsbac-admin-1.2.99.ebuild
Gentoo

Diff of /sys-apps/rsbac-admin/rsbac-admin-1.2.99.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.1.1.1
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sys-apps/rsbac-admin/Attic/rsbac-admin-1.2.99.ebuild,v 1.1 2005/05/09 23:19:48 kang Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-apps/rsbac-admin/Attic/rsbac-admin-1.2.99.ebuild,v 1.1.1.1 2005/11/30 09:56:03 chriswhite Exp $
4 4
5inherit eutils
5inherit subversion 6inherit subversion
6 7
7IUSE="debug pam" 8IUSE="pam"
8 9
9# RSBAC Adming packet name 10# RSBAC Adming packet name
10ADMIN=rsbac-admin-v${PV} 11#ADMIN=rsbac-admin-v${PV}
11 12
12DESCRIPTION="Rule Set Based Access Control (RSBAC) Admin Tools" 13DESCRIPTION="Rule Set Based Access Control (RSBAC) Admin Tools"
13HOMEPAGE="http://www.rsbac.org/ http://hardened.gentoo.org/rsbac" 14HOMEPAGE="http://www.rsbac.org/ http://hardened.gentoo.org/rsbac"
14 15
15SLOT="0" 16SLOT="0"
17KEYWORDS="-*" 18KEYWORDS="-*"
18NSS="1.2.5" 19NSS="1.2.5"
19 20
20DEPEND="dev-util/dialog 21DEPEND="dev-util/dialog
21 pam? ( sys-libs/pam ) 22 pam? ( sys-libs/pam )
22 sys-apps/baselayout 23 sys-apps/baselayout"
23 || (
24 >=sys-kernel/rsbac-sources-2.4.99
25 >=sys-kernel/rsbac-dev-sources-2.6.99
26 )"
27 24
28RDEPEND=">=sys-libs/ncurses-5.2" 25RDEPEND=">=sys-libs/ncurses-5.2"
29 26
27
30src_unpack() { 28src_unpack() {
31 ESVN_REPO_URI="svn://rsbac.mprivacy-update.de/rsbac/rsbac-admin-v1.2.5" 29 ESVN_REPO_URI="svn://rsbac.de/rsbac1/rsbac-admin/trunk"
32 subversion_src_unpack 30 subversion_src_unpack
33 cd ${WORKDIR}/${P}/${ADMIN} 31 cd ${WORKDIR}/${P}/${ADMIN}
34} 32}
35 33
34
36src_compile() { 35src_compile() {
37 cd ${WORKDIR}/${P}/${ADMIN} 36 local rsbacmakeargs
38 econf || die "cannot ./configure RSBAC Admin Tools." 37 rsbacmakeargs="libs tools"
39 cd ${WORKDIR}/${ADMIN}/contrib/rsbac-klogd-2.0; econf || die "cannot ./configure rsbac-klogd"
40 cd ${WORKDIR}/${ADMIN}/contrib/nss_rsbac; econf || die "cannot ./configure nss_rsbac"
41 cd ${WORKDIR}/${ADMIN}
42 emake || die "cannot make RSBAC Admin tools: Did you really already compiled
43 a RSBAC-enabled kernel ? Please check the documentation at:
44 http://hardened.gentoo.org/rsbac"
45 emake -C contrib/rsbac-klogd-2.0 || die "cannot make rsbac-klogd"
46 cd contrib/nss_rsbac
47 LD="../../src/librsbac.so.$NSS" econf || die "cannot conf nss_rsbac"
48 cd ${WORKDIR}/${ADMIN}
49 emake -C contrib/nss_rsbac || die "cannot make nss_rsbac"
50 use pam && { 38 use pam && {
51 emake -C contrib/pam_rsbac || die "cannot make pam_rsbac" 39 rsbacmakeargs="${makeargs} pam nss"
52 } 40 }
53 if use debug; then 41 emake PREFIX=/usr ${rsbacmakeargs} || die "cannot build (${rsbacmakeargs})"
54 emake -C contrib/regression || die "cannot make regression"
55 fi
56} 42}
57 43
58src_install() { 44src_install() {
59 cd ${WORKDIR}/${ADMIN} 45 local rsabacinstallargs
60 einstall || die "cannot make install" 46 rsbacinstallargs="headers-install libs-install tools-install"
61 einstall -C contrib/rsbac-klogd-2.0 || die "cannot install rsbac-klogd" 47 use pam && {
62 einstall -C contrib/nss_rsbac || die "cannot install nss_rsbac" 48 rsbacinstallargs="${rsbacinstallargs} pam-install nss-install"
63 if use debug; then 49 }
64 exeinto /usr/share/rsbac-admin-dev/regression 50 make PREFIX=${D}/usr DESTDIR=${D} ${rsbacinstallargs} || \
65 doexe contrib/regression/*_test 51 die "cannot install (${rsbacinstallargs})"
66 fi
67 insinto /etc 52 insinto /etc
68 newins ${FILESDIR}/rsbac.conf rsbac.conf ${FILESDIR}/nsswitch.conf 53 newins ${FILESDIR}/rsbac.conf rsbac.conf ${FILESDIR}/nsswitch.conf
69 exeinto /etc/init.d
70 newinitd ${FILESDIR}/rklogd.init rklogd
71 use pam && {
72 insinto /lib/security
73 newins ${WORKDIR}/${ADMIN}/contrib/pam_rsbac/pam_rsbac.so pam_rsbac.so
74 }
75 dodir /secoff 54 dodir /secoff
76 keepdir /secoff 55 keepdir /secoff
77 dodir /secoff/log 56 dodir /var/log/rsbac
78 keepdir /secoff/log 57 keepdir /var/log/rsbac
79} 58}
80 59
81pkg_postinst() { 60pkg_postinst() {
82 enewgroup secoff 400 || die "problem adding group secoff" 61 enewgroup secoff 400 || die "problem adding group secoff"
83 enewuser secoff 400 /bin/bash /secoff secoff || die "problem adding user secoff" 62 enewuser secoff 400 /bin/bash /secoff secoff || \
63 die "problem adding user secoff"
64 enewgroup audit 404 || die "problem adding group audit"
65 enewuser audit 404 /bin/false /dev/null audit || \
66 die "problem adding user audit"
84 67
68 chmod 700 /secoff /var/log/rsbac || \
85 chmod 700 /secoff /secoff/log || die "problem changing permissions of /secoff and/or /secoff/log" 69 die "problem changing permissions of /secoff and/or /secoff/log"
86 chown secoff:secoff -R /secoff || die "problem changing ownership of /secoff" 70 chown secoff:secoff -R /secoff || \
71 die "problem changing ownership of /secoff"
72 einfo "It is suggested to run (for example) a separate copy of syslog-ng to"
73 einfo "log RSBAC messages, as user audit (uid 404) instead of using the deprecated"
74 einfo "rklogd. See http://rsbac.org/documentation/administration_examples/syslog-ng"
75 einfo "for more information."
87} 76}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.1.1

  ViewVC Help
Powered by ViewVC 1.1.20