PKGBUILD 1.78 KB
Newer Older
1 2 3 4 5 6
# Contributions from Arch:
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: kfgz <kfgz at interia pl>
# Contributor: Ionut Biru <ibiru at archlinux dot org>

pkgname=lib32-nss
7
pkgver=3.41.1
8
pkgrel=1
9 10 11 12
pkgdesc="Network Security Services (32-bit)"
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS"
arch=(x86_64)
license=(MPL GPL)
13
_nsprver=4.20
14 15 16 17
depends=("lib32-nspr>=${_nsprver}" lib32-sqlite lib32-zlib lib32-p11-kit nss)
makedepends=(perl python2 gyp)
source=("https://ftp.mozilla.org/pub/security/nss/releases/NSS_${pkgver//./_}_RTM/src/nss-${pkgver}.tar.gz"
        no-plt.diff)
18
sha256sums=('f2f6336ce63aa1c487b7f17abd378c0c25f93750b872d4937da60e7260441830'
19
            'ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa')
Giuseppe's avatar
Giuseppe committed
20

AlmAck's avatar
AlmAck committed
21
prepare() {
22
  mkdir path
Manuel's avatar
Sync  
Manuel committed
23

24
  ln -s /usr/bin/python2 path/python
Manuel's avatar
Sync  
Manuel committed
25

26 27 28 29 30
  cd nss-$pkgver

  # https://bugzilla.mozilla.org/show_bug.cgi?id=1382942
  patch -Np2 -i ../no-plt.diff
}
31

32
build() {
Giuseppe's avatar
Giuseppe committed
33 34
  export PKG_CONFIG_PATH=/usr/lib32/pkgconfig

35 36 37
  cd nss-$pkgver/nss
  PATH="$srcdir/path:$PATH" bash -x ./build.sh -v \
    --m32 --opt --system-sqlite --system-nspr --enable-libpkix --disable-tests
Manuel's avatar
Sync  
Manuel committed
38
}
Giuseppe's avatar
Giuseppe committed
39

Manuel's avatar
Sync  
Manuel committed
40
package() {
41 42 43
  cd nss-$pkgver

  sed nss/pkg/pkg-config/nss.pc.in \
Xuetian Weng's avatar
Xuetian Weng committed
44 45 46 47
    -e "s,%libdir%,/usr/lib32,g" \
    -e "s,%prefix%,/usr,g" \
    -e "s,%exec_prefix%,/usr/bin,g" \
    -e "s,%includedir%,/usr/include/nss,g" \
48 49 50 51
    -e "s,%NSPR_VERSION%,$_nsprver,g" \
    -e "s,%NSS_VERSION%,$pkgver,g" |
    install -Dm644 /dev/stdin "$pkgdir/usr/lib32/pkgconfig/nss.pc"

AlmAck's avatar
AlmAck committed
52
  ln -s nss.pc "$pkgdir/usr/lib32/pkgconfig/mozilla-nss.pc"
Xuetian Weng's avatar
Xuetian Weng committed
53

54 55 56 57 58 59
  cd dist/Release/lib
  install -Dt "$pkgdir/usr/lib32" *.so
  install -Dt "$pkgdir/usr/lib32" -m644 *.chk

  # Replace built-in trust with p11-kit connection
  ln -sf libnssckbi-p11-kit.so "$pkgdir/usr/lib32/libnssckbi.so"
Giuseppe's avatar
Giuseppe committed
60
}