Enable lua
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Wed, 27 Feb 2013 11:21:09 +0000 (13:21 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Wed, 11 Jun 2014 14:48:02 +0000 (17:48 +0300)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
configure.ac
debian/control
debian/rules
packaging/librpm-tizen.spec

index 8e902f19130edb4dc2dac163253e742a5773231a..89c54e405dfbbc0db83b9942f6d92d952e0cb0b0 100644 (file)
@@ -793,9 +793,12 @@ AC_ARG_WITH([lua], [AS_HELP_STRING([--with-lua], [build with lua support])],
             [],
             [with_lua=yes])
 
+if test X"$LUA_PKGCONFIG_NAME" = X ; then
+    LUA_PKGCONFIG_NAME=lua
+fi
 AS_IF([test "$with_lua" != no],[
   PKG_CHECK_MODULES([LUA],
-    [lua >= 5.1],
+    [${LUA_PKGCONFIG_NAME} >= 5.1],
     [AC_DEFINE(WITH_LUA, 1, [Build with lua support?])],
     [AC_MSG_ERROR([lua not present (--without-lua to disable)])])
   AC_SUBST(LUA_CFLAGS)
index 300fef5603eb91d402ac0786aa4b0de9a9880435..a3a31bc4cc612de003a416f63ff9c05814896655 100644 (file)
@@ -22,7 +22,8 @@ Build-Depends: debhelper,
                libmagic-dev,
                libelf-dev,
                libdw-dev,
-               libdb-dev
+               libdb-dev,
+               liblua5.1-dev
 Maintainer: Markus Lehtonen <markus.lehtonen@linux.intel.com>
 Standards-Version: 3.9.3
 Homepage: http://rpm.org/
index 30870a74f92037d0bc880357e4a1d7aa7f4fca25..5949630184a946c64379191ca5bf02f24bdb3181 100755 (executable)
@@ -10,7 +10,7 @@ CPPFLAGS += $(shell pkg-config --cflags nss)
 override_dh_auto_configure:
        dh_auto_configure -- --disable-dependency-tracking \
                        --libdir=/usr/lib/librpm-tizen \
-                       --without-lua \
+                       --with-lua \
                        --without-acl \
                        --without-cap \
                        --enable-shared \
@@ -18,6 +18,7 @@ override_dh_auto_configure:
                        --with-external-db \
                        --build=${DEB_BUILD_GNU_CPU}-tizen-linux \
                        PYTHON_MODULENAME=$(python_mod_name) \
+                       LUA_PKGCONFIG_NAME=lua5.1 \
                        CPPFLAGS="$(CPPFLAGS)"
 
 override_dh_auto_install:
index 021333d8653779b4088e6673dbe49fe7a7940480..daf31b8fb6bb3de8fe3ad5eed03cd86813d6f0ec 100644 (file)
@@ -16,6 +16,11 @@ BuildRequires:  gcc
 BuildRequires:  glibc-devel
 BuildRequires:  gzip
 BuildRequires:  libtool
+%if 0%{?suse_version}
+BuildRequires:  pkgconfig(lua) < 5.2
+%else
+BuildRequires:  lua-devel
+%endif
 BuildRequires:  make
 BuildRequires:  patch
 %if 0%{?fedora} || 0%{?centos_version}
@@ -100,7 +105,7 @@ autoreconf -i -f
 %configure \
     --libdir=%{_libdir}/%{name} \
     --disable-dependency-tracking \
-    --without-lua \
+    --with-lua \
     --without-acl \
     --without-cap \
     --enable-shared \