summaryrefslogtreecommitdiff
path: root/libre/nspr-static/PKGBUILD
blob: f8ef0bd710d784f5c1ea1f81c0a2ea62d44267a8 (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
# Maintainer: Márcio Silva <coadde@parabola.nu>
# based of nspr

_pkgname=nspr
pkgname=nspr-static
pkgver=4.12
pkgrel=1
pkgdesc="Netscape Portable Runtime (static libraries only)"
arch=(i686 x86_64 armv7h)
url="http://www.mozilla.org/projects/nspr/"
license=('MPL' 'GPL')
depends=('nspr')
makedepends=('zip')
options=('!emptydirs' 'staticlibs')
source=(https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${pkgver}/src/${_pkgname}-${pkgver}.tar.gz)
sha1sums=('14fb67a0e686a5c662f92e7f59dfd10053f327dd')
sha256sums=('e0b10a1e569153668ff8bdea6c7e491b389fab69c2f18285a1ebf7c2ea4269de')

build() {
  cd $_pkgname-$pkgver

  if [ "$CARCH" = "x86_64" ]; then
    _confflags="--enable-64bit"
  else
    _confflags=""
  fi

  ./nspr/configure \
      --prefix=/usr \
      --libdir=/usr/lib \
      --enable-optimize \
      --disable-debug ${_confflags}
  make
}

package() {
  cd $_pkgname-$pkgver
  make DESTDIR="$pkgdir" install

  # remove conflicting files
  rm -vr ${pkgdir}/usr/{bin,include,lib/pkgconfig,share}
  rm -v ${pkgdir}/usr/lib/lib*.so*
}