mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Debian package build fixes
This commit is contained in:
parent
8b96fbde5b
commit
2dc2bc5ce1
4
debian/control.in
vendored
4
debian/control.in
vendored
@ -1,6 +1,8 @@
|
||||
Source: clickhouse
|
||||
Priority: optional
|
||||
Maintainer: Alexey Milovidov <milovidov@yandex-team.ru>
|
||||
Build-Depends: debhelper (>= 5)
|
||||
Build-Depends: debhelper (>= 5), cmake, gcc-6, g++-6,
|
||||
libicu-dev, libreadline-dev, libmysqlclient-dev, unixodbc-dev,
|
||||
libglib2.0-dev, libltdl-dev, libssl-dev
|
||||
Standards-Version: 3.8.0
|
||||
Section: libs
|
||||
|
29
debian/rules
vendored
29
debian/rules
vendored
@ -4,11 +4,33 @@
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
ifndef THREADS_COUNT
|
||||
THREADS_COUNT=`grep -c ^processor /proc/cpuinfo`
|
||||
THREADS_COUNT=`nproc || grep -c ^processor /proc/cpuinfo`
|
||||
endif
|
||||
|
||||
BUILD_TARGETS=clickhouse $(DAEMONS)
|
||||
|
||||
DEB_GCC_VERSION ?= -6
|
||||
|
||||
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
|
||||
CC := gcc$(DEB_GCC_VERSION)
|
||||
CXX := g++$(DEB_GCC_VERSION)
|
||||
else
|
||||
CC := $(DEB_HOST_GNU_TYPE)-gcc$(DEB_GCC_VERSION)
|
||||
CXX := $(DEB_HOST_GNU_TYPE)-g++$(DEB_GCC_VERSION)
|
||||
endif
|
||||
|
||||
CMAKE_FLAGS ?= -DCMAKE_CXX_COMPILER=`which $(CXX)` -DCMAKE_C_COMPILER=`which $(CC)`
|
||||
|
||||
ifdef CMAKE_BUILD_TYPE
|
||||
CMAKE_FLAGS += -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)
|
||||
endif
|
||||
|
||||
ifdef USE_STATIC_LIBRARIES
|
||||
CMAKE_FLAGS += -DUSE_STATIC_LIBRARIES=$(USE_STATIC_LIBRARIES)
|
||||
endif
|
||||
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
rm -rf build
|
||||
@ -21,8 +43,9 @@ build: build-stamp
|
||||
build-stamp: configure-stamp
|
||||
dh_testdir
|
||||
# если не задан тип сборки запускаем cmake без указания типа, если задан - передаём его
|
||||
# для сборки в Debug нужно запустить так: debuild -e CMAKE_BUILD_TYPE=Debug
|
||||
cd build && pwd && if [ -z CMAKE_BUILD_TYPE ]; then cmake ..; else cmake -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) ..; fi
|
||||
# for building Debug run: debuild -e CMAKE_BUILD_TYPE=Debug
|
||||
# for building with shared libs run: debuild -e USE_STATIC_LIBRARIES=0
|
||||
cd build && pwd && cmake .. $(CMAKE_FLAGS)
|
||||
# TODO: возможно надо исправить
|
||||
# последовательно запускаем make для каждой из целей.
|
||||
# т.к. при параллельном запуске (make target1 target2) несколько раз одновременно создаются бинарники
|
||||
|
Loading…
Reference in New Issue
Block a user