| 1 | # Description: Mozilla Network Security Services (NSS) |
| 2 | # URL: http://www.mozilla.org/projects/security/pki/nss/ |
| 3 | # Maintainer: Fredrik Rinnestam, fredrik at rinnestam dot se |
| 4 | # Arch Maintainer: CRUX-ARM System Team. devel at crux-arm dot nu |
| 5 | # Depends on: nspr sqlite3 |
| 6 | |
| 7 | name=nss |
| 8 | version=3.15.4 |
| 9 | release=1 |
| 10 | source=(ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_4_RTM/src/$name-$version.tar.gz \ |
| 11 | nss-config.in nss.pc.in) |
| 12 | |
| 13 | build() { |
| 14 | cd $name-$version/ |
| 15 | |
| 16 | local file |
| 17 | |
| 18 | sed -i nss/coreconf/Linux.mk \ |
| 19 | -e 's|^CC.*=.*gcc$|#&|' \ |
| 20 | -e 's|^CCC.*=.*g++$|#&|' |
| 21 | |
| 22 | export NSPR_INCLUDE_DIR=/usr/include/nspr |
| 23 | export NSPR_LIB_DIR=/usr/lib |
| 24 | export NSS_USE_SYSTEM_SQLITE=1 |
| 25 | export NSS_ENABLE_ECC=1 |
| 26 | export BUILD_OPT=1 |
| 27 | export XCFLAGS="${CFLAGS}" |
| 28 | |
| 29 | make -j1 -C nss all |
| 30 | |
| 31 | install -d $PKG/usr/{bin,lib/pkgconfig,include/nss} |
| 32 | |
| 33 | for file in \ |
| 34 | libnss3.so libssl3.so libsmime3.so libsoftokn3.so \ |
| 35 | libsoftokn3.chk libnssckbi.so libfreebl3.so libfreebl3.chk \ |
| 36 | libcrmf.a libnssb.a libnssckfw.a libnssutil3.so libnssdbm3.so |
| 37 | do |
| 38 | cp -L dist/*.OBJ/lib/$file $PKG/usr/lib |
| 39 | done |
| 40 | |
| 41 | chmod +x $PKG/usr/lib/*.so |
| 42 | |
| 43 | for file in \ |
| 44 | certutil cmsutil crlutil modutil pk12util signtool signver ssltap |
| 45 | do |
| 46 | cp -L dist/*.OBJ/bin/$file $PKG/usr/bin |
| 47 | done |
| 48 | |
| 49 | cp -L dist/public/nss/*.h $PKG/usr/include/nss |
| 50 | |
| 51 | install -m 0755 $SRC/nss-config.in $PKG/usr/bin/nss-config |
| 52 | |
| 53 | sed -i "s/@VERSION@/$version/" $PKG/usr/bin/nss-config |
| 54 | |
| 55 | NSS_LIBS=`$PKG/usr/bin/nss-config --libs` |
| 56 | NSS_CFLAGS=`$PKG/usr/bin/nss-config --cflags` |
| 57 | sed $SRC/nss.pc.in \ |
| 58 | -e "s,%libdir%,/usr/lib," \ |
| 59 | -e "s,%prefix%,/usr," \ |
| 60 | -e "s,%exec_prefix%,/usr/bin," \ |
| 61 | -e "s,%includedir%,/usr/include/nss," \ |
| 62 | -e "s,%NSS_VERSION%,$version," \ |
| 63 | -e "s,%FULL_NSS_LIBS%,$NSS_LIBS," \ |
| 64 | -e "s,%FULL_NSS_CFLAGS%,$NSS_CFLAGS," > \ |
| 65 | $PKG/usr/lib/pkgconfig/nss.pc |
| 66 | |
| 67 | } |