X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=nss%2Fnss.nm;h=af0a2cfef424393813097a278b74d69571a1ebfc;hb=20df70587f962aa6fb972267c14f164508f97887;hp=8ccc9b6a1f693e8ebe0c34e82cf0cb1b73cac360;hpb=e84b24e82329d16ca18bff7966d4f02d997bc965;p=people%2Fms%2Fipfire-3.x.git diff --git a/nss/nss.nm b/nss/nss.nm index 8ccc9b6a1..af0a2cfef 100644 --- a/nss/nss.nm +++ b/nss/nss.nm @@ -4,9 +4,13 @@ ############################################################################### name = nss -version = 3.12.8 -release = 3 +ver_major = 3 +ver_minor = 13 +ver_patch = 1 +version = %{ver_major}.%{ver_minor}.%{ver_patch} +release = 4 +maintainer = Stefan Schantl groups = System/Libraries url = http://www.mozilla.org/projects/security/pki/nss/ license = MPLv1.1 or GPLv2+ or LGPLv2+ @@ -20,17 +24,15 @@ description v3 certificates, and other security standards. end -source_dl = -sources - %{thisapp}-stripped.tar.bz2 +sources += \ %{name}-pem-20100809.tar.bz2 -end + +source_dl = ftp://ftp.mozilla.org/pub/security/nss/releases/NSS_%{ver_major}_%{ver_minor}_%{ver_patch}_RTM/src/ build requires + chrpath nspr-devel - nss-softokn-devel - nss-util-devel perl pkg-config psmisc @@ -46,29 +48,33 @@ build export BUILD_OPT=1 export XCFLAGS=%{CFLAGS} + # Allow the usage of system libraries. export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 + # Define where to find nspr header files and libraries. export NSPR_INCLUDE_DIR=/usr/include/nspr4 - export NSPR_LIB_DIR=/usr/lib + export NSPR_LIB_DIR=%{libdir} - export NSS_INCLUDE_DIR=/usr/include/nss3 - export NSS_LIB_DIR=/usr/lib + # Disable support for SHA224. + export NO_SHA224_AVAILABLE=1 + # Use sqlite from system. export NSS_USE_SYSTEM_SQLITE=1 + if "%{DISTRO_ARCH}" == "x86_64" + export USE_64=1 + end + prepare - # Extract tarball - cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}-stripped.tar.bz2 + # Extract tarball. + cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}.tar.gz - # Extract tarball into nss directory. + # Extract pem tarball into nss directory. cd %{DIR_APP} && %{MACRO_EXTRACT} %{DIR_DL}/%{name}-pem-20100809.tar.bz2 - + # Apply all patches %{MACRO_PATCHES} - - cp -vf %{DIR_SOURCE}/PayPalEE.cert \ - %{DIR_APP}/mozilla/security/nss/tests/libpkix/certs end build @@ -78,23 +84,35 @@ build end install + # We have to do the complete install stuff self. + + # Create directory layout. mkdir -pv %{BUILDROOT}/usr/include/nss3 - mkdir -pv %{BUILDROOT}/usr/{bin,lib} - mkdir -pv %{BUILDROOT}/usr/lib/pkgconfig - mkdir -pv %{BUILDROOT}/usr/lib/nss/unsupported-tools - - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnss3.so \ - %{BUILDROOT}/usr/lib - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnssckbi.so \ - %{BUILDROOT}/usr/lib - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnsspem.so \ - %{BUILDROOT}/usr/lib - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnsssysinit.so \ - %{BUILDROOT}/usr/lib - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libsmime3.so \ - %{BUILDROOT}/usr/lib - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libssl3.so \ - %{BUILDROOT}/usr/lib + mkdir -pv %{BUILDROOT}/usr/{bin,%{lib}} + mkdir -pv %{BUILDROOT}%{libdir}/pkgconfig + mkdir -pv %{BUILDROOT}%{libdir}/nss/unsupported-tools + + # Install all libraries. + install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnss3.so \ + %{BUILDROOT}%{libdir} + install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnssckbi.so \ + %{BUILDROOT}%{libdir} + install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnsspem.so \ + %{BUILDROOT}%{libdir} + install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnsssysinit.so \ + %{BUILDROOT}%{libdir} + install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnssutil3.so \ + %{BUILDROOT}%{libdir} + install -p -v -m 755 mozilla/dist/*.OBJ/lib/libsmime3.so \ + %{BUILDROOT}%{libdir} + install -p -v -m 755 mozilla/dist/*.OBJ/lib/libssl3.so \ + %{BUILDROOT}%{libdir} + install -p -v -m 755 mozilla/dist/*.OBJ/lib/libsoftokn3.so \ + %{BUILDROOT}%{libdir} + install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnssdbm3.so \ + %{BUILDROOT}%{libdir} + install -p -v -m 755 mozilla/dist/*.OBJ/lib/libfreebl3.so \ + %{BUILDROOT}/%{libdir} # Install the empty NSS db files mkdir -pv %{BUILDROOT}/etc/pki/nssdb @@ -103,106 +121,63 @@ build %{BUILDROOT}/etc/pki/nssdb/pkcs11.txt # Copy the binaries we want - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/certutil %{BUILDROOT}/usr/bin - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/cmsutil %{BUILDROOT}/usr/bin - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/crlutil %{BUILDROOT}/usr/bin - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/modutil %{BUILDROOT}/usr/bin - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/pk12util %{BUILDROOT}/usr/bin - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/signtool %{BUILDROOT}/usr/bin - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/signver %{BUILDROOT}/usr/bin - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/ssltap %{BUILDROOT}/usr/bin + install -p -v -m 755 mozilla/dist/*.OBJ/bin/certutil %{BUILDROOT}/usr/bin + install -p -v -m 755 mozilla/dist/*.OBJ/bin/cmsutil %{BUILDROOT}/usr/bin + install -p -v -m 755 mozilla/dist/*.OBJ/bin/crlutil %{BUILDROOT}/usr/bin + install -p -v -m 755 mozilla/dist/*.OBJ/bin/modutil %{BUILDROOT}/usr/bin + install -p -v -m 755 mozilla/dist/*.OBJ/bin/pk12util %{BUILDROOT}/usr/bin + install -p -v -m 755 mozilla/dist/*.OBJ/bin/signtool %{BUILDROOT}/usr/bin + install -p -v -m 755 mozilla/dist/*.OBJ/bin/signver %{BUILDROOT}/usr/bin + install -p -v -m 755 mozilla/dist/*.OBJ/bin/ssltap %{BUILDROOT}/usr/bin + chrpath --delete %{BUILDROOT}/usr/bin/* # Copy the binaries we ship as unsupported - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/atob %{BUILDROOT}/usr/lib/nss/unsupported-tools - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/btoa %{BUILDROOT}/usr/lib/nss/unsupported-tools - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/derdump %{BUILDROOT}/usr/lib/nss/unsupported-tools - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/ocspclnt %{BUILDROOT}/usr/lib/nss/unsupported-tools - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/pp %{BUILDROOT}/usr/lib/nss/unsupported-tools - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/selfserv %{BUILDROOT}/usr/lib/nss/unsupported-tools - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/strsclnt %{BUILDROOT}/usr/lib/nss/unsupported-tools - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/symkeyutil %{BUILDROOT}/usr/lib/nss/unsupported-tools - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/tstclnt %{BUILDROOT}/usr/lib/nss/unsupported-tools - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/vfyserv %{BUILDROOT}/usr/lib/nss/unsupported-tools - install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/vfychain %{BUILDROOT}/usr/lib/nss/unsupported-tools - - sed -e "s,@libdir@,/usr/lib,g" \ - -e "s,@prefix@,/usr,g" \ - -e "s,@exec_prefix@,/usr,g" \ - -e "s,@includedir@,/usr/include/nss3,g" \ - -e "s,@MOD_MAJOR_VERSION@,$(grep "#define.*NSS_VMAJOR" %{DIR_APP}/mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \ - -e "s,@MOD_MINOR_VERSION@,$(grep "#define.*NSS_VMINOR" %{DIR_APP}/mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \ - -e "s,@MOD_PATCH_VERSION@,$(grep "#define.*NSS_VPATCH" %{DIR_APP}/mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \ - < %{DIR_SOURCE}/nss-config.in \ - > %{BUILDROOT}/usr/bin/nss-config - chmod -v 755 %{BUILDROOT}/usr/bin/nss-config + install -p -v -m 755 mozilla/dist/*.OBJ/bin/atob %{BUILDROOT}%{libdir}/nss/unsupported-tools + install -p -v -m 755 mozilla/dist/*.OBJ/bin/btoa %{BUILDROOT}%{libdir}/nss/unsupported-tools + install -p -v -m 755 mozilla/dist/*.OBJ/bin/derdump %{BUILDROOT}%{libdir}/nss/unsupported-tools + install -p -v -m 755 mozilla/dist/*.OBJ/bin/ocspclnt %{BUILDROOT}%{libdir}/nss/unsupported-tools + install -p -v -m 755 mozilla/dist/*.OBJ/bin/pp %{BUILDROOT}%{libdir}/nss/unsupported-tools + install -p -v -m 755 mozilla/dist/*.OBJ/bin/selfserv %{BUILDROOT}%{libdir}/nss/unsupported-tools + install -p -v -m 755 mozilla/dist/*.OBJ/bin/shlibsign %{BUILDROOT}%{libdir}/nss/unsupported-tools + install -p -v -m 755 mozilla/dist/*.OBJ/bin/strsclnt %{BUILDROOT}%{libdir}/nss/unsupported-tools + install -p -v -m 755 mozilla/dist/*.OBJ/bin/symkeyutil %{BUILDROOT}%{libdir}/nss/unsupported-tools + install -p -v -m 755 mozilla/dist/*.OBJ/bin/tstclnt %{BUILDROOT}%{libdir}/nss/unsupported-tools + install -p -v -m 755 mozilla/dist/*.OBJ/bin/vfyserv %{BUILDROOT}%{libdir}/nss/unsupported-tools + install -p -v -m 755 mozilla/dist/*.OBJ/bin/vfychain %{BUILDROOT}%{libdir}/nss/unsupported-tools + chrpath --delete %{BUILDROOT}%{libdir}/nss/unsupported-tools/* + + for file in nss-config nss-util-config; do + sed -e "s,@libdir@,%{libdir},g" \ + -e "s,@prefix@,/usr,g" \ + -e "s,@exec_prefix@,/usr,g" \ + -e "s,@includedir@,/usr/include/nss3,g" \ + -e "s,@MOD_MAJOR_VERSION@,$(grep "#define.*NSS_VMAJOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \ + -e "s,@MOD_MINOR_VERSION@,$(grep "#define.*NSS_VMINOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \ + -e "s,@MOD_PATCH_VERSION@,$(grep "#define.*NSS_VPATCH" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \ + < %{DIR_SOURCE}/${file}.in \ + > %{BUILDROOT}/usr/bin/${file} + chmod -v 755 %{BUILDROOT}/usr/bin/${file} + done install -p -v -m 755 %{DIR_SOURCE}/setup-nsssysinit.sh %{BUILDROOT}/usr/bin - # Set up our package file - # The nspr_version and nss_{util|softokn}_version globals used - # here match the ones nss has for its Requires. - - # XXX need to fix this - sed \ - -e "s,%libdir%,/usr/lib,g" \ - -e "s,%prefix%,/usr,g" \ - -e "s,%exec_prefix%,/usr,g" \ - -e "s,%includedir%,/usr/include/nss3,g" \ - -e "s,%NSS_VERSION%,%{version},g" \ - -e "s,%NSPR_VERSION%,$(nspr-config --version),g" \ - -e "s,%NSSUTIL_VERSION%,$(nss-util-config --version),g" \ - -e "s,%SOFTOKEN_VERSION%,$(nss-softokn-config --version),g" \ - < %{DIR_SOURCE}/nss.pc.in \ - > %{BUILDROOT}/usr/lib/pkgconfig/nss.pc + # Generate file for pkg-config. + for file in nss.pc nss-util.pc; do + sed \ + -e "s,%libdir%,%{libdir},g" \ + -e "s,%prefix%,/usr,g" \ + -e "s,%exec_prefix%,/usr,g" \ + -e "s,%includedir%,/usr/include/nss3,g" \ + -e "s,%NSS_VERSION%,%{version},g" \ + -e "s,%NSPR_VERSION%,$(nspr-config --version),g" \ + < %{DIR_SOURCE}/${file}.in \ + > %{BUILDROOT}%{libdir}/pkgconfig/${file} + done # Copy the include files we want - cp -vf %{DIR_APP}/mozilla/dist/public/nss/*.h %{BUILDROOT}/usr/include/nss3 + cp -vf mozilla/dist/public/nss/*.h %{BUILDROOT}/usr/include/nss3 + cp -vf mozilla/dist/private/nss/blapi.h %{BUILDROOT}/usr/include/nss3 chmod -v 644 %{BUILDROOT}/usr/include/nss3/*.h - - # remove the nss-util-devel headers - cd %{BUILDROOT}/usr/include/nss3 && rm -vf \ - base64.h \ - ciferfam.h \ - nssb64.h \ - nssb64t.h \ - nsslocks.h \ - nssilock.h \ - nssilckt.h \ - nssrwlk.h \ - nssrwlkt.h \ - nssutil.h \ - pkcs11{,f,n,p,t,u}.h \ - portreg.h \ - secasn1.h \ - secasn1t.h \ - seccomon.h \ - secder.h \ - secdert.h \ - secdig.h \ - secdigt.h \ - secerr.h \ - secitem.h \ - secoid.h \ - secoidt.h \ - secport.h \ - utilrename.h - - # remove header shipped in nss-softokn-devel - cd %{BUILDROOT}/usr/include/nss3 && rm -vf \ - blapit.h \ - ecl-exp.h \ - hasht.h \ - sechash.h \ - secmodt.h \ - shsign.h \ - nsslowhash.h - end -end - -# XXX need to be removed -quality-agent - whitelist_rpath - $ORIGIN/../lib end end @@ -212,8 +187,13 @@ packages package %{name}-libs template LIBS + requires + nss-softokn=%{thisver} + nss-softokn-freebl=%{thisver} + end + files - /usr/lib/*.so + %{libdir}/*.so end end @@ -222,16 +202,62 @@ packages requires nspr-devel - %{name} - nss-softokn-devel - nss-util-devel + nss=%{thisver} + end + + provides + nss-util-devel = %{thisver} end # Mozilla does no versioning :( files /usr/bin/*-config /usr/include - /usr/lib/pkgconfig + %{libdir}/pkgconfig + end + end + + package %{name}-softokn + summary = Network Security Services Softoken Module. + description + Network Security Services Softoken Cryptographic Module. end + + requires = nss=%{thisver} + + files + %{libdir}/libnssdbm3.so + %{libdir}/libsoftokn3.so + %{libdir}/nss/unsupported-tools/shlibsign + end + end + + package %{name}-softokn-freebl + summary = Freebl library for the Network Security Services. + description + NSS Softoken Cryptographic Module Freelb Library. + end + + requires + nss=%{thisver} + nss-softokn=%{thisver} + end + + files = %{libdir}/libfreebl3.so + end + + package %{name}-util + summary = Network Security Services Utilities Library. + description + Utilities for Network Security Services and the Softoken module. + end + + requires = nss=%{thisver} + + files = %{libdir}/libnssutil3.so + end + + package %{name}-debuginfo + template DEBUGINFO end end