wok-current annotate nss/receipt @ rev 6568

Up: mtools to 4.0.13.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Oct 08 01:23:26 2010 +0000 (2010-10-08)
parents f581472fff1b
children f620c0d3e9f4
rev   line source
rocky@5107 1 # SliTaz package receipt.
rocky@5107 2
rocky@5107 3 PACKAGE="nss"
slaxemulator@6444 4 VERSION="3.12.7"
rocky@5107 5 CATEGORY="utilities"
rocky@5107 6 SHORT_DESC="Mozilla Network Security Services (NSS)."
rocky@5107 7 MAINTAINER="rocky@slitaz.org"
slaxemulator@6444 8 DEPENDS="libfirefox sqlite zlib"
rocky@5107 9 BUILD_DEPENDS="firefox-dev sqlite-dev zlib-dev perl"
rocky@5107 10 TARBALL="$PACKAGE-$VERSION.tar.gz"
rocky@5107 11 WEB_SITE="http://www.mozilla.org/projects/security/pki/nss/"
rocky@5107 12 WGET_URL="ftp://ftp.mozilla.org/pub/security/nss/releases/NSS_${VERSION//./_}_RTM/src/${TARBALL}"
rocky@5107 13
rocky@5107 14 # Rules to configure and make the package.
rocky@5107 15 compile_rules()
rocky@5107 16 {
rocky@5107 17 cd $src
slaxemulator@6444 18 # Adds the SPI Inc. and CAcert.org CA certificates - patch from Debian
slaxemulator@6444 19 patch -Np1 -i ../stuff/add_spi+cacert_ca_certs.patch
slaxemulator@6444 20 # Adds transitional SSL renegotiate support - patch from Debian
slaxemulator@6444 21 patch -Np1 -i ../stuff/ssl-renegotiate-transitional.patch
slaxemulator@6444 22 # Builds against system sqlite - patch from Fedora
slaxemulator@6444 23 patch -Np0 -i ../stuff/nss-nolocalsql.patch
slaxemulator@6444 24 # Removes rpath
slaxemulator@6444 25 patch -Np0 -i ../stuff/nss-no-rpath.patch
slaxemulator@6444 26
pascal@5809 27 export NSPR_INCLUDE_DIR=$(ls -d /usr/include/firefox-*)
rocky@5107 28 export NSPR_LIB_DIR=$(ls -d /usr/lib/firefox-*/lib)
rocky@5107 29 export NSS_USE_SYSTEM_SQLITE=1
rocky@5107 30 export BUILD_OPT=1
rocky@5107 31
rocky@5107 32 make -j1 -C mozilla/security/nss build_coreconf build_dbm all
rocky@5107 33
rocky@5107 34 mkdir -p $PWD/_pkg/usr/bin
rocky@5107 35 mkdir -p $PWD/_pkg/usr/lib/pkgconfig
rocky@5107 36 mkdir -p $PWD/_pkg/usr/include/nss
rocky@5107 37
rocky@5107 38 NSS_VMAJOR=`grep "#define.*NSS_VMAJOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'`
rocky@5107 39 NSS_VMINOR=`grep "#define.*NSS_VMINOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'`
rocky@5107 40 NSS_VPATCH=`grep "#define.*NSS_VPATCH" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'`
rocky@5107 41
rocky@5107 42 sed ../stuff/nss.pc.in -e "s,%libdir%,/usr/lib,g" \
rocky@5107 43 -e "s,%prefix%,/usr,g" \
rocky@5107 44 -e "s,%exec_prefix%,/usr/bin,g" \
rocky@5107 45 -e "s,%includedir%,/usr/include/nss,g" \
rocky@5107 46 -e "s,%NSPR_VERSION%,${VERSION},g" \
rocky@5107 47 -e "s,%NSS_VERSION%,${VERSION},g" \
rocky@5107 48 > $PWD/_pkg/usr/lib/pkgconfig/nss.pc || return 1
rocky@5107 49
rocky@5107 50 sed ../stuff/nss-config.in -e "s,@libdir@,/usr/lib,g" \
rocky@5107 51 -e "s,@prefix@,/usr/bin,g" \
rocky@5107 52 -e "s,@exec_prefix@,/usr/bin,g" \
rocky@5107 53 -e "s,@includedir@,/usr/include/nss,g" \
rocky@5107 54 -e "s,@MOD_MAJOR_VERSION@,${NSS_VMAJOR},g" \
rocky@5107 55 -e "s,@MOD_MINOR_VERSION@,${NSS_VMINOR},g" \
rocky@5107 56 -e "s,@MOD_PATCH_VERSION@,${NSS_VPATCH},g" \
rocky@5107 57 > $PWD/_pkg/usr/bin/nss-config || return 1
rocky@5107 58 chmod 755 $PWD/_pkg/usr/bin/nss-config || return 1
rocky@5107 59
rocky@5107 60 for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so \
rocky@5107 61 libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so
rocky@5107 62 do
rocky@5107 63 cp mozilla/dist/*.OBJ/lib/${file} $PWD/_pkg/usr/lib/ || return 1
rocky@5107 64 done
rocky@5107 65 for file in libcrmf.a libnssb.a libnssckfw.a; do
rocky@5107 66 cp mozilla/dist/*.OBJ/lib/${file} $PWD/_pkg/usr/lib/ || return 1
rocky@5107 67 done
rocky@5107 68
rocky@5107 69 for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap; do
rocky@5107 70 cp mozilla/dist/*.OBJ/bin/${file} $PWD/_pkg/usr/bin/ || return 1
rocky@5107 71 done
rocky@5107 72
rocky@5107 73 cp mozilla/dist/public/nss/*.h $PWD/_pkg/usr/include/nss || return 1
rocky@5107 74 }
rocky@5107 75
rocky@5107 76 # Rules to gen a SliTaz package suitable for Tazpkg.
rocky@5107 77 genpkg_rules()
rocky@5107 78 {
rocky@5107 79 mkdir -p $fs/usr
rocky@5107 80 cp -a $_pkg/usr/bin $fs/usr
rocky@5107 81 rm $fs/usr/bin/nss-config
rocky@5107 82 }