2009-10-13 00:56:40 +02:00
|
|
|
# Template file for 'nss'
|
|
|
|
pkgname=nss
|
2014-10-15 19:30:35 +02:00
|
|
|
version=3.17.2
|
2014-02-04 18:27:15 +01:00
|
|
|
revision=1
|
2013-04-14 04:36:19 +02:00
|
|
|
hostmakedepends="perl"
|
2014-09-25 08:14:41 +02:00
|
|
|
makedepends="zlib-devel nspr-devel>=4.10.7 sqlite-devel"
|
|
|
|
depends="nspr>=4.10.7"
|
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"
|
2014-07-22 15:54:51 +02:00
|
|
|
distfiles="${MOZILLA_SITE}/security/nss/releases/NSS_${version//\./_}_RTM/src/nss-${version}.tar.gz"
|
2014-10-15 19:30:35 +02:00
|
|
|
checksum=134929e44e44b968a4883f4ee513a71ae45d55b486cee41ee8e26c3cc84dab8b
|
2009-10-13 00:56:40 +02:00
|
|
|
|
2011-12-20 13:39:11 +01:00
|
|
|
do_build() {
|
|
|
|
# Respect LDFLAGS
|
2013-08-07 11:06:23 +02:00
|
|
|
sed -e 's/\$(MKSHLIB) -o/\$(MKSHLIB) \$(LDFLAGS) -o/g' -i nss/coreconf/rules.mk
|
|
|
|
|
|
|
|
export LIBRUNPATH=
|
|
|
|
export BUILD_OPT=1
|
|
|
|
export NSS_USE_SYSTEM_SQLITE=1
|
|
|
|
export NSS_ENABLE_ECC=1
|
2011-12-20 13:39:11 +01:00
|
|
|
|
2011-11-08 11:56:17 +01:00
|
|
|
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
2014-01-23 22:46:47 +01:00
|
|
|
_use64="USE_64=1"
|
2009-10-13 00:56:40 +02:00
|
|
|
fi
|
2013-08-07 11:06:23 +02:00
|
|
|
|
|
|
|
cd nss
|
2014-01-23 22:46:47 +01:00
|
|
|
# Build nsinstall for host.
|
|
|
|
make ${_use64} -C coreconf
|
|
|
|
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
arm*) _ARCH="arm";;
|
|
|
|
mips*) _ARCH="mips";;
|
|
|
|
*) msg_error "$pkgver: unknown target machine\n";;
|
|
|
|
esac
|
|
|
|
# ... and then copy it to $wrksrc.
|
|
|
|
find ${wrksrc} -type f -name nsinstall -exec cp {} ${wrksrc} \;
|
|
|
|
make clean
|
|
|
|
|
|
|
|
export NSPR_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include/nspr
|
|
|
|
export NSPR_LIB_DIR=${XBPS_CROSS_BASE}/usr/lib
|
|
|
|
export XCFLAGS="${CFLAGS}"
|
|
|
|
|
|
|
|
make CROSS_COMPILE=1 OS_TEST="${_ARCH}" NSINSTALL="${wrksrc}/nsinstall" \
|
|
|
|
CC="$CC" CCC="$CXX" RANLIB="$RANLIB" -C lib/dbm
|
|
|
|
make CROSS_COMPILE=1 OS_TEST="${_ARCH}" NSINSTALL="${wrksrc}/nsinstall" \
|
|
|
|
CC="$CC" CCC="$CXX" RANLIB="$RANLIB"
|
|
|
|
else
|
|
|
|
# native build
|
|
|
|
export NSPR_INCLUDE_DIR=/usr/include/nspr
|
|
|
|
export NSPR_LIB_DIR=/usr/lib
|
|
|
|
export XCFLAGS="${CFLAGS}"
|
|
|
|
|
|
|
|
make ${_use64} -C lib/dbm
|
|
|
|
make ${_use64}
|
|
|
|
fi
|
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
|
|
|
|
2013-08-07 11:06:23 +02:00
|
|
|
NSS_VMAJOR=$(grep "#define.*NSS_VMAJOR" nss/lib/nss/nss.h | awk '{print $3}')
|
|
|
|
NSS_VMINOR=$(grep "#define.*NSS_VMINOR" nss/lib/nss/nss.h | awk '{print $3}')
|
|
|
|
NSS_VPATCH=$(grep "#define.*NSS_VPATCH" 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
|
2013-08-07 11:06:23 +02:00
|
|
|
install -m755 dist/*.OBJ/lib/${f} ${DESTDIR}/usr/lib
|
2011-12-20 13:39:11 +01:00
|
|
|
done
|
|
|
|
|
2013-08-07 11:06:23 +02:00
|
|
|
install -m644 dist/*.OBJ/lib/libcrmf.a ${DESTDIR}/usr/lib
|
2011-12-20 13:39:11 +01:00
|
|
|
|
|
|
|
for f in certutil cmsutil crlutil modutil pk12util shlibsign \
|
|
|
|
signtool signver ssltap; do
|
2013-08-07 11:06:23 +02:00
|
|
|
install -m755 dist/*.OBJ/bin/${f} ${DESTDIR}/usr/bin
|
2011-12-20 13:39:11 +01:00
|
|
|
done
|
|
|
|
|
2013-08-07 11:06:23 +02:00
|
|
|
install -m644 dist/public/nss/*.h ${DESTDIR}/usr/include/nss
|
2009-10-13 00:56:40 +02:00
|
|
|
}
|
2013-04-14 04:36:19 +02:00
|
|
|
|
|
|
|
nss-devel_package() {
|
2013-11-15 08:42:01 +01:00
|
|
|
depends="nspr-devel>=4.10 nss>=${version}_${revision}"
|
2013-05-14 21:32:49 +02:00
|
|
|
short_desc+=" - development files"
|
2013-04-14 04:36:19 +02:00
|
|
|
pkg_install() {
|
|
|
|
vmove usr/bin/nss-config
|
|
|
|
vmove usr/lib/pkgconfig
|
|
|
|
vmove usr/include
|
2013-08-07 11:06:23 +02:00
|
|
|
vmove "usr/lib/*.a"
|
2013-04-14 04:36:19 +02:00
|
|
|
}
|
|
|
|
}
|