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