summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fd322ea74f73763e95a5ceb9fd0263f6545a0bad (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
pkgname=mingw-w64-cli11
_pkgname=CLI11
pkgver=2.2.0
pkgrel=1
pkgdesc='Command line parser for C++11 (mingw-w64)'
arch=('any')
url='https://github.com/CLIUtils/CLI11'
license=('CUSTOM')
depends=('mingw-w64-crt')
makedepends=('mingw-w64-cmake')
options=('!buildflags' '!strip' 'staticlibs')
source=("https://github.com/CLIUtils/CLI11/archive/v${pkgver}.zip")
sha256sums=('1cb6906a2a9c8136cd6da547dc01c6cb348d787138199b2c40025a1fc9f5d81e')

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

build() {
  cd "${_pkgname}-${pkgver}"
  for _arch in ${_architectures}; do
    mkdir -p build-${_arch} && pushd build-${_arch}
    ${_arch}-cmake \
      -DCMAKE_BUILD_TYPE=Release \
      -DCLI11_BUILD_TESTS=OFF \
      -DCLI11_BUILD_EXAMPLES=OFF \
      ..
    make
    popd
  done
}

package() {
  for _arch in ${_architectures}; do
    cd "${srcdir}/${_pkgname}-${pkgver}/build-${_arch}"
    make install DESTDIR="${pkgdir}"
  done 
}