1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
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)
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
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::
|