2006-02-23 15:26:10 +00:00
|
|
|
# Description: Mozilla Network Security Services (NSS)
|
2014-10-28 00:06:15 +01:00
|
|
|
# URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/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 15:26:10 +00:00
|
|
|
|
|
|
|
name=nss
|
2016-06-14 15:37:52 +02:00
|
|
|
version=3.24
|
2015-08-21 21:10:47 +02:00
|
|
|
release=1
|
2016-06-14 15:37:52 +02:00
|
|
|
source=(http://ftp.mozilla.org/pub/security/nss/releases/NSS_3_24_RTM/src/$name-$version.tar.gz \
|
2010-04-10 16:00:19 +02:00
|
|
|
nss-config.in nss.pc.in)
|
2006-02-23 15:26:10 +00:00
|
|
|
|
|
|
|
build() {
|
2013-08-06 18:33:47 +02:00
|
|
|
cd $name-$version/
|
2008-03-06 06:46:01 -05:00
|
|
|
|
2008-06-24 19:40:48 +02:00
|
|
|
local file
|
2006-02-23 15:26:10 +00: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}"
|
2016-01-09 00:17:53 +01:00
|
|
|
export NSS_DISABLE_GTESTS=1
|
2008-03-06 06:46:01 -05:00
|
|
|
|
2013-08-06 18:33:47 +02:00
|
|
|
make -j1 USE_64=1 -C nss all
|
2008-03-06 06:46:01 -05:00
|
|
|
|
2010-04-10 16:00:19 +02:00
|
|
|
install -d $PKG/usr/{bin,lib/pkgconfig,include/nss}
|
2008-03-06 06:46:01 -05: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 04:21:49 -05:00
|
|
|
|
2008-06-24 19:40:48 +02:00
|
|
|
chmod +x $PKG/usr/lib/*.so
|
2008-02-14 04:21:49 -05: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 06:46:01 -05:00
|
|
|
|
2013-08-06 18:33:47 +02:00
|
|
|
cp -L dist/public/nss/*.h $PKG/usr/include/nss
|
2008-03-06 06:46:01 -05: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`
|
2015-02-18 21:05:51 +01:00
|
|
|
NSPR_VERSION=`pkg-config --modversion nspr`
|
2010-04-10 16:00:19 +02:00
|
|
|
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," \
|
2015-02-18 21:05:51 +01:00
|
|
|
-e "s,%NSPR_VERSION%,$NSPR_VERSION," \
|
2010-04-10 16:00:19 +02:00
|
|
|
-e "s,%FULL_NSS_LIBS%,$NSS_LIBS," \
|
|
|
|
-e "s,%FULL_NSS_CFLAGS%,$NSS_CFLAGS," > \
|
|
|
|
$PKG/usr/lib/pkgconfig/nss.pc
|
|
|
|
|
2006-02-23 15:26:10 +00:00
|
|
|
}
|