summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cee8aa4de662f93838ca52b4565effaab482a9d5 (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
# Maintainer: Kuldeep Singh Dhaka <kuldeep@madresistor.com>

pkgname=libreplot-git
_pkgname=libreplot
pkgver=44.6c872be
pkgrel=1
pkgdesc="Data Visualizing using GPU via OpenGL3+ (or GLES2+), written in C"
arch=('i686' 'x86_64')
url="https://www.madresistor.com/box0"
license=('GPL')
provides=(libreplot)
conflicts=(libreplot)
replaces=(libreplot)
source=("git+https://gitlab.com/madresistor/$_pkgname.git")
# TODO: Find a way in which we can tell that
#  we need atleast one of ('libepoxy''libgl' 'libgles').
#  libepoxy being the most preffered and libgles the least
depends=('libepoxy' 'fontconfig' 'freetype2' 'harfbuzz' 'libpng')
makedepends=('cmake' 'git')
md5sums=('SKIP')


pkgver() {
  cd "$srcdir/$_pkgname"
  echo "$(git rev-list --count HEAD).$(git describe --always )"
}

prepare() {
  cd "$srcdir/$_pkgname"
  if [[ -d build ]]; then
    rm -rf build
  fi
  mkdir build
}

build() {
  cd "$srcdir/$_pkgname/build"
  # We are not building demo examples as they will not be installed
  cmake \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DCMAKE_INSTALL_LIBDIR='lib' \
    -DBUILD_DEMO=NO \
    -DBUILD_SHARED_LIBS='TRUE' ..
  make
}

package() {
  make -C "$srcdir/$_pkgname/build" DESTDIR="${pkgdir}" install
}