Skip to content

Instantly share code, notes, and snippets.

@Algunenano
Created August 4, 2017 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Algunenano/2a99b898455140c530ab82c23caee23d to your computer and use it in GitHub Desktop.
Save Algunenano/2a99b898455140c530ab82c23caee23d to your computer and use it in GitHub Desktop.
From d7f6f8f28ce478f03d605f1b5f932523a496f97b Mon Sep 17 00:00:00 2001
From: Raul Marin <rmrodriguez@cartodb.com>
Date: Fri, 4 Aug 2017 13:03:37 +0200
Subject: [PATCH] Use testing release for gcc7 and system libraries
- Using testing release to be compatible with gcc-7.1.
- Use system libraries when posible.
- Include the dynamic library symlinks in the package
---
PKGBUILD | 65 +++++++++++++++++++++++++++++++++++++---------------------------
1 file changed, 38 insertions(+), 27 deletions(-)
diff --git a/PKGBUILD b/PKGBUILD
index 3c24e39..5319b23 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,49 +1,55 @@
# $Id: $
# Maintainer: Dmitry Bilunov <kmeaw@yandex-team.ru>
-
-# If you have issues with gcc63, build a split package:
-# sudo pacman -S devtools
-# CHROOT=/tmp/chroot
-# mkdir $CHROOT
-# sudo mount /tmp -o remount,suid
-# mkarchroot $CHROOT/root base-devel
-# git clone https://aur.archlinux.org/gcc63.git
-# cd gcc63
-# makechrootpkg -c -r $CHROOT
-# sudo pacman -U gcc63-6.3.1-5-x86_64.pkg.tar.xz
-# This would consume 8.5G of tmp space. Use /var/tmp instead
-# of /tmp if you have less than 16G of RAM.
-
pkgname=clickhouse
-pkgver=1.1.54245
+pkgver=1.1.54267
+_pkgver_full="v$pkgver-testing"
pkgrel=1
pkgdesc='An open-source column-oriented database management system that allows generating analytical data reports in real time'
arch=('i686' 'x86_64')
url='https://clickhouse.yandex/'
license=('Apache')
-depends=('ncurses' 'readline' 'unixodbc' 'termcap')
-makedepends=('poco' 'cmake' 'gcc63')
-source=(https://github.com/yandex/ClickHouse/archive/v$pkgver-stable.tar.gz
+depends=('ncurses' 'readline' 'unixodbc' 'boost-libs' 'termcap' 'poco' 'libmariadbclient' 'zstd' 'lz4' 'double-conversion' 're2' 'gperftools')
+makedepends=('cmake' 'git' 'sparsehash')
+conflicts=('clickhouse')
+source=("git+https://github.com/yandex/ClickHouse.git#tag=$pkgver_full"
clickhouse-server.service
re2-length.patch)
-md5sums=('9d19d2ec452688186f3ca49a7f7bdc10'
- 'f9f5663b0a9a58e99f481efe9d193e85'
- '143f0146c3ef3a6832191fba352b70c4')
+sha256sums=('SKIP'
+ '497b1113522a25399b891373dd434b55c6537a0417b0083ef404cff5307e8381'
+ 'b6ad77d9fa278c3b53803ccc11443aab5920187ea1e6bc25327758da01666c49')
backup=('etc/clickhouse-client/config.xml' 'etc/clickhouse-server/config.xml' 'etc/clickhouse-server/users.xml')
install=$pkgname.install
build() {
- cd ClickHouse-$pkgver-stable
+ cd "ClickHouse/"
sed -e 's/mysqlxx common\(.*\) \(\${Z_LIB}\)/mysqlxx \2 common\1/' -i libs/libmysqlxx/CMakeLists.txt
+
patch -p1 < ../re2-length.patch
- export CC=gcc-6.3
- export CXX=g++-6.3
- cmake -D CMAKE_BUILD_TYPE:STRING=Release -D USE_STATIC_LIBRARIES:BOOL=False -D ENABLE_TESTS:BOOL=False -D UNBUNDLED:BOOL=False .
+
+ # Native dependencies that are not ready:
+ #-D USE_INTERNAL_UNWIND_LIBRARY:BOOL=False \
+ #-D USE_INTERNAL_ZOOKEEPER_LIBRARY:BOOL=False \
+ #-D USE_INTERNAL_CCTZ_LIBRARY:BOOL=False
+ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ -D CMAKE_BUILD_TYPE:STRING=Release \
+ -D USE_STATIC_LIBRARIES:BOOL=False \
+ -D USE_INTERNAL_POCO_LIBRARY:BOOL=False \
+ -D USE_INTERNAL_BOOST_LIBRARY:BOOL=False \
+ -D USE_INTERNAL_ZLIB_LIBRARY:BOOL=False \
+ -D USE_INTERNAL_ZSTD_LIBRARY:BOOL=False \
+ -D USE_INTERNAL_LZ4_LIBRARY:BOOL=False \
+ -D USE_INTERNAL_SPARCEHASH_LIBRARY:BOOL=False \
+ -D USE_INTERNAL_DOUBLE_CONVERSION_LIBRARY:BOOL=False \
+ -D USE_INTERNAL_RE2_LIBRARY:BOOL=False \
+ -D USE_INTERNAL_GPERFTOOLS_LIBRARY:BOOL=False \
+ -D ENABLE_TESTS:BOOL=False \
+ -D UNBUNDLED:BOOL=False \
+ .
make clickhouse
}
package() {
- cd ClickHouse-$pkgver-stable
+ cd "ClickHouse/"
mkdir -p $pkgdir/etc/clickhouse-server/ $pkgdir/etc/clickhouse-client/
mkdir -p $pkgdir/usr/bin/
mkdir -p $pkgdir/usr/lib/systemd/system
@@ -51,7 +57,12 @@ package() {
cp dbms/src/Server/config.xml dbms/src/Server/users.xml $pkgdir/etc/clickhouse-server/
cp dbms/src/Server/clickhouse $pkgdir/usr/bin/clickhouse-client
cp dbms/src/Server/clickhouse-client.xml $pkgdir/etc/clickhouse-client/config.xml
- cp dbms/libclickhouse.so.1 $pkgdir/usr/lib/libclickhouse.so.$pkgver
+
+ for file in $(find "dbms/" -iname 'libclickhouse.so*');
+ do
+ cp -P "$file" "$pkgdir/usr/lib/$(basename $file)"
+ done
+
sed -e 's:/opt/clickhouse:/var/lib/clickhouse:g' -i $pkgdir/etc/clickhouse-server/config.xml
sed -e '/listen_host/s%::<%::1<%' -i $pkgdir/etc/clickhouse-server/config.xml
cp $startdir/clickhouse-server.service $pkgdir/usr/lib/systemd/system
--
2.13.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment