/[gentoo-x86]/sys-process/audit/audit-1.7.4.ebuild
Gentoo

Contents of /sys-process/audit/audit-1.7.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Tue Aug 24 13:56:22 2010 UTC (3 years, 11 months ago) by ssuominen
Branch: MAIN
Changes since 1.2: +3 -1 lines
Fix building with recent glibc wrt #334147 by William Keaney.
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 armin76 1.2 # Copyright 1999-2010 Gentoo Foundation
2 robbat2 1.1 # Distributed under the terms of the GNU General Public License v2
3 ssuominen 1.3 # $Header: /var/cvsroot/gentoo-x86/sys-process/audit/audit-1.7.4.ebuild,v 1.2 2010/05/29 17:40:26 armin76 Exp $
4 robbat2 1.1
5     inherit autotools multilib toolchain-funcs python
6    
7     DESCRIPTION="Userspace utilities for storing and processing auditing records"
8     HOMEPAGE="http://people.redhat.com/sgrubb/audit/"
9     SRC_URI="http://people.redhat.com/sgrubb/audit/${P}.tar.gz"
10    
11     LICENSE="GPL-2"
12     SLOT="0"
13 armin76 1.2 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
14 robbat2 1.1 IUSE="ldap"
15     # Testcases are pretty useless as they are built for RedHat users/groups and
16     # kernels.
17     RESTRICT="test"
18    
19     RDEPEND=">=dev-lang/python-2.4
20     ldap? ( net-nds/openldap )"
21     DEPEND="${RDEPEND}
22     dev-lang/swig
23     >=sys-kernel/linux-headers-2.6.23"
24     # Do not use os-headers as this is linux specific
25    
26     src_unpack() {
27     unpack ${A}
28     cd "${S}"
29    
30     # Old patch applies fine
31     #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch
32    
33     # Applied by upstream
34     #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch
35    
36     # Do not build GUI tools
37     sed -i \
38     -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \
39     "${S}"/configure.ac
40     sed -i \
41     -e 's,system-config-audit,,g' \
42     -e '/^SUBDIRS/s,\\$,,g' \
43     "${S}"/Makefile.am
44     rm -rf "${S}"/system-config-audit
45    
46     # Probably goes away in 1.6.9
47     EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch
48    
49     if ! use ldap; then
50     sed -i \
51     -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \
52     "${S}"/configure.ac
53     sed -i \
54     -e '/^SUBDIRS/s,zos-remote,,g' \
55     "${S}"/audisp/plugins/Makefile.am
56     fi
57    
58 ssuominen 1.3 epatch "${FILESDIR}"/${P}-glibc212.patch
59    
60 robbat2 1.1 # Regenerate autotooling
61     eautoreconf
62     }
63    
64     src_compile() {
65     #append-flags -D'__attribute__(x)='
66     econf --sbindir=/sbin --without-prelude || die
67     emake || die "emake failed"
68     }
69    
70     src_install() {
71     emake DESTDIR="${D}" install || die "emake install failed"
72     dodoc AUTHORS ChangeLog README* THANKS TODO
73     docinto contrib
74     dodoc contrib/*
75     docinto contrib/plugin
76     dodoc contrib/plugin/*
77    
78     newinitd "${FILESDIR}"/auditd-init.d-1.2.3 auditd
79     newconfd "${FILESDIR}"/auditd-conf.d-1.2.3 auditd
80    
81     # things like shadow use this so we need to be in /
82     dodir /$(get_libdir)
83     mv "${D}"/usr/$(get_libdir)/lib*.so* "${D}"/$(get_libdir)/ || die
84     gen_usr_ldscript libaudit.so libauparse.so
85    
86     # remove RedHat garbage
87     rm -r "${D}"/etc/{rc.d,sysconfig} || die
88    
89     # Gentoo rules
90     insinto /etc/audit/
91     doins "${FILESDIR}"/audit.rules*
92    
93     # audit logs go here
94     keepdir /var/log/audit/
95    
96     # Security
97     lockdown_perms "${D}"
98     }
99    
100     pkg_postinst() {
101     lockdown_perms "${ROOT}"
102     python_mod_optimize
103     }
104    
105     pkg_postrm() {
106     python_mod_cleanup
107     }
108    
109     lockdown_perms() {
110     # upstream wants these to have restrictive perms
111     basedir="$1"
112     chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null
113     chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null
114     chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null
115     }

  ViewVC Help
Powered by ViewVC 1.1.20