Patchwork [meta-oe,5/5] syslog-ng: enable systemd support

login
register
mail settings
Submitter Martin Jansa
Date Dec. 6, 2011, 10:36 a.m.
Message ID <fe86b9e787a474dbe4a085ce88e0546cba740d3a.1323167378.git.Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/16295/
State Accepted
Commit fe86b9e787a474dbe4a085ce88e0546cba740d3a
Headers show

Comments

Martin Jansa - Dec. 6, 2011, 10:36 a.m.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta-oe/recipes-support/syslog-ng/syslog-ng.inc    |   12 +++++++++++-
 .../recipes-support/syslog-ng/syslog-ng_3.2.5.bb   |    2 +-
 2 files changed, 12 insertions(+), 2 deletions(-)

Patch

diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
index c57c5ab..3bbebec 100644
--- a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
+++ b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
@@ -9,7 +9,7 @@  RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "",
 
 INC_PR = "r6"
 
-inherit autotools
+inherit autotools systemd
 
 SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source/${PN}_${PV}.tar.gz"
 
@@ -25,6 +25,8 @@  EXTRA_OECONF = " \
   --disable-linux-caps \
   --disable-pcre \
   --disable-sql \
+  --enable-systemd \
+  --with-systemdsystemunitdir=${base_libdir}/systemd/system \
 "
 
 do_configure_prepend() {
@@ -42,6 +44,14 @@  do_install_append() {
         install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN}
 }
 
+SYSTEMD_PACKAGES = "${PN}-systemd"
+SYSTEMD_SERVICE = "${PN}.service"
+
+PACKAGES =+ "${PN}-systemd"
+
+FILES_${PN}-systemd += "${base_libdir}/systemd"
+RDEPENDS_${PN}-systemd += "${PN}"
+
 FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
             ${sysconfdir} ${sharedstatedir} ${localstatedir} \
             ${base_bindir}/* ${base_sbindir}/* \
diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng_3.2.5.bb b/meta-oe/recipes-support/syslog-ng/syslog-ng_3.2.5.bb
index ff1e247..62faa83 100644
--- a/meta-oe/recipes-support/syslog-ng/syslog-ng_3.2.5.bb
+++ b/meta-oe/recipes-support/syslog-ng/syslog-ng_3.2.5.bb
@@ -1,5 +1,5 @@ 
 require syslog-ng.inc
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
 
 SRC_URI += " \
   file://syslog-ng.conf \