From bd8c0231c52ac8a9a144d49e4b9e86243a121d3d Mon Sep 17 00:00:00 2001
From: "Dmitry E. Oboukhov" <unera@debian.org>
Date: Fri, 11 Apr 2014 17:47:55 +0400
Subject: [PATCH] debian: lua -> 1.6 feel free to stumble on.

---
 CMakeLists.txt                             |  2 --
 debian/control                             | 12 +++++++++++-
 debian/libtarantool-dev.install            |  1 +
 debian/rules                               |  3 +--
 debian/tarantool-modules.install           |  4 ++--
 debian/tarantool-mysql-module.install      |  2 +-
 debian/tarantool-postgresql-module.install |  2 +-
 7 files changed, 17 insertions(+), 9 deletions(-)
 create mode 100644 debian/libtarantool-dev.install

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 659f610e7f..085ca377ce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -152,9 +152,7 @@ include_directories("${PROJECT_SOURCE_DIR}")
 #
 # Specify Tarantool modules prefixes
 #
-if (NOT MODULE_SUFFIX)
 set(MODULE_SUFFIX "tarantool/${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
-endif()
 set(MODULE_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}/${MODULE_SUFFIX}")
 set(MODULE_LUADIR "${CMAKE_INSTALL_FULL_DATADIR}/${MODULE_SUFFIX}")
 set(MODULE_INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}/${MODULE_SUFFIX}")
diff --git a/debian/control b/debian/control
index ae8761fa79..484295e58b 100644
--- a/debian/control
+++ b/debian/control
@@ -36,7 +36,8 @@ Conflicts: tarantool-dbg (<< 1.5.2),
  tarantool-client-dbg (<< 1.6~),
  tarantool-plugins (<< 1.6~),
  tarantool-mysql-plugin (<< 1.6~),
- tarantool-postgresql-plugin (<< 1.6~)
+ tarantool-postgresql-plugin (<< 1.6~),
+ libtarantool-dev (<< 1.6~)
 Recommends: tarantool-common (>= 1.6),
  tarantool-modules
 Description: In-memory database with Lua application server
@@ -95,3 +96,12 @@ Description: Tarantool in-memory database - MySQL connector
  This package contains a connector to MySQL database for Tarantool
  Lua stored procedures.
 
+Package: libtarantool-dev
+Architecture: i386 amd64 kfreebsd-i386 kfreebsd-amd64 hurd-i386
+Priority: optional
+Section: libdevel
+Depends: ${shlibs:Depends}, ${misc:Depends},
+ tarantool (= ${binary:Version})
+Description: Tarantool in-memory database - development headers
+ Tarantool is an in-memory database and Lua application server.
+ This package provides server headers needed to build pluggable modules.
diff --git a/debian/libtarantool-dev.install b/debian/libtarantool-dev.install
new file mode 100644
index 0000000000..44cfcdf5f2
--- /dev/null
+++ b/debian/libtarantool-dev.install
@@ -0,0 +1 @@
+usr/include/tarantool
diff --git a/debian/rules b/debian/rules
index 0f024028f7..33c1c83d58 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,6 @@ UVERSION := $(shell echo $(VERSION)|sed 's/-[[:digit:]]\+$$//')
 DEB_CMAKE_EXTRA_FLAGS := \
 	-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
 	-DWITH_MYSQL=ON \
-	-DMODULE_SUFFIX=tarantool/lua \
 	-DWITH_POSTGRESQL=ON
 #         -DENABLE_CLIENT=true \
 
@@ -30,7 +29,7 @@ DEB_CMAKE_NORMAL_ARGS := -DCMAKE_INSTALL_PREFIX="$(DEB_CMAKE_INSTALL_PREFIX)" \
 #    -DCMAKE_C_COMPILER:FILEPATH="$(CC)" \
 #    -DCMAKE_CXX_COMPILER:FILEPATH="$(CXX)" \
 
-DEB_SHLIBDEPS_INCLUDE          := /usr/lib/tarantool/lua
+DEB_SHLIBDEPS_INCLUDE          := /usr/lib/tarantool/1.6
 DEB_INSTALL_DOCS_ALL 		:= -XTODO -XAUTHORS
 DEB_DH_STRIP_ARGS_tarantool	:= -X/usr/bin/tarantool
 
diff --git a/debian/tarantool-modules.install b/debian/tarantool-modules.install
index e969e64582..9cd0ac1fb0 100644
--- a/debian/tarantool-modules.install
+++ b/debian/tarantool-modules.install
@@ -1,2 +1,2 @@
-usr/share/tarantool/lua/box/net/sql.lua
-usr/lib/tarantool/lua/box/sophia.so
+usr/share/tarantool/1.6/box/net/sql.lua
+usr/lib/tarantool/1.6/box/sophia.so
diff --git a/debian/tarantool-mysql-module.install b/debian/tarantool-mysql-module.install
index 85584944ec..9e715df39b 100644
--- a/debian/tarantool-mysql-module.install
+++ b/debian/tarantool-mysql-module.install
@@ -1,2 +1,2 @@
-usr/lib/tarantool/lua/box/net/mysql.so
+usr/lib/tarantool/1.6/box/net/mysql.so
 
diff --git a/debian/tarantool-postgresql-module.install b/debian/tarantool-postgresql-module.install
index 8bd9fe8fec..253c7ec7ec 100644
--- a/debian/tarantool-postgresql-module.install
+++ b/debian/tarantool-postgresql-module.install
@@ -1 +1 @@
-usr/lib/tarantool/lua/box/net/pg.so
+usr/lib/tarantool/1.6/box/net/pg.so
-- 
GitLab