[PATCH 0/2] Various stuff for easier packaging
Two patches will follow, that make it slightly easier to package syslog-ng and to build external modules against it. The first will change the SONAME of libsyslog-ng, from libsyslog-ng.so.0 to libsyslog-ng-${VERSION} (as of this writing, this would be libsyslog-ng-3.3.0beta2.so). The rationale behind this, is that at the moment, there are no guarantees that either ABI or API will be preserved between versions, so it's easier and more straightforward to tie the library to a particular syslog-ng version instead. The other patch adds moduledir to the pkg-config file, so that external modules can easily figure out where to install themselves, without resorting to guessing and parsing syslog-ng --help output (where syslog-ng might not even be available in the build chroot..).
Use the -release flag of libtool to put the syslog-ng version into the SONAME. Signed-off-by: Gergely Nagy <algernon@balabit.hu> --- lib/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 6527bc8..8c8334d 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -9,7 +9,7 @@ export top_srcdir lib_LTLIBRARIES = libsyslog-ng.la libsyslog_ng_la_LIBADD = @CORE_DEPS_LIBS@ -libsyslog_ng_la_LDFLAGS = -no-undefined +libsyslog_ng_la_LDFLAGS = -no-undefined -release @VERSION@ module_LTLIBRARIES = libsyslog-ng-crypto.la libsyslog_ng_crypto_la_LIBADD = @CORE_DEPS_LIBS@ libsyslog-ng.la -- 1.7.5.4
To ease external module development, include the expanded moduledir in the pkg-config file. It can be retrieved with pkg-config --variable moduledir. Signed-off-by: Gergely Nagy <algernon@balabit.hu> --- configure.in | 2 ++ syslog-ng.pc.in | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/configure.in b/configure.in index 3445a55..13ff6bf 100644 --- a/configure.in +++ b/configure.in @@ -1057,11 +1057,13 @@ AM_CONDITIONAL(ENABLE_JSON, [test "$enable_json" = "yes"]) # substitution into manual pages expanded_sysconfdir=[`patheval $sysconfdir | sed -e 's/-/\\\\-/g'`] +expanded_moduledir=[`patheval $moduledir`] AC_SUBST(timezonedir) AC_SUBST(pidfiledir) AC_SUBST(moduledir) AC_SUBST(expanded_sysconfdir) +AC_SUBST(expanded_moduledir) AC_SUBST(systemdsystemunitdir) AC_SUBST(SYSLOGNG_LINK) AC_SUBST(SYSLOGNG_DEPS_LIBS) diff --git a/syslog-ng.pc.in b/syslog-ng.pc.in index 0df6e64..5b2c1c6 100644 --- a/syslog-ng.pc.in +++ b/syslog-ng.pc.in @@ -4,6 +4,7 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ toolsdir=@datadir@/tools +moduledir=@expanded_moduledir@ Name: syslog-ng-dev Description: Dev package for syslog-ng module -- 1.7.5.4
On Mon, 2011-08-29 at 21:17 +0200, Gergely Nagy wrote:
Two patches will follow, that make it slightly easier to package syslog-ng and to build external modules against it.
The first will change the SONAME of libsyslog-ng, from libsyslog-ng.so.0 to libsyslog-ng-${VERSION} (as of this writing, this would be libsyslog-ng-3.3.0beta2.so). The rationale behind this, is that at the moment, there are no guarantees that either ABI or API will be preserved between versions, so it's easier and more straightforward to tie the library to a particular syslog-ng version instead.
The other patch adds moduledir to the pkg-config file, so that external modules can easily figure out where to install themselves, without resorting to guessing and parsing syslog-ng --help output (where syslog-ng might not even be available in the build chroot..).
thanks, applied both to 3.3 NOTE to distribution maintainers: this will probably trigger changes in the packaging too. -- Bazsi
participants (2)
-
Balazs Scheidler
-
Gergely Nagy