#!/usr/bin/make -f INIT_VARIANT ?= systemd VERSION := $(shell dpkg-parsechangelog|grep ^Version|awk '{print $$2}') UVERSION := $(shell echo $(VERSION)|sed 's/-[[:digit:]]\+$$//') ifeq ($(INIT_VARIANT),systemd) WITH_SYSTEMD:=ON export deb_systemdsystemunitdir = $(shell pkgconf --variable=systemdsystemunitdir systemd) export deb_systemdsystemgeneratordir = $(shell pkgconf --variable=systemdsystemgeneratordir systemd) else WITH_SYSTEMD:=OFF endif DEB_CMAKE_EXTRA_FLAGS := \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \ -DCMAKE_INSTALL_SYSCONFDIR=/etc \ -DCMAKE_INSTALL_LOCALSTATEDIR=/var \ -DENABLE_DIST=ON \ -DENABLE_BUNDLED_LIBCURL=OFF \ -DENABLE_BUNDLED_LIBYAML=OFF \ -DENABLE_BUNDLED_ZSTD=OFF \ -DWITH_SYSVINIT=ON \ -DWITH_SYSTEMD=$(WITH_SYSTEMD) # Install tarantool.service within tarantool-common package, but does not # install it within tarantool and tarantool-dev packages. DEB_DH_INSTALLINIT_ARGS := --name=tarantool DEB_DH_SYSTEMD_ENABLE_ARGS_tarantool := --name=tarantool DEB_DH_SYSTEMD_ENABLE_ARGS_tarantool-common := --name=tarantool DEB_DH_SYSTEMD_START_ARGS_tarantool-common := --no-restart-on-upgrade tarantool.service # Needed for proper backtraces in fiber.info() DEB_DH_STRIP_ARGS := -X/usr/bin/tarantool export DEB_BUILD_MAINT_OPTIONS = hardening=-stackprotector,-pie DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/cmake.mk debian/tarantool-common.install: ifeq ($(INIT_VARIANT),systemd) cp -p debian/tarantool-common.install.systemd.in $@ else cp -p debian/tarantool-common.install.sysvinit.in $@ endif build-indep: debian/tarantool-common.install tarball: clean git describe --long --always > VERSION tar --exclude=.git --exclude=debian \ --exclude='*.dll' --exclude='*.exe' \ --exclude=doc/www \ --exclude=doc/sphinx \ --exclude=src/lib/small/debian \ --exclude=src/lib/msgpuck/debian \ --exclude=test-run/lib/tarantool-python/debian \ --exclude=third_party/luafun/debian \ --exclude=FreeBSD \ --transform='s,^\.,tarantool_$(UVERSION),S' \ -czf ../tarantool_$(UVERSION).orig.tar.gz . 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 src/trivia/config.h install/tarantool::