summaryrefslogtreecommitdiff
path: root/multilib/lib32-json-c/PKGBUILD
blob: 3504981874c3c8aa7fe544156fa97f27aa6e5262 (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
# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
# Contributor: congyiwu <congyiwu AT gmail DOT com>

_pkgbasename=json-c
pkgname=lib32-$_pkgbasename
pkgver=0.9
pkgrel=2
pkgdesc="A JSON implementation in C (32-bit)"
url="http://oss.metaparadigm.com/json-c/"
license=("MIT")
arch=('x86_64')
depends=('lib32-glibc' $_pkgbasename)
makedepends=('gcc-multilib' 'libtool-multilib')
source=(http://oss.metaparadigm.com/$_pkgbasename/$_pkgbasename-$pkgver.tar.gz)
md5sums=('3a13d264528dcbaf3931b0cede24abae')
options=(!libtool)
build() {
  cd "$srcdir/$_pkgbasename-$pkgver"

  export CC="gcc -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  ./configure --prefix=/usr --libdir=/usr/lib32
  make
}

package() {
  cd "$srcdir/$_pkgbasename-$pkgver"
  make DESTDIR="$pkgdir" install

  rm -r "$pkgdir/usr/include"

  mkdir -p "$pkgdir/usr/share/licenses"
  ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
}