CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
c0dc7d1787547b7a35034889317d1981eb81bf8e
[ports/opt-arm.git] / nss / Pkgfile
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.19.3
9 release=2
10 source=(http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_3_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 _version=$(printf "%i.%i.%i" ${version//./ })
54 sed -i "s/@VERSION@/$_version/" $PKG/usr/bin/nss-config
55
56 NSS_LIBS=`$PKG/usr/bin/nss-config --libs`
57 NSS_CFLAGS=`$PKG/usr/bin/nss-config --cflags`
58 NSPR_VERSION=`pkg-config --modversion nspr`
59 sed $SRC/nss.pc.in \
60 -e "s,%libdir%,/usr/lib," \
61 -e "s,%prefix%,/usr," \
62 -e "s,%exec_prefix%,/usr/bin," \
63 -e "s,%includedir%,/usr/include/nss," \
64 -e "s,%NSS_VERSION%,$version," \
65 -e "s,%NSPR_VERSION%,$NSPR_VERSION," \
66 -e "s,%FULL_NSS_LIBS%,$NSS_LIBS," \
67 -e "s,%FULL_NSS_CFLAGS%,$NSS_CFLAGS," > \
68 $PKG/usr/lib/pkgconfig/nss.pc
69
70 }