wok-next annotate nss/receipt @ rev 5281

jack : fix missing .pc file
author Rohit Joshi <jozee@slitaz.org>
date Fri Apr 16 12:55:45 2010 -0400 (2010-04-16)
parents
children f581472fff1b
rev   line source
rocky@5107 1 # SliTaz package receipt.
rocky@5107 2
rocky@5107 3 PACKAGE="nss"
rocky@5107 4 VERSION="3.12.4"
rocky@5107 5 CATEGORY="utilities"
rocky@5107 6 SHORT_DESC="Mozilla Network Security Services (NSS)."
rocky@5107 7 MAINTAINER="rocky@slitaz.org"
rocky@5107 8 DEPENDS="libfirefox"
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
rocky@5107 18 export NSPR_INCLUDE_DIR=$(ls -d /usr/include/firefox-*/stable)
rocky@5107 19 export NSPR_LIB_DIR=$(ls -d /usr/lib/firefox-*/lib)
rocky@5107 20 export NSS_USE_SYSTEM_SQLITE=1
rocky@5107 21 export BUILD_OPT=1
rocky@5107 22
rocky@5107 23 make -j1 -C mozilla/security/nss build_coreconf build_dbm all
rocky@5107 24
rocky@5107 25 mkdir -p $PWD/_pkg/usr/bin
rocky@5107 26 mkdir -p $PWD/_pkg/usr/lib/pkgconfig
rocky@5107 27 mkdir -p $PWD/_pkg/usr/include/nss
rocky@5107 28
rocky@5107 29 NSS_VMAJOR=`grep "#define.*NSS_VMAJOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'`
rocky@5107 30 NSS_VMINOR=`grep "#define.*NSS_VMINOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'`
rocky@5107 31 NSS_VPATCH=`grep "#define.*NSS_VPATCH" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'`
rocky@5107 32
rocky@5107 33 sed ../stuff/nss.pc.in -e "s,%libdir%,/usr/lib,g" \
rocky@5107 34 -e "s,%prefix%,/usr,g" \
rocky@5107 35 -e "s,%exec_prefix%,/usr/bin,g" \
rocky@5107 36 -e "s,%includedir%,/usr/include/nss,g" \
rocky@5107 37 -e "s,%NSPR_VERSION%,${VERSION},g" \
rocky@5107 38 -e "s,%NSS_VERSION%,${VERSION},g" \
rocky@5107 39 > $PWD/_pkg/usr/lib/pkgconfig/nss.pc || return 1
rocky@5107 40
rocky@5107 41 sed ../stuff/nss-config.in -e "s,@libdir@,/usr/lib,g" \
rocky@5107 42 -e "s,@prefix@,/usr/bin,g" \
rocky@5107 43 -e "s,@exec_prefix@,/usr/bin,g" \
rocky@5107 44 -e "s,@includedir@,/usr/include/nss,g" \
rocky@5107 45 -e "s,@MOD_MAJOR_VERSION@,${NSS_VMAJOR},g" \
rocky@5107 46 -e "s,@MOD_MINOR_VERSION@,${NSS_VMINOR},g" \
rocky@5107 47 -e "s,@MOD_PATCH_VERSION@,${NSS_VPATCH},g" \
rocky@5107 48 > $PWD/_pkg/usr/bin/nss-config || return 1
rocky@5107 49 chmod 755 $PWD/_pkg/usr/bin/nss-config || return 1
rocky@5107 50
rocky@5107 51 for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so \
rocky@5107 52 libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so
rocky@5107 53 do
rocky@5107 54 cp mozilla/dist/*.OBJ/lib/${file} $PWD/_pkg/usr/lib/ || return 1
rocky@5107 55 done
rocky@5107 56 for file in libcrmf.a libnssb.a libnssckfw.a; do
rocky@5107 57 cp mozilla/dist/*.OBJ/lib/${file} $PWD/_pkg/usr/lib/ || return 1
rocky@5107 58 done
rocky@5107 59
rocky@5107 60 for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap; do
rocky@5107 61 cp mozilla/dist/*.OBJ/bin/${file} $PWD/_pkg/usr/bin/ || return 1
rocky@5107 62 done
rocky@5107 63
rocky@5107 64 cp mozilla/dist/public/nss/*.h $PWD/_pkg/usr/include/nss || return 1
rocky@5107 65 }
rocky@5107 66
rocky@5107 67 # Rules to gen a SliTaz package suitable for Tazpkg.
rocky@5107 68 genpkg_rules()
rocky@5107 69 {
rocky@5107 70 mkdir -p $fs/usr
rocky@5107 71 cp -a $_pkg/usr/bin $fs/usr
rocky@5107 72 rm $fs/usr/bin/nss-config
rocky@5107 73 }