summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e25f644cdf5b25a9436f830ab55f5f8909b8e656 (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
# Maintainer: Ed Branch <brance carp at mail dot utexas dot edu nofish>
pkgbase=libvariant
pkgname=libvariant
pkgver=1.0.1
pkgrel=2
pkgdesc="A C++ dynamically typed composable object library with de/serializers"
arch=('i686' 'x86_64')
url="https://bitbucket.org/gallen/libvariant"
license=('GPL')
depends=('libxml2' 'libyaml' 'curl')
makedepends=('cmake')
source=("${pkgname}-${pkgver}.tar.bz2::https://bitbucket.org/gallen/${pkgname}/get/${pkgver}.tar.bz2")
sha256sums=('004789d04a728f36065ca80ba166d0d897158b4164f2b8e3def0916f8bf509f7')

prepare() {
  local extractdir="$(dirname $(tar -f ${pkgname}-${pkgver}.tar.bz2 --list | head -n1))"
  mv "${extractdir}" "${pkgname}-${pkgver}"
  mkdir -p "${pkgname}-${pkgver}/build"
}

build() {
  cd "${pkgname}-${pkgver}/build"
  cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr \
      -DCMAKE_BUILD_TYPE=Release -DLIBVARIANT_BUILD_EXAMPLES=off ..
  make
}

package() {
  cd "${pkgname}-${pkgver}/build"
  make DESTDIR="$pkgdir/" install
}

check() {
  cd "${pkgname}-${pkgver}/build"
  make test
}