diff options
author | Roman I Khimov <khimov@altell.ru> | 2010-07-29 19:12:19 +0400 |
---|---|---|
committer | Roman I Khimov <khimov@altell.ru> | 2010-08-05 08:30:45 +0400 |
commit | 57788916d7a3675260267ac1e043efd367806253 (patch) | |
tree | 0a5ee24e6a6460395a8b30da4ac3cef35122f1e3 /recipes/libprelude | |
parent | b32ce2a63973fdf72d1ffe94b8418ec214cb2b20 (diff) |
libprelude: new recipe
Libprelude is a library that guarantees secure connections between
all sensors and the Prelude Manager. Libprelude provides an Application
Programming Interface (API) for the communication with Prelude
sub-systems, it supplies the necessary functionality for generating and
emitting IDMEF events with Prelude and automates the saving and
re-transmission of data in times of temporary interruption of one of
the components of the system.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Diffstat (limited to 'recipes/libprelude')
4 files changed, 145 insertions, 0 deletions
diff --git a/recipes/libprelude/libprelude-1.0.0/libprelude-dont-regenerate-perl-makefile.patch b/recipes/libprelude/libprelude-1.0.0/libprelude-dont-regenerate-perl-makefile.patch new file mode 100644 index 0000000000..8a5844fbb4 --- /dev/null +++ b/recipes/libprelude/libprelude-1.0.0/libprelude-dont-regenerate-perl-makefile.patch @@ -0,0 +1,44 @@ +Index: libprelude-1.0.0/bindings/Makefile.am +=================================================================== +--- libprelude-1.0.0.orig/bindings/Makefile.am 2010-01-16 21:28:16.000000000 +0300 ++++ libprelude-1.0.0/bindings/Makefile.am 2010-07-29 17:27:46.000000000 +0400 +@@ -31,13 +31,13 @@ + endif + + +-perl-build: perl/PreludeEasy.cxx perl-makefile ++perl-build: perl/PreludeEasy.cxx + cd perl && $(MAKE) LD_RUN_PATH="" CC="$(CXX)" + +-install-exec-hook: perl-makefile ++install-exec-hook: + cd perl && $(MAKE) LD_RUN_PATH="" install + +-uninstall-hook: perl-makefile ++uninstall-hook: + cd perl && $(MAKE) uninstall + + +Index: libprelude-1.0.0/bindings/low-level/Makefile.am +=================================================================== +--- libprelude-1.0.0.orig/bindings/low-level/Makefile.am 2010-07-29 17:39:33.000000000 +0400 ++++ libprelude-1.0.0/bindings/low-level/Makefile.am 2010-07-29 17:39:59.000000000 +0400 +@@ -40,15 +40,15 @@ + endif + + +-perl-build: perl/Prelude.c perl-makefile ++perl-build: perl/Prelude.c + cd perl && $(MAKE) LD_RUN_PATH="" + +-install-exec-hook: perl-makefile ++install-exec-hook: + if HAVE_PERL + cd perl && $(MAKE) LD_RUN_PATH="" install + endif + +-uninstall-hook: perl-makefile ++uninstall-hook: + if HAVE_PERL + cd perl && $(MAKE) uninstall + endif diff --git a/recipes/libprelude/libprelude-1.0.0/libprelude-fix-uid-gid-conflicting-types.patch b/recipes/libprelude/libprelude-1.0.0/libprelude-fix-uid-gid-conflicting-types.patch new file mode 100644 index 0000000000..65e04c3ef9 --- /dev/null +++ b/recipes/libprelude/libprelude-1.0.0/libprelude-fix-uid-gid-conflicting-types.patch @@ -0,0 +1,13 @@ +Index: libprelude-1.0.0/src/include/prelude-client-profile.h +=================================================================== +--- libprelude-1.0.0.orig/src/include/prelude-client-profile.h ++++ libprelude-1.0.0/src/include/prelude-client-profile.h +@@ -91,7 +91,7 @@ void prelude_client_profile_set_uid(prel + + prelude_uid_t prelude_client_profile_get_uid(const prelude_client_profile_t *cp); + +-void prelude_client_profile_set_gid(prelude_client_profile_t *cp, prelude_uid_t gid); ++void prelude_client_profile_set_gid(prelude_client_profile_t *cp, prelude_gid_t gid); + + prelude_gid_t prelude_client_profile_get_gid(const prelude_client_profile_t *cp); + diff --git a/recipes/libprelude/libprelude-1.0.0/libprelude-perl-build-with-gnu-hash.patch b/recipes/libprelude/libprelude-1.0.0/libprelude-perl-build-with-gnu-hash.patch new file mode 100644 index 0000000000..cb470aa544 --- /dev/null +++ b/recipes/libprelude/libprelude-1.0.0/libprelude-perl-build-with-gnu-hash.patch @@ -0,0 +1,26 @@ +Index: libprelude-1.0.0/bindings/low-level/perl/Makefile.PL.in +=================================================================== +--- libprelude-1.0.0.orig/bindings/low-level/perl/Makefile.PL.in ++++ libprelude-1.0.0/bindings/low-level/perl/Makefile.PL.in +@@ -7,7 +7,7 @@ use Cwd "abs_path"; + my %attributs = (NAME => 'Prelude', + INC => '-I@top_srcdir@ -I@top_builddir@/src/include -I@top_srcdir@/src/include -I@top_builddir@/src/libprelude-error', + LIBS => ["-L@top_builddir@/src/.libs -lprelude", "-L$ENV{LIBDIR} -lprelude @LIBPRELUDE_LIBS@ @LIBADD_DL@ @LTLIBTHREAD@" ], +- LDDLFLAGS => "-L@top_builddir@/src/.libs $Config{lddlflags}"); ++ LDDLFLAGS => "-L@top_builddir@/src/.libs $ENV{lddlflags}"); + + if ( abs_path("@top_srcdir@") ne abs_path("@top_builddir@") ) { + foreach my $filename ( qw/Prelude.c Prelude.pm/ ) { +Index: libprelude-1.0.0/bindings/perl/Makefile.PL.in +=================================================================== +--- libprelude-1.0.0.orig/bindings/perl/Makefile.PL.in ++++ libprelude-1.0.0/bindings/perl/Makefile.PL.in +@@ -7,7 +7,7 @@ use Cwd "abs_path"; + my %attributs = (NAME => 'PreludeEasy', + INC => '-I@top_srcdir@ -I@top_builddir@/src/include -I@top_srcdir@/src/include -I@top_builddir@/src/libprelude-error -I@top_srcdir@/bindings/c++/include -I@top_srcdir@/libmissing -I@top_builddir@/libmissing', + LIBS => ["-L@top_builddir@/src/.libs -lprelude -L@top_builddir@/bindings/c++/.libs -lpreludecpp", "-L$ENV{LIBDIR} -lprelude @LIBPRELUDE_LIBS@ @LIBADD_DL@ @LTLIBTHREAD@" ], +- LDDLFLAGS => "-L@top_builddir@/src/.libs $Config{lddlflags}"); ++ LDDLFLAGS => "-L@top_builddir@/src/.libs $ENV{lddlflags}"); + + if ( abs_path("@top_srcdir@") ne abs_path("@top_builddir@") ) { + foreach my $filename ( qw/easy-idmef_wrap_perl.cxx PreludeEasy.pm/ ) { diff --git a/recipes/libprelude/libprelude_1.0.0.bb b/recipes/libprelude/libprelude_1.0.0.bb new file mode 100644 index 0000000000..d99af1c0f2 --- /dev/null +++ b/recipes/libprelude/libprelude_1.0.0.bb @@ -0,0 +1,62 @@ +DESCRIPTION = "Libprelude is a library that guarantees secure connections between all sensors and the Prelude Manager" +SECTION = "net" +DEPENDS = "gnutls libgcrypt zlib perl perl-native" +LICENSE = "GPLv2" +PR = "r0" + +SRC_URI = " \ + http://www.prelude-ids.com/download/releases/libprelude/${PN}-${PV}.tar.gz \ + file://libprelude-dont-regenerate-perl-makefile.patch \ + file://libprelude-perl-build-with-gnu-hash.patch \ + file://libprelude-fix-uid-gid-conflicting-types.patch \ + " +SRC_URI[md5sum] = "a5bb76538d240e5fac5f6ab0b7fabfe5" +SRC_URI[sha256sum] = "e16d83a6a7bcc43a02d6f2bd40c91a03a258a9a86bab42262cbb5adaba8c4640" + +inherit autotools gettext cpan-base binconfig pkgconfig + +EXTRA_OECONF = "--with-perl --without-python --without-lua-config" +PERL_VERSION = ${@get_perl_version(d)} + +do_configure_append() { + . ${STAGING_LIBDIR}/perl/config.sh + for i in bindings/perl bindings/low-level/perl; do + cd $i + export lddlflags + yes '' | perl Makefile.PL ${EXTRA_CPANFLAGS} CC="${cc}" LD="${ld}" LDFLAGS="${ldflags}" CCFLAGS="${ccflags}" + sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \ + -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \ + -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${datadir}/perl5:" \ + -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5:" \ + -e "s:\(LDDLFLAGS.*\)${STAGING_LIBDIR_NATIVE}:\1${STAGING_LIBDIR}:" \ + -e "s:^\(INSTALLSITELIB = \).*:\1${libdir}/perl/${PERL_VERSION}:" \ + -e "s:^\(INSTALLSITEARCH = \).*:\1${libdir}/perl/${PERL_VERSION}:" \ + Makefile + cd ${S} + done +} + +do_install_append() { + sed -i "s:${WORKDIR}/image::" ${D}${libdir}/perl/${PERL_VERSION}/auto/Prelude/.packlist + sed -i "s:${WORKDIR}/image::" ${D}${libdir}/perl/${PERL_VERSION}/auto/PreludeEasy/.packlist +} + +PACKAGES =+ "libpreludecpp libpreludecpp-dev libpreludecpp-dbg libprelude-perl-dbg libprelude-perl" + +FILES_${PN} = "${sysconfdir}/prelude ${libdir}/*.so.* ${bindir}/prelude-* ${localstatedir}" +FILES_${PN}-dev += "${bindir}/libprelude-config" +CONFFILES_${PN} = " \ + ${sysconfdir}/prelude/default/client.conf \ + ${sysconfdir}/prelude/default/global.conf \ + ${sysconfdir}/prelude/default/idmef-client.conf \ + ${sysconfdir}/prelude/default/tls.conf \ + " + +FILES_libpreludecpp = "${libdir}/libpreludecpp.so.*" +FILES_libpreludecpp-dev = "${libdir}/libpreludecpp.so ${libdir}/libpreludecpp.la" +FILES_libpreludecpp-dbg = "${libdir}/.debug/libpreludecpp.so.*" + +FILES_libprelude-perl-dbg = "${libdir}/perl/${PERL_VERSION}/auto/Prelude/.debug" +FILES_libprelude-perl = "${libdir}/perl" + +FILES_${PN}-dbg += "${libdir}/.debug ${bindir}/.debug ${libdir}/perl/${PERL_VERSION}/auto/Prelude/.debug" |