You are not logged in.

#1 2004-08-22 11:45:14

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

mozilla NSPR and NSS

For evolution, gaim, etc etc we could use Mozilla NSS for encryption. We don't want to let them depend on a large package like mozilla while we can have a smaller, more recent version of the library we need.

nspr:

pkgname=nspr
pkgver=4.4.1
pkgrel=1j1
pkgdesc="Mozilla Portable Runtime"
depends=('glibc')
url="http://www.mozilla.org/projects/nspr/"
license="MPL-1.1"
source=("ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${pkgver}/src/${pkgname}-${pkgver}.tar.gz")

build() {
  cd $startdir/src/$pkgname-$pkgver
  mkdir build
  cd build
  ../mozilla/nsprpub/configure 
        --prefix=/usr 
        --mandir=/usr/man
  make || return 1
  make install
  rm -rf dist/bin
  mkdir -p $startdir/pkg/usr
  cp -rfL dist/* $startdir/pkg/usr
}

nss:

pkgname=nss
pkgver=3.9.2
pkgrel=1j1
pkgdesc="Mozilla 's Netscape Security Services Library that implements PKI support"
depends=('nspr')
url="http://www.mozilla.org/projects/security/pki/nss/"
license="MPL-1.1"
source=("ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_9_2_RTM/src/${pkgname}-${pkgver}.tar.gz")

build() {
  cd $startdir/src/$pkgname-$pkgver

  # Hack system NSPR in place
  echo 'INCLUDES += -I/usr/include/nspr -I$(DIST)/include/dbm' 
        >> mozilla/security/coreconf/headers.mk
  sed -e 's:$(DIST)/lib/$(LIB_PREFIX)plc4:/usr/lib/$(LIB_PREFIX)plc4:' 
        -e 's:$(DIST)/lib/$(LIB_PREFIX)plds4:/usr/lib/$(LIB_PREFIX)plds4:' 
        -i mozilla/security/nss/lib/ckfw/builtins/Makefile
  sed -e 's:$(DIST)/lib/$(LIB_PREFIX)plc4:/usr/lib/$(LIB_PREFIX)plc4:' 
        -e 's:$(DIST)/lib/$(LIB_PREFIX)plds4:/usr/lib/$(LIB_PREFIX)plds4:' 
        -i mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile

  #modify install path
  sed -e 's:SOURCE_PREFIX = $(CORE_DEPTH)/../dist:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' 
        -i mozilla/security/coreconf/source.mk

  cd mozilla/security/coreconf
  make || return 1
  cd $startdir/src/$pkgname-$pkgver/mozilla/security/dbm
  make || return 1
  cd $startdir/src/$pkgname-$pkgver/mozilla/security/nss
  make || return 1

  cd $startdir/src/$pkgname-$pkgver/mozilla/security/dist
  mkdir -p $startdir/pkg/usr/lib/nss
  cp -L */lib/*.a $startdir/pkg/usr/lib/nss
  cp -L */lib/*.so $startdir/pkg/usr/lib
  mkdir -p $startdir/pkg/usr/include/nss
  cp private/nss/*.h $startdir/pkg/usr/include/nss
  cp public/nss/*.h $startdir/pkg/usr/include/nss
}

These packages are inspired by Gentoo's ebuilds for the packages. Mozilla projects have the most user friendly buildsystem in the whole world, I hope everyone who rolls out source tarballs switches over to this userfriendly buildsystem wink

Offline

#2 2004-08-22 12:21:55

ganlu
Member
From: ChongQing, China
Registered: 2004-01-04
Posts: 360

Re: mozilla NSPR and NSS

Thank you, JGC, your package always comes with high quality. I am using your evolution PKGBUILD- build it myself for nptl support, now I like to see I can depreciate mozilla package right now. Maybe the whole developement team could agree with this single nss package instead of big mozilla, so we as a user have opportunity to choose.

Offline

Board footer

Powered by FluxBB