/[gentoo-x86]/app-forensics/openscap/openscap-0.9.3-r1.ebuild
Gentoo

Contents of /app-forensics/openscap/openscap-0.9.3-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Jan 30 18:43:25 2013 UTC (20 months, 3 weeks ago) by hwoarang
Branch: MAIN
Revbump with patch to fix bug #450328. Thanks to Anton Bolshakov <anton.bugs@gmail.com>

(Portage version: 2.1.11.50/cvs/Linux x86_64, signed Manifest commit with key B4AFF2C2)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-forensics/openscap/openscap-0.9.3.ebuild,v 1.1 2013/01/04 22:48:07 hwoarang Exp $
4
5 EAPI=3
6
7 PYTHON_DEPEND="2"
8
9 inherit eutils multilib python bash-completion-r1
10
11 DESCRIPTION="Framework which enables integration with the Security Content Automation Protocol (SCAP)"
12 HOMEPAGE="http://www.open-scap.org/"
13 SRC_URI="https://fedorahosted.org/releases/o/p/${PN}/${P}.tar.gz"
14
15 LICENSE="LGPL-2.1"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="bash-completion doc nss perl python rpm selinux sql test"
19 #RESTRICT="test"
20
21 RDEPEND="!nss? ( dev-libs/libgcrypt )
22 nss? ( dev-libs/nss )
23 rpm? ( >=app-arch/rpm-4.9 )
24 sql? ( dev-db/opendbx )
25 dev-libs/libpcre
26 dev-libs/libxml2
27 dev-libs/libxslt
28 net-misc/curl"
29 DEPEND="${RDEPEND}
30 perl? ( dev-lang/swig )
31 python? ( dev-lang/swig )
32 test? (
33 app-arch/unzip
34 dev-perl/XML-XPath
35 net-misc/ipcalc
36 sys-apps/grep )"
37
38 pkg_setup() {
39 python_set_active_version 2
40 python_pkg_setup
41 }
42
43 src_prepare() {
44 sed -i 's/uname -p/uname -m/' tests/probes/uname/test_probes_uname.xml.sh || die
45
46 #probe runlevel for non-centos/redhat/fedora is not implemented
47 sed -i 's,.*runlevel_test.*,echo "runlevel test bypassed",' tests/mitre/test_mitre.sh || die
48 sed -i 's,probecheck "runlevel,probecheck "runlevellllll,' tests/probes/runlevel/test_probes_runlevel.sh || die
49
50 #According to comment of theses tests, we must modify it. For the moment disable it
51 sed -i 's,.*linux-def_inetlisteningservers_test,#&,' tests/mitre/test_mitre.sh || die
52 sed -i 's,.*ind-def_environmentvariable_test,#&,' tests/mitre/test_mitre.sh || die
53
54 # theses tests are hardcoded for checking hald process...,
55 # but no good solution for the moment, disabling them with a fake echo
56 # because encased in a if then
57 # sed -i 's,ha.d,/sbin/udevd --daemon,g' tests/mitre/unix-def_process_test.xml || die
58 # sed -i 's,ha.d,/sbin/udevd --daemon,g' tests/mitre/unix-def_process58_test.xml || die
59 sed -i 's,.*process_test.*,echo "process test bypassed",' tests/mitre/test_mitre.sh || die
60 sed -i 's,.*process58_test.*,echo "process58 test bypassed",' tests/mitre/test_mitre.sh || die
61
62 #This test fail
63 sed -i 's,.*generate report: xccdf,#&,' tests/API/XCCDF/unittests/all.sh || die
64
65 if ! use rpm ; then
66 sed -i 's,probe_rpminfo_req_deps_ok=yes,probe_rpminfo_req_deps_ok=no,' configure || die
67 sed -i 's,probe_rpminfo_opt_deps_ok=yes,probe_rpminfo_opt_deps_ok=no,' configure || die
68 sed -i 's,probe_rpmverify_req_deps_ok=yes,probe_rpmverify_req_deps_ok=no,' configure || die
69 sed -i 's,probe_rpmverify_opt_deps_ok=yes,probe_rpmverify_opt_deps_ok=no,' configure || die
70 sed -i 's,^probe_rpm.*_deps_missing=,&disabled by USE flag,' configure || die
71 sed -i 's,.*rpm.*,#&,' tests/mitre/test_mitre.sh || die
72 fi
73 if ! use selinux ; then
74 sed -i 's,.*selinux.*, echo "SELinux test bypassed",' tests/mitre/test_mitre.sh || die
75 #process58 need selinux
76 sed -i 's,.*process58,#&,' tests/mitre/test_mitre.sh || die
77 fi
78 #450328
79 epatch "${FILESDIR}"/${P}-policy.patch
80 }
81
82 src_configure() {
83 local myconf
84 if use python ; then
85 myconf+=" --enable-python"
86 else
87 myconf+=" --enable-python=no"
88 fi
89 if use perl ; then
90 myconf+=" --enable-perl"
91 fi
92 if use nss ; then
93 myconf+=" --with-crypto=nss3"
94 else
95 myconf+=" --with-crypto=gcrypt"
96 fi
97 econf ${myconf}
98 }
99
100 src_install() {
101 emake install DESTDIR="${D}" || die
102 find "${D}" -name '*.la' -delete || die
103 if use doc ; then
104 dohtml -r docs/html/* || die
105 dodoc docs/examples/* || die
106 fi
107 if use bash-completion ; then
108 dobashcomp "${D}"/etc/bash_completion.d/oscap
109 fi
110 rm -rf "${D}"/etc/bash_completion.d || die
111 }

  ViewVC Help
Powered by ViewVC 1.1.20