ulogd: Disable building pgsql/mysql output plugins

As ulogd's configure script doesn't support this out of the box, we need
to patch it for this.
This commit is contained in:
Harald Welte 2015-05-03 11:36:54 +02:00
parent 8753fbf081
commit 809e9cd999
2 changed files with 54 additions and 1 deletions

View File

@ -0,0 +1,50 @@
From c61c05c2d050410c24346d42b013d7cb39149949 Mon Sep 17 00:00:00 2001
From: Harald Welte <laforge@gnumonks.org>
Date: Sun, 3 May 2015 11:08:54 +0200
Subject: [PATCH] configure.ac: Add --without-{mysql,pgsql}
In some cases you may not want to build a certain output plugin, even
if the headers/libraries actually exist on the build host.
---
configure.ac | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index c814bec..1a7f8de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,7 +85,10 @@ if [! test "x$enable_nfacct" = "xyes"]; then
enable_nfacct="no"
fi
-CT_CHECK_POSTGRES_DB()
+AC_ARG_WITH([pgsql], AS_HELP_STRING([--without-pgsql], [Build without postgresql output plugin [default=test]]))
+AS_IF([test "x$with_pgsql" != "xno"], [
+ CT_CHECK_POSTGRES_DB()
+])
AM_CONDITIONAL(HAVE_PGSQL, test "x$PQLIBPATH" != "x")
if test "x$PQLIBPATH" != "x"; then
enable_pgsql="yes"
@@ -93,7 +96,10 @@ else
enable_pgsql="no"
fi
-CT_CHECK_MYSQL_DB()
+AC_ARG_WITH([mysql], AS_HELP_STRING([--without-mysql], [Build without mysql output plugin [default=test]]))
+AS_IF([test "x$with_mysql" != "xno"], [
+ CT_CHECK_MYSQL_DB()
+])
AM_CONDITIONAL(HAVE_MYSQL, test "x$MYSQL_LIB" != "x")
if test "x$MYSQL_LIB" != "x"; then
enable_mysql="yes"
@@ -101,6 +107,7 @@ else
enable_mysql="no"
fi
+
AC_ARG_WITH([sqlite], AS_HELP_STRING([--without-sqlite], [Build without SQLITE3 output plugin [default=test]]))
AS_IF([test "x$with_sqlite" != "xno"], [
PKG_CHECK_MODULES([libsqlite3], [sqlite3], [], [:])
--
2.1.4

View File

@ -3,11 +3,12 @@ HOMEPAGE = "http://www.netfilter.org/projects/ulogd/index.html"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
DEPENDS = "libnfnetlink libnetfilter-log libnetfilter-conntrack libmnl libnetfilter-acct sqlite3 jansson"
PR = "r3"
PR = "r4"
SRC_URI = " \
http://www.netfilter.org/projects/ulogd/files/ulogd-${PV}.tar.bz2;name=tar \
file://init \
file://0001-configure.ac-Add-without-mysql-pgsql.patch \
"
SRC_URI[tar.md5sum] = "7c71ec460dfea5287eba27472c521ebc"
SRC_URI[tar.sha256sum] = "56b30a13a8832e97178f39b7bb173a0b1dfe173dbb60d99a1a386c0962a2effd"
@ -18,6 +19,8 @@ inherit autotools update-rc.d
INITSCRIPT_NAME = "ulogd"
EXTRA_OECONF = "--without-mysql --without-pgsql --without-dbi"
do_install_append() {
install -d ${D}/${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/ulogd