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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Jun 24 22:08:29 2004 UTC (10 years, 2 months ago) by agriffis
Branch: MAIN
Changes since 1.1: +2 -2 lines
update copyright line: Gentoo Technologies => Gentoo Foundation

1 # Copyright 1999-2004 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-r1.ebuild,v 1.1 2004/06/20 18:24:11 pfeifer 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/glibc
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 # Fixup for hardened-dev-sources-2.6.5-r5
31 ebegin "Patching gradm 2.0 sources with a few cvs fixes"
32 patch -p1 -s -N -E -d ${S} < ${FILESDIR}/gradm2-cvs-20Jun2004.diff || die
33 eend $?
34
35 # (Jan 03 2004) - <solar@gentoo>
36 # static linking required for proper operation of gradm
37 # however ssp is known to break static linking when it's enabled
38 # in >=gcc-3.3.1 && <=gcc-3.3.2-r5 . So we strip ssp if needed.
39 gmicro=$(gcc-micro-version)
40 if [ "$(gcc-version)" == "3.3" -a -n "${gmicro}" -a ${gmicro} -le 2 ]; then
41 # extract out gentoo revision
42 gentoo_gcc_r=$($(gcc-getCC) -v 2>&1 | tail -n 1 | awk '{print $7}')
43 gentoo_gcc_r=${gentoo_gcc_r/,/}
44 gentoo_gcc_r=${gentoo_gcc_r/-/ }
45 gentoo_gcc_r=${gentoo_gcc_r:7}
46 [ -n "${gentoo_gcc_r}" -a ${gentoo_gcc_r} -le 5 ] && \
47 filter-flags -fstack-protector -fstack-protector-all
48 fi
49
50 ebegin "Patching Makefile to use gentoo CFLAGS"
51 sed -i -e "s|-O2|${CFLAGS}|" Makefile
52 eend $?
53
54 }
55
56 src_compile() {
57 cd ${S}
58 emake CC="$(gcc-getCC)" || die "compile problem"
59 }
60
61 src_install() {
62 cd ${S}
63 # Were not ready for init.d,script functions yet.
64 #exeinto /etc/init.d
65 #newexe ${FILESDIR}/grsecurity2.rc grsecurity2
66 #insinto /etc/conf.d
67 #doins ${FILESDIR}/grsecurity2
68
69 mkdir -p -m 700 ${D}/etc/grsec
70 doman gradm.8
71 dodoc acl
72
73 into /
74 dosbin grlearn gradm || die
75
76 # Normal users can authenticate to special roles now and thus
77 # need execution permission on gradm2. We remove group,other readable bits
78 # to help ensure that our gradm2 binary is as protected from misbehaving users.
79 fperms 711 ${D}/sbin/gradm
80 }
81
82 pkg_postinst() {
83 if [ ! -e /dev/grsec ] ; then
84 einfo "Making character device for grsec2 learning mode"
85 mkdir -p -m 755 /dev/
86 mknod -m 0622 /dev/grsec c 1 10 || die "Cant mknod for grsec learning device"
87 fi
88 }

  ViewVC Help
Powered by ViewVC 1.1.20