2006-02-23 16:26:10 +01:00
|
|
|
# Description: Mozilla Network Security Services (NSS)
|
2008-06-24 19:40:48 +02:00
|
|
|
# URL: http://www.mozilla.org/projects/security/pki/nss/
|
2013-04-01 17:51:37 +02:00
|
|
|
# Maintainer: Fredrik Rinnestam, fredrik at rinnestam dot se
|
2008-06-24 19:40:48 +02:00
|
|
|
# Depends on: nspr sqlite3
|
2006-02-23 16:26:10 +01:00
|
|
|
|
|
|
|
name=nss
|
2014-03-19 19:04:17 +01:00
|
|
|
version=3.16
|
2014-03-20 21:08:31 +01:00
|
|
|
release=2
|
2014-03-19 19:04:17 +01:00
|
|
|
source=(ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_RTM/src/$name-$version.tar.gz \
|
2010-04-10 16:00:19 +02:00
|
|
|
nss-config.in nss.pc.in)
|
2006-02-23 16:26:10 +01:00
|
|
|
|
|
|
|
build() {
|
2013-08-06 18:33:47 +02:00
|
|
|
cd $name-$version/
|
2008-03-06 12:46:01 +01:00
|
|
|
|
2008-06-24 19:40:48 +02:00
|
|
|
local file
|
2006-02-23 16:26:10 +01:00
|
|
|
|
2013-08-08 17:35:33 +02:00
|
|
|
sed -i nss/coreconf/Linux.mk \
|
|
|
|
-e 's|^CC.*=.*gcc$|#&|' \
|
|
|
|
-e 's|^CCC.*=.*g++$|#&|'
|
2013-02-27 10:54:52 +01:00
|
|
|
|
2008-06-24 19:40:48 +02:00
|
|
|
export NSPR_INCLUDE_DIR=/usr/include/nspr
|
|
|
|
export NSPR_LIB_DIR=/usr/lib
|
|
|
|
export NSS_USE_SYSTEM_SQLITE=1
|
2013-09-29 16:58:52 +02:00
|
|
|
export NSS_ENABLE_ECC=1
|
2008-06-24 19:40:48 +02:00
|
|
|
export BUILD_OPT=1
|
2013-08-08 17:35:33 +02:00
|
|
|
export XCFLAGS="${CFLAGS}"
|
2008-03-06 12:46:01 +01:00
|
|
|
|
2013-08-06 18:33:47 +02:00
|
|
|
make -j1 USE_64=1 -C nss all
|
2008-03-06 12:46:01 +01:00
|
|
|
|
2010-04-10 16:00:19 +02:00
|
|
|
install -d $PKG/usr/{bin,lib/pkgconfig,include/nss}
|
2008-03-06 12:46:01 +01:00
|
|
|
|
2008-06-24 19:40:48 +02:00
|
|
|
for file in \
|
|
|
|
libnss3.so libssl3.so libsmime3.so libsoftokn3.so \
|
|
|
|
libsoftokn3.chk libnssckbi.so libfreebl3.so libfreebl3.chk \
|
|
|
|
libcrmf.a libnssb.a libnssckfw.a libnssutil3.so libnssdbm3.so
|
|
|
|
do
|
2013-08-06 18:33:47 +02:00
|
|
|
cp -L dist/*.OBJ/lib/$file $PKG/usr/lib
|
2008-06-24 19:40:48 +02:00
|
|
|
done
|
2008-02-14 10:21:49 +01:00
|
|
|
|
2008-06-24 19:40:48 +02:00
|
|
|
chmod +x $PKG/usr/lib/*.so
|
2008-02-14 10:21:49 +01:00
|
|
|
|
2008-06-24 19:40:48 +02:00
|
|
|
for file in \
|
|
|
|
certutil cmsutil crlutil modutil pk12util signtool signver ssltap
|
|
|
|
do
|
2013-08-06 18:33:47 +02:00
|
|
|
cp -L dist/*.OBJ/bin/$file $PKG/usr/bin
|
2008-06-24 19:40:48 +02:00
|
|
|
done
|
2008-03-06 12:46:01 +01:00
|
|
|
|
2013-08-06 18:33:47 +02:00
|
|
|
cp -L dist/public/nss/*.h $PKG/usr/include/nss
|
2008-03-06 12:46:01 +01:00
|
|
|
|
2008-06-24 19:40:48 +02:00
|
|
|
install -m 0755 $SRC/nss-config.in $PKG/usr/bin/nss-config
|
2010-04-10 16:00:19 +02:00
|
|
|
|
2014-03-20 21:08:31 +01:00
|
|
|
_version=$(printf "%i.%i.%i" ${version//./ })
|
|
|
|
sed -i "s/@VERSION@/$_version/" $PKG/usr/bin/nss-config
|
2010-04-10 16:00:19 +02:00
|
|
|
|
|
|
|
NSS_LIBS=`$PKG/usr/bin/nss-config --libs`
|
|
|
|
NSS_CFLAGS=`$PKG/usr/bin/nss-config --cflags`
|
|
|
|
sed $SRC/nss.pc.in \
|
|
|
|
-e "s,%libdir%,/usr/lib," \
|
|
|
|
-e "s,%prefix%,/usr," \
|
|
|
|
-e "s,%exec_prefix%,/usr/bin," \
|
|
|
|
-e "s,%includedir%,/usr/include/nss," \
|
|
|
|
-e "s,%NSS_VERSION%,$version," \
|
|
|
|
-e "s,%FULL_NSS_LIBS%,$NSS_LIBS," \
|
|
|
|
-e "s,%FULL_NSS_CFLAGS%,$NSS_CFLAGS," > \
|
|
|
|
$PKG/usr/lib/pkgconfig/nss.pc
|
|
|
|
|
2006-02-23 16:26:10 +01:00
|
|
|
}
|