/[gentoo-x86]/sys-apps/gradm/gradm-2.0.ebuild
Gentoo

Contents of /sys-apps/gradm/gradm-2.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Fri Feb 25 19:02:35 2005 UTC (9 years, 9 months ago) by solar
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
- removed older ebuilds. If somebody needs them they can get them from the viewcvs Attic. Updated /dev/grsec to use ROOT for device nod creation. Thanks carlo for pointing this out.
(Portage version: 2.0.51-r15)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/gradm/gradm-2.0.ebuild,v 1.7 2005/01/08 21:26:59 solar Exp $
4
5 inherit flag-o-matic gcc
6
7 #MY_PV=2.0-${PV/*_/}
8
9 MAINTAINER="solar@gentoo.org"
10 DESCRIPTION="Administrative interface for grsecuritys2 access control lists"
11 HOMEPAGE="http://www.grsecurity.net/"
12 SRC_URI="http://www.grsecurity.net/gradm-${PV}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="x86 ~ppc ~sparc ~arm ~amd64" ; # ~alpha"
17 IUSE=""
18
19 DEPEND="virtual/libc
20 sys-devel/bison
21 sys-devel/flex
22 sys-apps/chpax"
23
24 S="${WORKDIR}/${PN}2"
25
26 src_unpack() {
27 unpack ${A}
28 cd ${S}
29
30 # (Jan 03 2004) - <solar@gentoo>
31 # static linking required for proper operation of gradm
32 # however ssp is known to break static linking when it's enabled
33 # in >=gcc-3.3.1 && <=gcc-3.3.2-r5 . So we strip ssp if needed.
34 gmicro=$(gcc-micro-version)
35 if [ "$(gcc-version)" == "3.3" -a -n "${gmicro}" -a ${gmicro} -le 2 ]; then
36 # extract out gentoo revision
37 gentoo_gcc_r=$($(gcc-getCC) -v 2>&1 | tail -n 1 | awk '{print $7}')
38 gentoo_gcc_r=${gentoo_gcc_r/,/}
39 gentoo_gcc_r=${gentoo_gcc_r/-/ }
40 gentoo_gcc_r=${gentoo_gcc_r:7}
41 [ -n "${gentoo_gcc_r}" -a ${gentoo_gcc_r} -le 5 ] && \
42 filter-flags -fstack-protector -fstack-protector-all
43 fi
44
45 ebegin "Patching Makefile to use gentoo CFLAGS"
46 sed -i -e "s|-O2|${CFLAGS}|" Makefile
47 eend $?
48
49 }
50
51 src_compile() {
52 cd ${S}
53 emake CC="$(gcc-getCC)" || die "compile problem"
54 }
55
56 src_install() {
57 cd ${S}
58 # Were not ready for init.d,script functions yet.
59 #exeinto /etc/init.d
60 #newexe ${FILESDIR}/grsecurity2.rc grsecurity2
61 #insinto /etc/conf.d
62 #doins ${FILESDIR}/grsecurity2
63
64 mkdir -p -m 700 ${D}/etc/grsec
65 doman gradm.8
66 dodoc acl
67
68 into /
69 dosbin grlearn gradm || die
70
71 # Normal users can authenticate to special roles now and thus
72 # need execution permission on gradm2. We remove group,other readable bits
73 # to help ensure that our gradm2 binary is as protected from misbehaving users.
74 fperms 711 ${D}/sbin/gradm
75 }
76
77 pkg_postinst() {
78 if [ ! -e /dev/grsec ] ; then
79 einfo "Making character device for grsec2 learning mode"
80 mkdir -p -m 755 /dev/
81 mknod -m 0622 /dev/grsec c 1 10 || die "Cant mknod for grsec learning device"
82 fi
83 }

  ViewVC Help
Powered by ViewVC 1.1.20