-
Notifications
You must be signed in to change notification settings - Fork 377
/
rules
executable file
·69 lines (56 loc) · 2.11 KB
/
rules
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
#!/usr/bin/make -f
VERSION := $(shell dpkg-parsechangelog|grep ^Version|awk '{print $$2}')
UVERSION := $(shell echo $(VERSION)|sed 's/-[[:digit:]]\+$$//')
ifneq ($(wildcard /usr/bin/dh_systemd_start),)
WITH_SYSTEMD:=ON
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 \
-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 tarantool.service
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:
ifneq ($(wildcard /usr/bin/dh_systemd_start),)
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=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::