/[gentoo-x86]/app-forensics/ovaldi/ovaldi-5.10.1.2.ebuild
Gentoo

Contents of /app-forensics/ovaldi/ovaldi-5.10.1.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue May 22 20:54:50 2012 UTC (2 years, 1 month ago) by hwoarang
Branch: MAIN
Version bump thanks to LABBE Corentin <corentin.labbe@geomatys.fr>

(Portage version: 2.1.10.62/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=3
6
7 inherit eutils
8
9 DESCRIPTION="Free implementation of OVAL"
10 HOMEPAGE="http://oval.mitre.org/language/interpreter.html"
11 SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="ldap rpm selinux"
17
18 DEPEND="rpm? ( app-arch/rpm )
19 dev-libs/libgcrypt
20 dev-libs/libpcre
21 dev-libs/xalan-c
22 dev-libs/xerces-c
23 ldap? ( net-nds/openldap )
24 selinux? ( sys-libs/libselinux )"
25 RDEPEND="${DEPEND}"
26
27 S="${WORKDIR}/${P}-src"
28
29 src_prepare() {
30 epatch "${FILESDIR}"/${P}-xerces3.patch
31 epatch "${FILESDIR}"/${P}-strnicmp.patch
32 epatch "${FILESDIR}"/${P}-missing-memory-header.patch
33 if ! use ldap ; then
34 einfo "Disabling LDAP probes"
35 epatch "${FILESDIR}"/${P}-disable-ldap-probes.patch
36 sed -i 's/-lldap//' project/linux/Makefile || die
37 sed -i 's/.*LDAPProbe.h.*//' src/linux/ProbeFactory.h || die
38 rm src/probes/independent/LDAPProbe.{cpp,h} || die
39 fi
40
41 # rpm probes support is build dependant only on the presence of the rpm binary
42 if use rpm ; then
43 #Same problems as bug 274679, so i do a local copy of the header and patch it
44 cp /usr/include/rpm/rpmdb.h src/probes/linux/ || die
45 epatch "${FILESDIR}"/use_local_rpmdb.patch
46 epatch "${FILESDIR}"/rpmdb.patch
47 else
48 einfo "Disabling rpm probes"
49 sed -i 's/^PACKAGE_RPM/#PACKAGE_RPM/' project/linux/Makefile || die
50 fi
51 # same thing for dpkg, but package dpkg is not sufficient, needs app-arch/apt-pkg that is not on tree
52 einfo "Disabling dpkg probes"
53 sed -i 's/^PACKAGE_DPKG/#PACKAGE_DPKG/' project/linux/Makefile || die
54
55 #Disabling SELinux support
56 if ! use selinux ; then
57 rm src/probes/linux/SelinuxSecurityContextProbe.cpp || die
58 rm src/probes/linux/SelinuxBooleanProbe.cpp || die
59 rm src/probes/linux/SelinuxBooleanProbe.h || die
60 epatch "${FILESDIR}"/${P}-disable-selinux-probes.patch
61 else
62 epatch "${FILESDIR}"/${P}-add-selinux-libs.patch
63 fi
64 }
65
66 src_compile () {
67 emake -C project/linux || die
68 }
69
70 src_install () {
71 # no make install in Makefile
72 dosbin project/linux/Release/ovaldi project/linux/ovaldi.sh || die
73 dodir /var/log/${PN} || die
74 insinto /usr/share/${PN}
75 doins xml/* || die
76 dodoc docs/{README.txt,version.txt} || die
77 doman docs/ovaldi.1 || die
78 }

  ViewVC Help
Powered by ViewVC 1.1.20