From 245af989b8ec4e894880eeaaff93f08e155d4633 Mon Sep 17 00:00:00 2001 From: Christopher Aillon Date: Thu, 15 Dec 2005 19:35:41 +0000 Subject: [PATCH] auto-import nss-3.11-0 on branch devel from nss-3.11-0.src.rpm --- .cvsignore | 1 + nss-config.in | 137 ++++++++++++++++++++++ nss.pc.in | 10 ++ nss.spec | 311 ++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 460 insertions(+) create mode 100644 nss-config.in create mode 100644 nss.pc.in create mode 100644 nss.spec diff --git a/.cvsignore b/.cvsignore index e69de29..008f082 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +nss-3.11.cvs.tar.bz2 diff --git a/nss-config.in b/nss-config.in new file mode 100644 index 0000000..cae5363 --- /dev/null +++ b/nss-config.in @@ -0,0 +1,137 @@ +#!/bin/sh + +prefix=@prefix@ + +major_version=@MOD_MAJOR_VERSION@ +minor_version=@MOD_MINOR_VERSION@ +patch_version=@MOD_PATCH_VERSION@ + +usage() +{ + cat <&2 +fi + +lib_ssl=yes +lib_smime=yes +lib_nss=yes + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + ;; + --prefix) + echo_prefix=yes + ;; + --exec-prefix=*) + exec_prefix=$optarg + ;; + --exec-prefix) + echo_exec_prefix=yes + ;; + --includedir=*) + includedir=$optarg + ;; + --includedir) + echo_includedir=yes + ;; + --libdir=*) + libdir=$optarg + ;; + --libdir) + echo_libdir=yes + ;; + --version) + echo ${major_version}.${minor_version}.${patch_version} + ;; + --cflags) + echo_cflags=yes + ;; + --libs) + echo_libs=yes + ;; + ssl) + lib_ssl=yes + ;; + smime) + lib_smime=yes + ;; + nss) + lib_nss=yes + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +# Set variables that may be dependent upon other variables +if test -z "$exec_prefix"; then + exec_prefix=@exec_prefix@ +fi +if test -z "$includedir"; then + includedir=@includedir@ +fi +if test -z "$libdir"; then + libdir=@libdir@ +fi + +if test "$echo_prefix" = "yes"; then + echo $prefix +fi + +if test "$echo_exec_prefix" = "yes"; then + echo $exec_prefix +fi + +if test "$echo_includedir" = "yes"; then + echo $includedir +fi + +if test "$echo_libdir" = "yes"; then + echo $libdir +fi + +if test "$echo_cflags" = "yes"; then + echo -I$includedir +fi + +if test "$echo_libs" = "yes"; then + libdirs="-Wl,-rpath-link,$libdir -L$libdir" + if test -n "$lib_ssl"; then + libdirs="$libdirs -lssl${major_version}" + fi + if test -n "$lib_smime"; then + libdirs="$libdirs -lsmime${major_version}" + fi + if test -n "$lib_nss"; then + libdirs="$libdirs -lnss${major_version}" + fi + echo $libdirs +fi + diff --git a/nss.pc.in b/nss.pc.in new file mode 100644 index 0000000..2955e73 --- /dev/null +++ b/nss.pc.in @@ -0,0 +1,10 @@ +prefix=%prefix% +exec_prefix=%exec_prefix% +libdir=%libdir% +includedir=%includedir% + +Name: NSS +Description: Network Security Services +Version: %NSS_VERSION% +Libs: -lssl3 -lsmime3 -lnss3 +Cflags: -I${includedir} diff --git a/nss.spec b/nss.spec new file mode 100644 index 0000000..174b664 --- /dev/null +++ b/nss.spec @@ -0,0 +1,311 @@ +%define nspr_version 4.6 + +Summary: Network Security Services +Name: nss +Version: 3.11 +Release: 0 +License: MPL/GPL/LGPL +URL: http://www.mozilla.org/projects/security/pki/nss/ +Group: System Environment/Libraries +Requires: nspr >= %{nspr_version} +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: nspr-devel >= %{nspr_version} +BuildRequires: pkgconfig +BuildRequires: gawk +Provides: mozilla-nss +Obsoletes: mozilla-nss + +Source0: %{name}-%{version}.cvs.tar.bz2 +Source1: nss.pc.in +Source2: nss-config.in + + +%description +Network Security Services (NSS) is a set of libraries designed to +support cross-platform development of security-enabled client and +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. + + +%package tools +Summary: Tools for the Network Security Services +Group: System Environment/Base +Requires: nss = %{version}-%{release} + +%description tools +Network Security Services (NSS) is a set of libraries designed to +support cross-platform development of security-enabled client and +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. + +Install the nss-tools package if you need command-line tools to +manipulate the NSS certificate and key database. + + +%package devel +Summary: Development libraries for Network Security Services +Group: Development/Libraries +Requires: nss = %{version}-%{release} +Requires: nspr-devel >= %{nspr_version} +Provides: mozilla-nss-devel +Obsoletes: mozilla-nss-devel + +%description devel +Header and Library files for doing development with Network Security Services. + + +%package pkcs11-devel +Summary: Development libraries for PKCS #11 (Cryptoki) using NSS +Group: Development/Libraries +Requires: nss-devel = %{version}-%{release} + +%description pkcs11-devel +Library files for developing PKCS #11 modules using basic NSS +low level services. + + +%prep +%setup -q + +%build + +# Enable compiler optimizations and disable debugging code +BUILD_OPT=1 +export BUILD_OPT + +# Generate symbolic info for debuggers +XCFLAGS=$RPM_OPT_FLAGS +export XCFLAGS + +#export NSPR_INCLUDE_DIR=`nspr-config --includedir` +#export NSPR_LIB_DIR=`nspr-config --libdir` + +PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 +PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 + +export PKG_CONFIG_ALLOW_SYSTEM_LIBS +export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS + +NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nspr | sed 's/-I//'` +NSPR_LIB_DIR=`/usr/bin/pkg-config --libs-only-L nspr | sed 's/-L//'` + +export NSPR_INCLUDE_DIR +export NSPR_LIB_DIR + +%ifarch x86_64 ppc64 ia64 s390x +USE_64=1 +export USE_64 +%endif + +%{__make} -C ./mozilla/security/coreconf +%{__make} -C ./mozilla/security/dbm +%{__make} -C ./mozilla/security/nss + +# Set up our package file +%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig +%{__cat} %{SOURCE1} | sed -e "s,%%libdir%%,%{_libdir},g" \ + -e "s,%%prefix%%,%{_prefix},g" \ + -e "s,%%exec_prefix%%,%{_prefix},g" \ + -e "s,%%includedir%%,%{_includedir}/nss3,g" \ + -e "s,%%NSS_VERSION%%,%{version},g" > \ + $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/nss.pc + +NSS_VMAJOR=`cat mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMAJOR" | awk '{print $3}'` +NSS_VMINOR=`cat mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMINOR" | awk '{print $3}'` +NSS_VPATCH=`cat mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VPATCH" | awk '{print $3}'` + +export NSS_VMAJOR +export NSS_VMINOR +export NSS_VPATCH + +%{__mkdir_p} $RPM_BUILD_ROOT/%{_bindir} +%{__cat} %{SOURCE2} | sed -e "s,@libdir@,%{_libdir},g" \ + -e "s,@prefix@,%{_prefix},g" \ + -e "s,@exec_prefix@,%{_prefix},g" \ + -e "s,@includedir@,%{_includedir}/nss3,g" \ + -e "s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g" \ + -e "s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g" \ + -e "s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g" \ + > $RPM_BUILD_ROOT/%{_bindir}/nss-config + +chmod 755 $RPM_BUILD_ROOT/%{_bindir}/nss-config + + +%install + +# There is no make install target so we'll do it ourselves. + +%{__mkdir_p} $RPM_BUILD_ROOT/%{_includedir}/nss3 +%{__mkdir_p} $RPM_BUILD_ROOT/%{_bindir} +%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir} + +# Copy the binary libraries we want +for file in libnss3.so libssl3.so libsmime3.so libsoftokn3.so libsoftokn3.chk libnssckbi.so libfreebl3.so libfreebl3.chk +do + %{__install} -m 644 mozilla/dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir} +done + +# Copy the development libraries we want +for file in libcrmf.a libnssb.a libnssckfw.a +do + %{__install} -m 644 mozilla/dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir} +done + +# Copy the binaries we want +for file in certutil modutil pk12util signtool ssltap +do + %{__install} -m 755 mozilla/dist/*.OBJ/bin/$file $RPM_BUILD_ROOT/%{_bindir} +done + +# Copy the include files +for file in mozilla/dist/public/nss/*.h +do + %{__install} -m 644 $file $RPM_BUILD_ROOT/%{_includedir}/nss3 +done + + +%clean +%{__rm} -rf $RPM_BUILD_ROOT + + +%post +/sbin/ldconfig >/dev/null 2>/dev/null + + +%postun +/sbin/ldconfig >/dev/null 2>/dev/null + + +%files +%defattr(-,root,root) +%{_libdir}/libnss3.so +%{_libdir}/libssl3.so +%{_libdir}/libsmime3.so +%{_libdir}/libsoftokn3.so +%{_libdir}/libsoftokn3.chk +%{_libdir}/libnssckbi.so +%{_libdir}/libfreebl3.so +%{_libdir}/libfreebl3.chk + + +%files tools +%defattr(-,root,root) +%{_bindir}/certutil +%{_bindir}/modutil +%{_bindir}/pk12util +%{_bindir}/signtool +%{_bindir}/ssltap + + +%files devel +%defattr(-,root,root) +%{_libdir}/libcrmf.a +%{_libdir}/pkgconfig/nss.pc +%{_bindir}/nss-config + +%dir %{_includedir}/nss3 +%{_includedir}/nss3/base64.h +%{_includedir}/nss3/blapit.h +%{_includedir}/nss3/cert.h +%{_includedir}/nss3/certdb.h +%{_includedir}/nss3/certt.h +%{_includedir}/nss3/ciferfam.h +%{_includedir}/nss3/cmmf.h +%{_includedir}/nss3/cmmft.h +%{_includedir}/nss3/cms.h +%{_includedir}/nss3/cmsreclist.h +%{_includedir}/nss3/cmst.h +%{_includedir}/nss3/crmf.h +%{_includedir}/nss3/crmft.h +%{_includedir}/nss3/cryptohi.h +%{_includedir}/nss3/cryptoht.h +%{_includedir}/nss3/ecl-exp.h +%{_includedir}/nss3/hasht.h +%{_includedir}/nss3/jar-ds.h +%{_includedir}/nss3/jar.h +%{_includedir}/nss3/jarfile.h +%{_includedir}/nss3/key.h +%{_includedir}/nss3/keyhi.h +%{_includedir}/nss3/keyt.h +%{_includedir}/nss3/keythi.h +%{_includedir}/nss3/nss.h +%{_includedir}/nss3/nssb64.h +%{_includedir}/nss3/nssb64t.h +%{_includedir}/nss3/nssilckt.h +%{_includedir}/nss3/nssilock.h +%{_includedir}/nss3/nsslocks.h +%{_includedir}/nss3/nssrwlk.h +%{_includedir}/nss3/nssrwlkt.h +%{_includedir}/nss3/ocsp.h +%{_includedir}/nss3/ocspt.h +%{_includedir}/nss3/p12.h +%{_includedir}/nss3/p12plcy.h +%{_includedir}/nss3/p12t.h +%{_includedir}/nss3/pk11func.h +%{_includedir}/nss3/pk11pqg.h +%{_includedir}/nss3/pk11priv.h +%{_includedir}/nss3/pk11pub.h +%{_includedir}/nss3/pk11sdr.h +%{_includedir}/nss3/pkcs11.h +%{_includedir}/nss3/pkcs11f.h +%{_includedir}/nss3/pkcs11n.h +%{_includedir}/nss3/pkcs11p.h +%{_includedir}/nss3/pkcs11t.h +%{_includedir}/nss3/pkcs11u.h +%{_includedir}/nss3/pkcs12.h +%{_includedir}/nss3/pkcs12t.h +%{_includedir}/nss3/pkcs7t.h +%{_includedir}/nss3/portreg.h +%{_includedir}/nss3/preenc.h +%{_includedir}/nss3/secasn1.h +%{_includedir}/nss3/secasn1t.h +%{_includedir}/nss3/seccomon.h +%{_includedir}/nss3/secder.h +%{_includedir}/nss3/secdert.h +%{_includedir}/nss3/secdig.h +%{_includedir}/nss3/secdigt.h +%{_includedir}/nss3/secerr.h +%{_includedir}/nss3/sechash.h +%{_includedir}/nss3/secitem.h +%{_includedir}/nss3/secmime.h +%{_includedir}/nss3/secmod.h +%{_includedir}/nss3/secmodt.h +%{_includedir}/nss3/secoid.h +%{_includedir}/nss3/secoidt.h +%{_includedir}/nss3/secpkcs5.h +%{_includedir}/nss3/secpkcs7.h +%{_includedir}/nss3/secport.h +%{_includedir}/nss3/shsign.h +%{_includedir}/nss3/smime.h +%{_includedir}/nss3/ssl.h +%{_includedir}/nss3/sslerr.h +%{_includedir}/nss3/sslproto.h +%{_includedir}/nss3/sslt.h +%{_includedir}/nss3/watcomfx.h + + +%files pkcs11-devel +%defattr(-, root, root) +%{_includedir}/nss3/nssck*.h +%{_includedir}/nss3/nssbase.h +%{_includedir}/nss3/nssbaset.h +%{_libdir}/libnssb.a +%{_libdir}/libnssckfw.a + + +%changelog +* Thu Dec 15 2005 Christopher Aillon 3.11-0.cvs +- Initial import into Fedora Core, based on a CVS snapshot of + the NSS_3_11_RTM tag +- Fix up the pkcs11-devel subpackage to contain the proper headers +- Build with RPM_OPT_FLAGS +- No need to have rpath of /usr/lib in the pc file + +* Thu Dec 15 2005 Kai Engert +- Adressed review comments by Wan-Teh Chang, Bob Relyea, + Christopher Aillon. + +* Tue Jul 9 2005 Rob Crittenden 3.10-1 +- Initial build diff --git a/sources b/sources index e69de29..a04d540 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +d91bcfe3355d826c4d823c590491a4ca nss-3.11.cvs.tar.bz2