summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1472bdc6f5373d3221dd93c9f6d45412d8cf2d02 (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
pkgname=mingw-w64-rapidyaml
pkgver=0.4.1
pkgrel=1
pkgdesc='A library to parse and emit YAML, and do it fast (mingw-w64)'
depends=('mingw-w64-crt')
makedepends=('mingw-w64-cmake')
options=('!buildflags' '!strip' 'staticlibs')
arch=('any')
url='https://github.com/biojppm/rapidyaml'
license=('MIT')
source=("git+https://github.com/biojppm/rapidyaml.git#tag=v${pkgver}")
sha256sums=('SKIP')

_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

prepare () {
  cd "$srcdir"/rapidyaml
  git submodule update --force --init --recursive
}

build() {
  cd "$srcdir"/rapidyaml
  for _arch in ${_architectures}; do
    mkdir -p build-${_arch} && pushd build-${_arch}
    ${_arch}-cmake ..
    make
    popd
  done
}

package() {
  for _arch in ${_architectures}; do
    cd "$srcdir"/rapidyaml/build-${_arch}
    make install DESTDIR="${pkgdir}"
    ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
    ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
  done
}