1 # $Id: PKGBUILD 55625 2011-09-16 13:37:02Z bluewind $
2 # Maintainer : Ionut Biru <ibiru@archlinux.org>
5 pkgname=lib32-$_pkgbasename
8 pkgdesc="Mozilla Network Security Services (32-bit)"
10 url="http://www.mozilla.org/projects/security/pki/nss/"
13 depends=("lib32-nspr>=${_nsprver}" 'lib32-sqlite3>=3.6.17' "$_pkgbasename" 'lib32-zlib')
14 makedepends=('gcc-multilib' 'perl')
16 source=(ftp://ftp.mozilla.org/pub/security/nss/releases/NSS_${pkgver//./_}_RTM/src/${_pkgbasename}-${pkgver}.tar.gz
19 distrust-diginotar.patch
20 add_spi+cacert_ca_certs.patch
21 ssl-renegotiate-transitional.patch)
22 md5sums=('ca0ca058380be200cf247ea2496b5352'
23 'e5c97db0c884d5f4cfda21e562dc9bba'
24 'c547b030c57fe1ed8b77c73bf52b3ded'
25 'bbd7d8a8e2f6ffc8b3e5f6614e5f3ccf'
26 'ba2357c5b9881bfd7d54b037954ba0ff'
27 'd83c7b61abb7e9f8f7bcd157183d1ade')
30 cd "${srcdir}/${_pkgbasename}-${pkgver}/mozilla"
31 # Distrust DigiNotar root CA - backported from CVS (https://bugzilla.mozilla.org/show_bug.cgi?id=682927)
32 patch -Np0 -i "${srcdir}/distrust-diginotar.patch"
33 # Adds the SPI Inc. and CAcert.org CA certificates - patch from Debian
34 patch -Np2 -i "${srcdir}/add_spi+cacert_ca_certs.patch"
35 # Adds transitional SSL renegotiate support - patch from Debian
36 patch -Np2 -i "${srcdir}/ssl-renegotiate-transitional.patch"
38 patch -Np2 -i "${srcdir}/nss-no-rpath.patch"
41 sed -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' \
42 -i security/coreconf/rules.mk
43 cd "${srcdir}/${_pkgbasename}-${pkgver}"
45 export PKG_CONFIG_PATH=/usr/lib32/pkgconfig
47 export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
48 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
49 export NSS_USE_SYSTEM_SQLITE=1
50 export NSPR_INCLUDE_DIR=`pkg-config --cflags-only-I nspr | sed 's/-I//'`
51 export NSPR_LIB_DIR=`pkg-config --libs-only-L nspr | sed 's/-L.//'`
52 export XCFLAGS="${CFLAGS}"
54 make -j 1 -C mozilla/security/coreconf
55 make -j 1 -C mozilla/security/dbm
56 make -j 1 -C mozilla/security/nss
60 cd "${srcdir}/${_pkgbasename}-${pkgver}"
61 install -m755 -d "${pkgdir}/usr/lib32/pkgconfig"
63 sed "${srcdir}/nss.pc.in" -e "s,%libdir%,/usr/lib32,g" \
64 -e "s,%prefix%,/usr,g" \
65 -e "s,%exec_prefix%,/usr/bin,g" \
66 -e "s,%includedir%,/usr/include/nss,g" \
67 -e "s,%NSPR_VERSION%,${pkgver},g" \
68 -e "s,%NSS_VERSION%,${pkgver},g" > \
69 "${pkgdir}/usr/lib32/pkgconfig/nss.pc"
70 ln -sf nss.pc "${pkgdir}/usr/lib32/pkgconfig/mozilla-nss.pc"
71 chmod 644 ${pkgdir}/usr/lib32/pkgconfig/*.pc
73 for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so \
74 libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so
76 install -m755 mozilla/dist/*.OBJ/lib/${file} "${pkgdir}/usr/lib32/"
79 install -m644 mozilla/dist/*.OBJ/lib/libcrmf.a "${pkgdir}/usr/lib32/"
80 install -m644 mozilla/dist/*.OBJ/lib/*.chk "${pkgdir}/usr/lib32/"