aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6fa40881b9377ebe468ad37c7c38b4e39895e165 (plain)
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
76
77
78
79
# Maintainer: Alex Kashirin <kashirin.alex@gmail.com>

_group_name="swcdb"
_sub_name="lib-fs-hadoop-jvm"

pkgname=${_group_name}-${_sub_name}
pkgver=0.5.12
pkgrel=1
pkgdesc="The SWC-DB FileSystem Hadoop-JVM library"
arch=("x86_64")

groups=($_group_name)
provides=(
  libswcdb_fs_hadoop_jvm.so
)

url="https://www.swcdb.org"
license=('GPLv3')


depends=(
  'swcdb-lib-fs'
  'jre-openjdk'
)
makedepends=(
  'git'
  'cmake'
  'make'
  'gcc'
  'swcdb-lib-fs'
  'jdk-openjdk'
  'which'
  'hadoop=3.3.0-1'
)

optdepends=(
  'hadoop=3.3.0-1'
)

conflicts=()
replaces=()
backup=()
options=()
install=README.md
changelog=


source=(
  $pkgname-$pkgver-source::git+https://github.com/kashirin-alex/swc-db.git#tag=v$pkgver
)
sha256sums=('SKIP')


build() {

  mkdir -p $pkgname-$pkgver-build;
  cd $pkgname-$pkgver-build;

  _java_path=`readlink $(which java)`;
  _java_path=`dirname  ${_java_path}`;
  _java_path=`realpath ${_java_path}/../`;

  _hadoop_path=`JAVA_HOME=${_java_path} hadoop envvars | grep HADOOP_COMMON_HOME`;

  cmake ../$pkgname-$pkgver-source \
    -DO_LEVEL=3 -DSWC_BUILD_PKG=${_sub_name} \
    -D${_hadoop_path} \
    -DJAVA_INSTALL_PATH=${_java_path} \
    -DCMAKE_SKIP_RPATH=ON -DCMAKE_INSTALL_PREFIX=$pkgdir/usr \
    -DCMAKE_BUILD_TYPE=Release;

  make -j$((`grep -c processor < /proc/cpuinfo || echo 1`));
}


package() {
  cd $pkgname-$pkgver-build;
  make install;
}