1 # Maintainer: Anatol Pomozov
6 pkgdesc='Fast JSON serializer for golang'
8 url='https://github.com/mailru/easyjson'
12 source=(easyjson-$pkgver.zip::https://github.com/mailru/easyjson/archive/v$pkgver.zip)
13 sha512sums=('21b28ac8730090118c8268c580166b9179b003fa8c0a603f90fce5f4b91eb12fd14466c94f7ecbc01764f8a3c7c7350283da3094f208992f877cd5f1391bcbb6')
16 cd $srcdir/easyjson-$pkgver
17 sed -i 's/golint /#golint /g' Makefile
18 sed -i 's/-i//g' Makefile
22 cd $srcdir/easyjson-$pkgver
23 export CGO_CPPFLAGS="${CPPFLAGS}"
24 export CGO_CFLAGS="${CFLAGS}"
25 export CGO_CXXFLAGS="${CXXFLAGS}"
26 export CGO_LDFLAGS="${LDFLAGS}"
27 export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
32 cd $srcdir/easyjson-$pkgver
33 # The tests rebuild the binary, this time without flags
34 export CGO_CPPFLAGS="${CPPFLAGS}"
35 export CGO_CFLAGS="${CFLAGS}"
36 export CGO_CXXFLAGS="${CXXFLAGS}"
37 export CGO_LDFLAGS="${LDFLAGS}"
38 export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
39 # Foxboron: Allocation fails in a test. Not sure why.
44 cd $srcdir/easyjson-$pkgver
45 install -Dm755 bin/easyjson $pkgdir/usr/bin/easyjson