summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 92bc5596642a04edc8a49480c1b52b5ded3033e6 (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: David Hill <davidph55@verizon.net>

pkgname=mingw-w64-gdcc
pkgver=0.16.1
pkgrel=1
pkgdesc="Game Data Compiler Collection (mingw-w64)"
arch=(any)
url="http://github.com/DavidPH/GDCC"
license=('GPL2')
depends=('mingw-w64-gmp')
makedepends=('git' 'cmake' 'mingw-w64-cmake')
options=('!strip' '!buildflags' '!staticlibs')
source=("${pkgname}"::git+https://github.com/DavidPH/GDCC.git#tag=v"${pkgver}")
sha256sums=('SKIP')

_arches="i686-w64-mingw32 x86_64-w64-mingw32"

build()
{
   for _arch in ${_arches}
   do
      mkdir -p build-"${_arch}" && pushd build-"${_arch}"

      "${_arch}"-cmake ../"${pkgname}"

      make

      popd
   done
}

package()
{
   for _arch in ${_arches}
   do
      pushd build-"${_arch}"
      make PREFIX=/usr DESTDIR="${pkgdir}" install
      "${_arch}"-strip -g "${pkgdir}"/usr/"${_arch}"/lib/*.a
      "${_arch}"-strip --strip-unneeded "${pkgdir}"/usr/"${_arch}"/bin/*.dll
      "${_arch}"-strip --strip-unneeded "${pkgdir}"/usr/"${_arch}"/bin/*.exe
      popd
   done
}

# EOF