From: Emmanuel Lacour Date: Wed, 18 Apr 2012 09:26:52 +0000 (+0200) Subject: Use mysql_config to find proper libs for multi-arch mysql (closes: #649938) X-Git-Tag: 1.5-3~8 X-Git-Url: http://git.home-dn.net/?p=manu%2Flibnss-mysql-bg.git;a=commitdiff_plain;h=9895664b909eb089f2e01a7eeffd0bce0e0d747b Use mysql_config to find proper libs for multi-arch mysql (closes: #649938) --- diff --git a/debian/control b/debian/control index 6fd5792..5458f69 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: libnss-mysql-bg Section: admin Priority: optional Maintainer: Emmanuel Lacour -Build-Depends: debhelper (>= 7.0.50~), libmysqlclient15-dev, quilt (>= 0.40), autotools-dev +Build-Depends: debhelper (>= 7.0.50~), libmysqlclient15-dev, quilt (>= 0.40), autotools-dev, dh-autoreconf Standards-Version: 3.9.3 Package: libnss-mysql-bg diff --git a/debian/patches/05_fix_acinclude b/debian/patches/05_fix_acinclude new file mode 100644 index 0000000..357314b --- /dev/null +++ b/debian/patches/05_fix_acinclude @@ -0,0 +1,32 @@ +Index: libnss-mysql-bg-1.5/acinclude.m4 +=================================================================== +--- libnss-mysql-bg-1.5.orig/acinclude.m4 2012-04-18 10:20:01.205313859 +0200 ++++ libnss-mysql-bg-1.5/acinclude.m4 2012-04-18 11:18:19.681344131 +0200 +@@ -50,6 +50,7 @@ + fi + + AC_MSG_CHECKING([for MySQL libraries]) ++ + dnl Check for share first, then static, such that static + dnl will take precedence + for f in $baselist; do +@@ -80,6 +81,19 @@ + fi + done + ++dnl Get dir from mysql_config (for multi-arch libs) ++MYSQL_CONFIG=`which mysql_config` ++if test -n "$MYSQL_CONFIG" -a -x "$MYSQL_CONFIG" ++then ++ MYSQL_LIB_DIR=`$MYSQL_CONFIG --variable=pkglibdir` ++dnl Old versions of mysql_config does not have "--variable" option ++ if test $? -ne 0 ++ then ++ MYSQL_LIB_DIR=`mysql_config --libs | sed 's/^.*-L\([^ ]\+\).*$/\1/'` ++ fi ++fi ++ ++ + if test -n "$MYSQL_LIB_DIR" + then + AC_MSG_RESULT([$MYSQL_LIB_DIR]) diff --git a/debian/patches/series b/debian/patches/series index 41e5de9..923f9e5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 01_mkinstalldirs.diff 03_config.diff 04_shadow.diff +05_fix_acinclude diff --git a/debian/rules b/debian/rules index 2e20033..16c84bf 100755 --- a/debian/rules +++ b/debian/rules @@ -10,7 +10,7 @@ #export DH_VERBOSE=1 %: - dh $@ --with quilt,autotools-dev + dh $@ --with quilt,autotools-dev,autoreconf override_dh_install: dh_install