debian swirl logo

Back to the packages list tarantool

#!/usr/bin/make -f

#DPKG_EXPORT_BUILDFLAGS = 1
#include /usr/share/dpkg/buildflags.mk

VERSION  := $(shell dpkg-parsechangelog|grep ^Version|awk '{print $$2}')
UVERSION := $(shell echo $(VERSION)|sed 's/-[[:digit:]]\+$$//')

DEB_CMAKE_EXTRA_FLAGS := \
		-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
		-DENABLE_CLIENT=true

DEB_DH_INSTALLINIT_ARGS := --name=tarantool

DEB_CMAKE_INSTALL_PREFIX := /usr
DEB_CMAKE_NORMAL_ARGS := -DCMAKE_INSTALL_PREFIX="$(DEB_CMAKE_INSTALL_PREFIX)" \
    -DCMAKE_SKIP_RPATH=ON \
    -DCMAKE_VERBOSE_MAKEFILE=ON \
    -DCMAKE_SYSCONF_DIR=/etc/tarantool \
    -DCMAKE_LOCALSTATE_DIR=/var
#     -DCMAKE_C_FLAGS="$(CFLAGS)" \
#     -DCMAKE_LD_FLAGS="$(LDFLAGS)" \
#     -DENABLE_STATIC=ON
#     -DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \
#     -DCMAKE_CPP_FLAGS="$(CPPFLAGS)" \
#    -DCMAKE_C_COMPILER:FILEPATH="$(CC)" \
#    -DCMAKE_CXX_COMPILER:FILEPATH="$(CXX)" \

DEB_SHLIBDEPS_INCLUDE 		:= /usr/lib/tarantool/plugins
DEB_INSTALL_DOCS_ALL 		:= -XTODO -XAUTHORS
DEB_DH_STRIP_ARGS_tarantool	:= -X/usr/bin/tarantool_box

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk

DEB_BUILDDIR := build-area

tarball: clean
		git describe > VERSION
	cd .. && tar --exclude= .git --exclude=debian 		\
			--exclude=rfc4627.txt				\
			--exclude=doc/www-data/ycsb			\
			-czf tarantool_$(UVERSION).orig.tar.gz tarantool-$(UVERSION)

clean::
		find -type f -name \*.pyc -delete
		find -type d -name CMakeFiles -exec rm -fr '{}' +
		rm -f CMakeCache.txt
		rm -f CPackConfig.cmake
		rm -f CPackSourceConfig.cmake
		rm -f include/tarantool/config.h
		rm -f doc/tnt.ent
		rm -f www-data.in/download

# install/tarantool-dbg::
#         rm -fr debian/tarantool-dbg/usr/share/doc/tarantool-dbg

install/tarantool::
		pod2man -c 'tarantar' \
			debian/tarantar.pod > build-area/tarantar.1
#         make -C build-area test-force || /bin/true


install/tarantool-common::
		pod2man -c 'tarantool instances control' \
		    debian/tarantool_instance.pod > build-area/tarantool_instance.1
		pod2man -c 'tarantool log rotation' \
		    debian/scripts/tarantool_logrotate \
		    	 > build-area/tarantool_logrotate.1
		pod2man -c 'snapshot rotate' \
		    debian/scripts/tarantool_snapshot_rotate \
		    	> build-area/tarantool_snapshot_rotate.1
		install -m0755 extra/logger.pl \
		    debian/tarantool-common/usr/lib/tarantool/logger

Builds:

libtarantool-dev
tarantool in-memory database - development headers
tarantool-client-dbg
tarantool in-memory database - client debugging symbols
tarantool-client
tarantool in-memory database - command line client
tarantool-common
tarantool in-memory database - common files
tarantool
in-memory database with lua application server
tarantool-mysql-plugin
tarantool in-memory database - mysql connector
tarantool-plugins
tarantool in-memory database - all plug-ins bundle
tarantool-postgresql-plugin
tarantool in-memory database - postgresql connector