summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 49c20d675972c3c06c5020bee2872e835688bd1c (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
# Maintainer: Dominic Meiser <aur@msrd0.de>

pkgbase=cpptoml
pkgname=(cpptoml cpptoml-doc)
pkgver=0.1.1
pkgrel=1
pkgdesc="A header-only library for parsing TOML configuration files."
arch=('any')
url="https://github.com/skystrife/cpptoml"
license=('MIT')
makedepends=('cmake' 'doxygen' 'git' 'graphviz' 'texlive-core')
source=("https://github.com/skystrife/cpptoml/archive/v$pkgver.tar.gz")
sha256sums=('23af72468cfd4040984d46a0dd2a609538579c78ddc429d6b8fd7a10a6e24403')

prepare()
{
  mkdir -p "$srcdir/build"
}

build()
{
  cd "$srcdir/build"

  cmake "$srcdir/cpptoml-$pkgver" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr
  
  make
  make doc
}

package_cpptoml()
{
  cd "$srcdir/build"

  make DESTDIR="$pkgdir" install

  install -Dm644 "$srcdir/cpptoml-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

package_cpptoml-doc()
{
  cd "$srcdir/build/doc/html/"
  find . -type f -exec install -Dm644 '{}' "$pkgdir/usr/share/doc/cpptoml/{}" ';'
  install -Dm644 "$srcdir/cpptoml-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}