summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 089c8e0e95068dcaf3e5bd9d8aa611c3c1ad0173 (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
# Maintainer: dobragab <dobragab@gmail.com>

pkgname=('ccsh-git' 'ccsh-compiler-git' 'ccsh-wrappers-core-git')
groups=('ccsh-git')
pkgver=r154.7c8b4cd
pkgrel=1
pkgdesc='C++ shell'
arch=('any')
url='https://github.com/cpp-ftw/ccsh'
license=('GPL3')
makedepends=('git' 'cmake' 'make')
optdepends=('pkg-config: specify compilation flags easier')
source=("git+https://github.com/cpp-ftw/ccsh.git")
md5sums=(SKIP)

pkgver() {
  cd "ccsh"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "ccsh"

  cmake . -DWITH_LIB=ON -DWITH_COMPILER=ON -DWITH_SAMPLE=OFF -DWITH_TEST=OFF -DWITH_CLING=OFF
  make
}

package_ccsh-git() {

  install -Dm644 "$srcdir/ccsh/lib/libccsh_lib.so" "$pkgdir/usr/lib/libccsh_lib.so"

  install -dm755 "$pkgdir/usr/include/ccsh"
  install -Dm644 $srcdir/ccsh/include/ccsh/*.hpp "$pkgdir/usr/include/ccsh"

  install -dm755 "$pkgdir/usr/include/ccsh/builtins"
  install -Dm644 $srcdir/ccsh/include/ccsh/builtins/*.hpp "$pkgdir/usr/include/ccsh/builtins"

  install -dm755 "$pkgdir/usr/lib/pkgconfig"
  install -Dm644 $srcdir/ccsh/ccsh.pc "$pkgdir/usr/lib/pkgconfig"
}

package_ccsh-compiler-git() {
  depends=('ccsh-git')

  install -Dm755 "$srcdir/ccsh/cc/ccshc" "$pkgdir/usr/bin/ccshc"
}

package_ccsh-wrappers-core-git() {
  depends=('ccsh-git')

  install -Dm644 "$srcdir/ccsh/wrappers/ccsh/core.hpp" "$pkgdir/usr/include/ccsh/core.hpp"
  install -dm755 "$pkgdir/usr/include/ccsh/core"
  install -Dm644 $srcdir/ccsh/wrappers/ccsh/core/* "$pkgdir/usr/include/ccsh/core"
}