CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
43641469a14a596e6c7dd6af5bd404383287126f
[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.27.1
9 release=1
10 source=(http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_27_1_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 export NSS_DISABLE_GTESTS=1
29
30 make -j1 -C nss all
31
32 install -d $PKG/usr/{bin,lib/pkgconfig,include/nss}
33
34 for file in \
35 libnss3.so libssl3.so libsmime3.so libsoftokn3.so \
36 libsoftokn3.chk libnssckbi.so libfreebl3.so libfreebl3.chk \
37 libcrmf.a libnssb.a libnssckfw.a libnssutil3.so libnssdbm3.so
38 do
39 cp -L dist/*.OBJ/lib/$file $PKG/usr/lib
40 done
41
42 chmod +x $PKG/usr/lib/*.so
43
44 for file in \
45 certutil cmsutil crlutil modutil pk12util signtool signver ssltap
46 do
47 cp -L dist/*.OBJ/bin/$file $PKG/usr/bin
48 done
49
50 cp -L dist/public/nss/*.h $PKG/usr/include/nss
51
52 install -m 0755 $SRC/nss-config.in $PKG/usr/bin/nss-config
53
54 _version=$(printf "%i.%i.%i" ${version//./ })
55 sed -i "s/@VERSION@/$_version/" $PKG/usr/bin/nss-config
56
57 NSS_LIBS=`$PKG/usr/bin/nss-config --libs`
58 NSS_CFLAGS=`$PKG/usr/bin/nss-config --cflags`
59 NSPR_VERSION=`pkg-config --modversion nspr`
60 sed $SRC/nss.pc.in \
61 -e "s,%libdir%,/usr/lib," \
62 -e "s,%prefix%,/usr," \
63 -e "s,%exec_prefix%,/usr/bin," \
64 -e "s,%includedir%,/usr/include/nss," \
65 -e "s,%NSS_VERSION%,$version," \
66 -e "s,%NSPR_VERSION%,$NSPR_VERSION," \
67 -e "s,%FULL_NSS_LIBS%,$NSS_LIBS," \
68 -e "s,%FULL_NSS_CFLAGS%,$NSS_CFLAGS," > \
69 $PKG/usr/lib/pkgconfig/nss.pc
70
71 }