2009-10-13 00:56:40 +02:00
|
|
|
# Template file for 'nss'
|
|
|
|
pkgname=nss
|
2011-12-20 13:39:11 +01:00
|
|
|
version=3.13.1
|
2011-01-16 01:01:13 +01:00
|
|
|
_distver=$(echo $version|sed -e "s|\.|_|g")
|
|
|
|
distfiles="${MOZILLA_SITE}/security/nss/releases/NSS_${_distver}_RTM/src/${pkgname}-${version}.tar.gz"
|
2009-10-13 00:56:40 +02:00
|
|
|
short_desc="Mozilla Network Security Services"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2011-05-28 13:39:42 +02:00
|
|
|
homepage="http://www.mozilla.org/projects/security/pki/nss/"
|
|
|
|
license="GPL-2, MPL-1.1"
|
2011-12-20 13:39:11 +01:00
|
|
|
checksum=95d933b59be466f19f90f595a35b4b92213fef084caecafeb89f4e2ce7160660
|
2009-10-13 00:56:40 +02:00
|
|
|
long_desc="
|
|
|
|
Network Security Services (NSS) is a set of libraries designed to support
|
|
|
|
cross-platform development of security-enabled server applications.
|
2011-07-14 01:21:02 +02:00
|
|
|
Applications built with NSS can support SSL v2 and v3, TLS, PKCS 5,
|
|
|
|
PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 v3 certificates, and other
|
2009-10-13 00:56:40 +02:00
|
|
|
security standards."
|
|
|
|
|
2009-11-22 08:31:44 +01:00
|
|
|
subpackages="$pkgname-devel"
|
2011-07-02 21:22:08 +02:00
|
|
|
Add_dependency build perl ">=0"
|
2009-12-21 19:11:22 +01:00
|
|
|
Add_dependency build zlib-devel
|
|
|
|
Add_dependency build nspr-devel
|
|
|
|
Add_dependency build sqlite-devel
|
2009-10-13 00:56:40 +02:00
|
|
|
|
2011-12-20 13:39:11 +01:00
|
|
|
do_build() {
|
|
|
|
# Respect LDFLAGS
|
|
|
|
sed -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' \
|
|
|
|
-i mozilla/security/coreconf/rules.mk
|
|
|
|
|
|
|
|
# Generate certdata.c from certdata.txt
|
|
|
|
make -C mozilla/security/nss/lib/ckfw/builtins generate
|
|
|
|
|
2011-11-08 11:56:17 +01:00
|
|
|
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
2009-10-13 00:56:40 +02:00
|
|
|
_use64="USE_64=1"
|
|
|
|
fi
|
|
|
|
for dir in coreconf dbm nss; do
|
|
|
|
make -C mozilla/security/${dir} \
|
|
|
|
LIBRUNPATH= BUILD_OPT=1 \
|
|
|
|
NSS_USE_SYSTEM_SQLITE=1 \
|
|
|
|
NSPR_INCLUDE_DIR=/usr/include/nspr \
|
2011-12-20 13:39:11 +01:00
|
|
|
NSPR_LIB_DIR=/usr/lib \
|
|
|
|
XCFLAGS="${CFLAGS}" ${_use64}
|
2009-10-13 00:56:40 +02:00
|
|
|
done
|
2010-01-16 03:38:39 +01:00
|
|
|
}
|
|
|
|
|
2011-12-20 13:39:11 +01:00
|
|
|
do_install() {
|
|
|
|
vmkdir usr/lib/pkgconfig
|
|
|
|
vmkdir usr/bin
|
|
|
|
vmkdir usr/include/nss
|
2009-12-21 22:48:38 +01:00
|
|
|
|
|
|
|
NSS_VMAJOR=$(grep "#define.*NSS_VMAJOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}')
|
|
|
|
NSS_VMINOR=$(grep "#define.*NSS_VMINOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}')
|
|
|
|
NSS_VPATCH=$(grep "#define.*NSS_VPATCH" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}')
|
2011-12-20 13:39:11 +01:00
|
|
|
|
|
|
|
sed ${FILESDIR}/nss.pc.in \
|
|
|
|
-e "s,%libdir%,/usr/lib,g" \
|
|
|
|
-e "s,%prefix%,/usr,g" \
|
|
|
|
-e "s,%exec_prefix%,/usr/bin,g" \
|
|
|
|
-e "s,%includedir%,/usr/include/nss,g" \
|
|
|
|
-e "s,%NSPR_VERSION%,${version},g" \
|
|
|
|
-e "s,%NSS_VERSION%,${version},g" > \
|
|
|
|
${DESTDIR}/usr/lib/pkgconfig/nss.pc
|
|
|
|
|
|
|
|
ln -sf nss.pc ${DESTDIR}/usr/lib/pkgconfig/mozilla-nss.pc
|
|
|
|
chmod 644 ${DESTDIR}/usr/lib/pkgconfig/*.pc
|
|
|
|
|
|
|
|
sed ${FILESDIR}/nss-config.in \
|
|
|
|
-e "s,@libdir@,/usr/lib,g" \
|
|
|
|
-e "s,@prefix@,/usr/bin,g" \
|
|
|
|
-e "s,@exec_prefix@,/usr/bin,g" \
|
|
|
|
-e "s,@includedir@,/usr/include/nss,g" \
|
2009-12-21 22:48:38 +01:00
|
|
|
-e "s,@MOD_MAJOR_VERSION@,${NSS_VMAJOR},g" \
|
|
|
|
-e "s,@MOD_MINOR_VERSION@,${NSS_VMINOR},g" \
|
|
|
|
-e "s,@MOD_PATCH_VERSION@,${NSS_VPATCH},g" \
|
2011-12-20 13:39:11 +01:00
|
|
|
> ${DESTDIR}/usr/bin/nss-config
|
|
|
|
chmod 755 ${DESTDIR}/usr/bin/nss-config
|
|
|
|
|
|
|
|
for f in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so \
|
|
|
|
libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so; do
|
|
|
|
install -m755 mozilla/dist/*.OBJ/lib/${f} ${DESTDIR}/usr/lib
|
|
|
|
done
|
|
|
|
|
|
|
|
install -m644 mozilla/dist/*.OBJ/lib/libcrmf.a ${DESTDIR}/usr/lib
|
|
|
|
install -m644 mozilla/dist/*.OBJ/lib/*.chk ${DESTDIR}/usr/lib
|
|
|
|
|
|
|
|
for f in certutil cmsutil crlutil modutil pk12util shlibsign \
|
|
|
|
signtool signver ssltap; do
|
|
|
|
install -m755 mozilla/dist/*.OBJ/bin/${f} ${DESTDIR}/usr/bin
|
|
|
|
done
|
|
|
|
|
|
|
|
install -m644 mozilla/dist/public/nss/*.h ${DESTDIR}/usr/include/nss
|
2009-10-13 00:56:40 +02:00
|
|
|
}
|