summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: be1341a903b0be4f1abed8531ca7f5632011af9f (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
# Maintainer: NEOAPPS <neo@obsidianos.xyz> <asd22.info@gmail.com>
pkgname=mingw-w64-json-glib
pkgver=1.10.8
pkgrel=1
pkgdesc="JSON library built on GLib (mingw-w64)"
arch=('any')
url="http://live.gnome.org/JsonGlib"
license=("GPL")
makedepends=('mingw-w64-meson' 'ninja')
depends=('mingw-w64-glib2>=2.38')
options=(!strip !buildflags staticlibs)
source=("http://ftp.gnome.org/pub/gnome/sources/json-glib/${pkgver%.*}/json-glib-${pkgver}.tar.xz")
sha256sums=('55c5c141a564245b8f8fbe7698663c87a45a7333c2a2c56f06f811ab73b212dd')

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

build() {
  cd "${srcdir}/json-glib-${pkgver}"
  for _arch in $_architectures; do
    mkdir -p "build-${_arch}"
    cd "build-${_arch}"
    ${_arch}-meson .. -Dintrospection=disabled
    ninja
    cd ..

  done
}

package() {
  cd "${srcdir}/json-glib-${pkgver}"

  for _arch in $_architectures; do
    cd "build-${_arch}"
    DESTDIR="${pkgdir}" ninja install

    find "$pkgdir/usr/${_arch}" -name '*.exe' -o -name '*.bat' -o -name '*.def' -o -name '*.exp' -o -name '*.manifest' | xargs -rtl1 rm
    find "$pkgdir/usr/${_arch}" -name '*.dll' | xargs -rtl1 ${_arch}-strip --strip-unneeded
    find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs -rtl1 ${_arch}-strip -g

    cd ..
  done
}