2009-10-13 00:56:40 +02:00
|
|
|
# Template file for 'nss'
|
|
|
|
pkgname=nss
|
|
|
|
version=3.12.4
|
2010-01-11 16:37:42 +01:00
|
|
|
revision=1
|
2009-10-13 00:56:40 +02:00
|
|
|
distfiles="${MOZILLA_SITE}/security/nss/releases/NSS_3_12_4_RTM/src/${pkgname}-${version}.tar.gz"
|
|
|
|
build_style=custom-install
|
|
|
|
short_desc="Mozilla Network Security Services"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
checksum=8202546524c69ce03e1c3ef5e2956b71b8fa0a5bffdf06568597e7c0d1f83bf0
|
|
|
|
long_desc="
|
|
|
|
Network Security Services (NSS) is a set of libraries designed to support
|
|
|
|
cross-platform development of security-enabled server applications.
|
|
|
|
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
|
|
|
|
security standards."
|
|
|
|
|
2009-11-22 08:31:44 +01:00
|
|
|
subpackages="$pkgname-devel"
|
2009-10-13 00:56:40 +02:00
|
|
|
Add_dependency run glibc
|
|
|
|
Add_dependency run zlib
|
2009-12-21 19:11:22 +01:00
|
|
|
Add_dependency run nspr
|
2010-01-11 16:37:42 +01:00
|
|
|
Add_dependency run sqlite
|
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
|
|
|
|
2010-01-16 03:38:39 +01:00
|
|
|
do_build()
|
2009-10-13 00:56:40 +02:00
|
|
|
{
|
2010-01-16 03:38:39 +01:00
|
|
|
cd ${wrksrc} || return 1
|
2009-10-13 00:56:40 +02:00
|
|
|
if [ "$xbps_machine" = "x86_64" ]; then
|
|
|
|
_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 \
|
|
|
|
NSPR_LIB_DIR=/usr/lib ${_use64} || return 1
|
|
|
|
done
|
2010-01-16 03:38:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install()
|
|
|
|
{
|
|
|
|
cd ${wrksrc} || return 1
|
|
|
|
|
|
|
|
install -d ${DESTDIR}/usr/include/nss \
|
|
|
|
${DESTDIR}/usr/lib/pkgconfig
|
2009-12-21 19:11:22 +01:00
|
|
|
install -m644 mozilla/dist/public/nss/*.h \
|
|
|
|
${DESTDIR}/usr/include/nss || return 1
|
|
|
|
install -m755 mozilla/dist/*.OBJ/lib/*.so \
|
|
|
|
${DESTDIR}/usr/lib || return 1
|
2009-12-21 22:48:38 +01:00
|
|
|
for f in libcrmf.a libnssb.a libnssckfw.a; do
|
|
|
|
install -m644 mozilla/dist/*.OBJ/lib/${f} \
|
|
|
|
${DESTDIR}/usr/lib || return 1
|
|
|
|
done
|
2009-10-13 00:56:40 +02:00
|
|
|
|
2009-12-21 22:48:38 +01:00
|
|
|
( \
|
|
|
|
echo "prefix=/usr"; \
|
|
|
|
echo "exec_prefix=/usr/bin"; \
|
|
|
|
echo "libdir=/usr/lib"; \
|
|
|
|
echo "includedir=/usr/include/nss"; \
|
|
|
|
echo; \
|
|
|
|
echo "Name: NSS"; \
|
2009-10-13 00:56:40 +02:00
|
|
|
echo "Description: Mozilla Network Security Services"; \
|
|
|
|
echo "Version: ${version}"; \
|
2009-12-21 22:48:38 +01:00
|
|
|
echo "Requires: nspr >= ${version}"; \
|
|
|
|
echo "Cflags: -I${includedir}"; \
|
|
|
|
echo "Libs: -lnss3 -lsmime3 -lssl3 -lnssutil3 -lsoftokn3 -lpthread -ldl"; \
|
2009-10-13 00:56:40 +02:00
|
|
|
) >${DESTDIR}/usr/lib/pkgconfig/nss.pc
|
2009-12-21 19:11:22 +01:00
|
|
|
chmod 644 ${DESTDIR}/usr/lib/pkgconfig/nss.pc || return 1
|
|
|
|
cd ${DESTDIR}/usr/lib/pkgconfig && ln -s nss.pc mozilla-nss.pc \
|
|
|
|
|| return 1
|
2009-12-21 22:48:38 +01:00
|
|
|
|
|
|
|
cd ${wrksrc} || return 1
|
|
|
|
mkdir -p ${DESTDIR}/usr/bin || return 1
|
|
|
|
|
|
|
|
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}')
|
|
|
|
sed "${FILESDIR}/nss-config.in" \
|
|
|
|
-e "s,@MOD_MAJOR_VERSION@,${NSS_VMAJOR},g" \
|
|
|
|
-e "s,@MOD_MINOR_VERSION@,${NSS_VMINOR},g" \
|
|
|
|
-e "s,@MOD_PATCH_VERSION@,${NSS_VPATCH},g" \
|
|
|
|
> "${DESTDIR}/usr/bin/nss-config" || return 1
|
|
|
|
chmod 755 "${DESTDIR}/usr/bin/nss-config" || return 1
|
2009-10-13 00:56:40 +02:00
|
|
|
}
|