| 1 | %global nspr_version 4.8.6 | 
|---|
| 2 | %global nss_util_version 3.12.8 | 
|---|
| 3 | %global nss_softokn_version 3.12.8 | 
|---|
| 4 | %global unsupported_tools_directory %{_libdir}/nss/unsupported-tools | 
|---|
| 5 |  | 
|---|
| 6 | Summary:          Network Security Services | 
|---|
| 7 | Name:             nss | 
|---|
| 8 | Version:          3.12.8 | 
|---|
| 9 | Release:          3%{?dist} | 
|---|
| 10 | License:          MPLv1.1 or GPLv2+ or LGPLv2+ | 
|---|
| 11 | URL:              http://www.mozilla.org/projects/security/pki/nss/ | 
|---|
| 12 | Group:            System Environment/Libraries | 
|---|
| 13 | Requires:         nspr >= %{nspr_version} | 
|---|
| 14 | Requires:         nss-util >= %{nss_util_version} | 
|---|
| 15 | Requires:         nss-softokn%{_isa} >= %{nss_softokn_version} | 
|---|
| 16 | #Requires:         nss-system-init | 
|---|
| 17 | BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | 
|---|
| 18 | BuildRequires:    nspr-devel >= %{nspr_version} | 
|---|
| 19 | #BuildRequires:    nss-softokn-devel >= %{nss_softokn_version} | 
|---|
| 20 | #BuildRequires:    nss-util-devel >= %{nss_util_version} | 
|---|
| 21 | BuildRequires:    sqlite-devel | 
|---|
| 22 | BuildRequires:    zlib-devel | 
|---|
| 23 | BuildRequires:    pkgconfig | 
|---|
| 24 | #BuildRequires:    gawk | 
|---|
| 25 | #BuildRequires:    psmisc | 
|---|
| 26 | #BuildRequires:    perl | 
|---|
| 27 |  | 
|---|
| 28 | Source0:          %{name}-%{version}.tar.gz | 
|---|
| 29 |  | 
|---|
| 30 | Source1:          nss.pc.in | 
|---|
| 31 | Source2:          nss-config.in | 
|---|
| 32 |  | 
|---|
| 33 | #Source3:          blank-cert8.db | 
|---|
| 34 | #Source4:          blank-key3.db | 
|---|
| 35 | #Source5:          blank-secmod.db | 
|---|
| 36 | #Source6:          blank-cert9.db | 
|---|
| 37 | #Source7:          blank-key4.db | 
|---|
| 38 | #Source8:          system-pkcs11.txt | 
|---|
| 39 | #Source9:          setup-nsssysinit.sh | 
|---|
| 40 | #Source10:         PayPalEE.cert | 
|---|
| 41 | #Source12:         %{name}-pem-20100809.tar.bz2 | 
|---|
| 42 |  | 
|---|
| 43 | Source21:          nss-util.pc.in | 
|---|
| 44 | Source22:          nss-util-config.in | 
|---|
| 45 |  | 
|---|
| 46 | Source31:          nss-softokn.pc.in | 
|---|
| 47 | Source32:          nss-softokn-config.in | 
|---|
| 48 |  | 
|---|
| 49 | Patch0:           nss-os2.diff | 
|---|
| 50 | #Patch3:           renegotiate-transitional.patch | 
|---|
| 51 | #Patch6:           nss-enable-pem.patch | 
|---|
| 52 | #Patch7:           nsspem-596674.patch | 
|---|
| 53 | #Patch8:           nss-sysinit-userdb-first.patch | 
|---|
| 54 | #Patch9:           0001-Add-support-for-PKCS-8-encoded-private-keys.patch | 
|---|
| 55 | #Patch10:          0001-Do-not-define-SEC_SkipTemplate.patch | 
|---|
| 56 |  | 
|---|
| 57 | %description | 
|---|
| 58 | Network Security Services (NSS) is a set of libraries designed to | 
|---|
| 59 | support cross-platform development of security-enabled client and | 
|---|
| 60 | server applications. Applications built with NSS can support SSL v2 | 
|---|
| 61 | and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 | 
|---|
| 62 | v3 certificates, and other security standards. | 
|---|
| 63 |  | 
|---|
| 64 | %package tools | 
|---|
| 65 | Summary:          Tools for the Network Security Services | 
|---|
| 66 | Group:            System Environment/Base | 
|---|
| 67 | Requires:         nss = %{version}-%{release} | 
|---|
| 68 | Requires:         zlib | 
|---|
| 69 |  | 
|---|
| 70 | %description tools | 
|---|
| 71 | Network Security Services (NSS) is a set of libraries designed to | 
|---|
| 72 | support cross-platform development of security-enabled client and | 
|---|
| 73 | server applications. Applications built with NSS can support SSL v2 | 
|---|
| 74 | and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 | 
|---|
| 75 | v3 certificates, and other security standards. | 
|---|
| 76 |  | 
|---|
| 77 | Install the nss-tools package if you need command-line tools to | 
|---|
| 78 | manipulate the NSS certificate and key database. | 
|---|
| 79 |  | 
|---|
| 80 | %package sysinit | 
|---|
| 81 | Summary:          System NSS Initilization | 
|---|
| 82 | Group:            System Environment/Base | 
|---|
| 83 | # providing nss-system-init without version so that it can | 
|---|
| 84 | # be replaced by a better one, e.g. supplied by the os vendor | 
|---|
| 85 | Provides:         nss-system-init | 
|---|
| 86 | Requires:         nss = %{version}-%{release} | 
|---|
| 87 | Requires(post):   coreutils, sed | 
|---|
| 88 |  | 
|---|
| 89 | %description sysinit | 
|---|
| 90 | Default Operating System module that manages applications loading | 
|---|
| 91 | NSS globally on the system. This module loads the system defined | 
|---|
| 92 | PKCS #11 modules for NSS and chains with other NSS modules to load | 
|---|
| 93 | any system or user configured modules. | 
|---|
| 94 |  | 
|---|
| 95 | %package devel | 
|---|
| 96 | Summary:          Development libraries for Network Security Services | 
|---|
| 97 | Group:            Development/Libraries | 
|---|
| 98 | Requires:         nss = %{version}-%{release} | 
|---|
| 99 | Requires:         nss-util-devel | 
|---|
| 100 | Requires:         nss-softokn-devel | 
|---|
| 101 | Requires:         nspr-devel >= %{nspr_version} | 
|---|
| 102 | Requires:         pkgconfig | 
|---|
| 103 |  | 
|---|
| 104 | %description devel | 
|---|
| 105 | Header and Library files for doing development with Network Security Services. | 
|---|
| 106 |  | 
|---|
| 107 |  | 
|---|
| 108 | %package pkcs11-devel | 
|---|
| 109 | Summary:          Development libraries for PKCS #11 (Cryptoki) using NSS | 
|---|
| 110 | Group:            Development/Libraries | 
|---|
| 111 | Provides:         nss-pkcs11-devel-static = %{version}-%{release} | 
|---|
| 112 | Requires:         nss-devel = %{version}-%{release} | 
|---|
| 113 |  | 
|---|
| 114 | %description pkcs11-devel | 
|---|
| 115 | Library files for developing PKCS #11 modules using basic NSS | 
|---|
| 116 | low level services. | 
|---|
| 117 |  | 
|---|
| 118 | %package util | 
|---|
| 119 | Summary:          Network Security Services Utilities Library | 
|---|
| 120 | Group:            System Environment/Libraries | 
|---|
| 121 | Requires:         nspr >= %{nspr_version} | 
|---|
| 122 |  | 
|---|
| 123 | %description util | 
|---|
| 124 | Utilities for Network Security Services and the Softoken module | 
|---|
| 125 |  | 
|---|
| 126 | # We shouln't need to have a devel subpackage as util will be used in the | 
|---|
| 127 | # context of nss or nss-softoken. keeping to please rpmlint. | 
|---|
| 128 | # | 
|---|
| 129 | %package util-devel | 
|---|
| 130 | Summary:          Development libraries for Network Security Services Utilities | 
|---|
| 131 | Group:            Development/Libraries | 
|---|
| 132 | Requires:         nss-util = %{version}-%{release} | 
|---|
| 133 | Requires:         nspr-devel >= %{nspr_version} | 
|---|
| 134 | Requires:         pkgconfig | 
|---|
| 135 |  | 
|---|
| 136 | %description util-devel | 
|---|
| 137 | Header and library files for doing development with Network Security Services. | 
|---|
| 138 |  | 
|---|
| 139 |  | 
|---|
| 140 | %package softokn | 
|---|
| 141 | Summary:          Network Security Services Soktoken Module | 
|---|
| 142 | Group:            System Environment/Libraries | 
|---|
| 143 | Requires:         nspr >= %{nspr_version} | 
|---|
| 144 | Requires:         nss-util >= %{nss_util_version} | 
|---|
| 145 | Requires:         nss-softokn-freebl%{_isa} >= %{version} | 
|---|
| 146 |  | 
|---|
| 147 | %description softokn | 
|---|
| 148 | Network Security Services Softoken Cryptographic Module | 
|---|
| 149 |  | 
|---|
| 150 | %package softokn-freebl | 
|---|
| 151 | Summary:          Freebl library for the Network Security Services | 
|---|
| 152 | Group:            System Environment/Base | 
|---|
| 153 | Conflicts:        nss < 3.12.2.99.3-5 | 
|---|
| 154 | Conflicts:        Prelink < 0.4.3 | 
|---|
| 155 |  | 
|---|
| 156 | %description softokn-freebl | 
|---|
| 157 | Network Security Services Softoken Cryptographic Module Freelb Library. | 
|---|
| 158 |  | 
|---|
| 159 | Install the nss-softokn-freebl package if you need the freebl | 
|---|
| 160 | library. | 
|---|
| 161 |  | 
|---|
| 162 | %package softokn-freebl-devel | 
|---|
| 163 | Summary:          Header and Library files for doing development with the Freebl library for NSS | 
|---|
| 164 | Group:            System Environment/Base | 
|---|
| 165 | Requires:         nss-softokn-freebl = %{version}-%{release} | 
|---|
| 166 |  | 
|---|
| 167 | %description softokn-freebl-devel | 
|---|
| 168 | Network Security Services Softoken Cryptographic Module Freelb Library Development Tools. | 
|---|
| 169 |  | 
|---|
| 170 | %package softokn-devel | 
|---|
| 171 | Summary:          Development libraries for Network Security Services | 
|---|
| 172 | Group:            Development/Libraries | 
|---|
| 173 | Requires:         nss-softokn = %{version}-%{release} | 
|---|
| 174 | Requires:         nspr-devel >= %{nspr_version} | 
|---|
| 175 | Requires:         nss-util-devel >= %{version} | 
|---|
| 176 | Requires:         pkgconfig | 
|---|
| 177 | BuildRequires:    nspr-devel >= %{nspr_version} | 
|---|
| 178 | #BuildRequires:    nss-util-devel >= %{version} | 
|---|
| 179 | # require nss at least the version when we split via subpackages | 
|---|
| 180 | #BuildRequires:    nss-devel >= 3.12.2.99.3-11 | 
|---|
| 181 |  | 
|---|
| 182 | %description softokn-devel | 
|---|
| 183 | Header and Library files for doing development with Network Security Services. | 
|---|
| 184 |  | 
|---|
| 185 |  | 
|---|
| 186 | %prep | 
|---|
| 187 | %setup -q | 
|---|
| 188 | #%{__cp} %{SOURCE10} -f ./mozilla/security/nss/tests/libpkix/certs | 
|---|
| 189 | %setup -q -T -D -n %{name}-%{version} | 
|---|
| 190 | # -a 12 | 
|---|
| 191 |  | 
|---|
| 192 | %patch0 -p1 -b .os2~ | 
|---|
| 193 |  | 
|---|
| 194 | #%patch3 -p0 -b .transitional | 
|---|
| 195 | #%patch6 -p0 -b .libpem | 
|---|
| 196 | #%patch7 -p0 -b .596674 | 
|---|
| 197 | #%patch8 -p0 -b .603313 | 
|---|
| 198 | #%patch9 -p1 -b .pkcs8privatekey | 
|---|
| 199 | #%patch10 -p1 -b .noskiptemplate | 
|---|
| 200 |  | 
|---|
| 201 | cp mozilla/security/nss/lib/util/nssutil.def mozilla/security/nss/lib/util/nssuti.def | 
|---|
| 202 | cp mozilla/security/nss/lib/softoken/softokn.def mozilla/security/nss/lib/softoken/softok.def | 
|---|
| 203 |  | 
|---|
| 204 | # yd convert LF to CRLF in cmd files | 
|---|
| 205 | sed -i '#\n#\r\n#g' mozilla/security/nss/cmd/shlibsign/sign.cmd | 
|---|
| 206 |  | 
|---|
| 207 | %build | 
|---|
| 208 |  | 
|---|
| 209 | #ecs compatibility | 
|---|
| 210 | PROGRAMS= | 
|---|
| 211 | export PROGRAMS | 
|---|
| 212 | export MAKESHELL="/@unixroot/usr/bin/sh.exe" | 
|---|
| 213 |  | 
|---|
| 214 | #FREEBL_NO_DEPEND=1 | 
|---|
| 215 | #export FREEBL_NO_DEPEND | 
|---|
| 216 |  | 
|---|
| 217 | # Enable compiler optimizations and disable debugging code | 
|---|
| 218 | BUILD_OPT=1 | 
|---|
| 219 | export BUILD_OPT | 
|---|
| 220 |  | 
|---|
| 221 | # Generate symbolic info for debuggers | 
|---|
| 222 | XCFLAGS=$RPM_OPT_FLAGS | 
|---|
| 223 | export XCFLAGS | 
|---|
| 224 |  | 
|---|
| 225 | PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 | 
|---|
| 226 | PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 | 
|---|
| 227 |  | 
|---|
| 228 | export PKG_CONFIG_ALLOW_SYSTEM_LIBS | 
|---|
| 229 | export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS | 
|---|
| 230 |  | 
|---|
| 231 | NSPR_INCLUDE_DIR=`/@unixroot/usr/bin/pkg-config --cflags-only-I nspr | sed 's/-I//'` | 
|---|
| 232 | NSPR_LIB_DIR=`/@unixroot/usr/bin/pkg-config --libs-only-L nspr | sed 's/[[:space:]]*$//' | sed 's/-L//'` | 
|---|
| 233 |  | 
|---|
| 234 | export NSPR_INCLUDE_DIR | 
|---|
| 235 | export NSPR_LIB_DIR | 
|---|
| 236 |  | 
|---|
| 237 | NSS_INCLUDE_DIR=`/@unixroot/usr/bin/pkg-config --cflags-only-I nss-util | sed 's/-I//'` | 
|---|
| 238 | NSS_LIB_DIR=`/@unixroot/usr/bin/pkg-config --libs-only-L nss-util| sed 's/[[:space:]]*$//' | sed 's/-L//'` | 
|---|
| 239 |  | 
|---|
| 240 | NSS_USE_SYSTEM_SQLITE=1 | 
|---|
| 241 | export NSS_USE_SYSTEM_SQLITE | 
|---|
| 242 | USE_SYSTEM_ZLIB=1 | 
|---|
| 243 | export USE_SYSTEM_ZLIB | 
|---|
| 244 |  | 
|---|
| 245 | %ifarch x86_64 ppc64 ia64 s390x sparc64 | 
|---|
| 246 | USE_64=1 | 
|---|
| 247 | export USE_64 | 
|---|
| 248 | %endif | 
|---|
| 249 |  | 
|---|
| 250 | # We only ship the nss proper libraries, no softoken nor util, yet | 
|---|
| 251 | # we must compile with the entire source tree because nss needs | 
|---|
| 252 | # private exports from util. The install section will ensure not | 
|---|
| 253 | # to override nss-util and nss-softoken headers already installed. | 
|---|
| 254 | # | 
|---|
| 255 |  | 
|---|
| 256 | # yd smp build not safe | 
|---|
| 257 | make -C ./mozilla/security/coreconf | 
|---|
| 258 | # %{?_smp_mflags} | 
|---|
| 259 | make -C ./mozilla/security/dbm | 
|---|
| 260 | # %{?_smp_mflags} | 
|---|
| 261 | make -C ./mozilla/security/nss | 
|---|
| 262 | # %{?_smp_mflags} | 
|---|
| 263 |  | 
|---|
| 264 | %install | 
|---|
| 265 |  | 
|---|
| 266 | %{__rm} -rf $RPM_BUILD_ROOT | 
|---|
| 267 |  | 
|---|
| 268 |  | 
|---|
| 269 | # Set up our package file | 
|---|
| 270 | # The nspr_version and nss_{util|softokn}_version globals used | 
|---|
| 271 | # here match the ones nss has for its Requires. | 
|---|
| 272 | %{__mkdir_p} ./mozilla/dist/pkgconfig | 
|---|
| 273 | %{__cat} %{SOURCE1} | sed -e "s,%%libdir%%,%{_libdir},g" \ | 
|---|
| 274 | -e "s,%%prefix%%,%{_prefix},g" \ | 
|---|
| 275 | -e "s,%%exec_prefix%%,%{_prefix},g" \ | 
|---|
| 276 | -e "s,%%includedir%%,%{_includedir}/nss3,g" \ | 
|---|
| 277 | -e "s,%%NSS_VERSION%%,%{version},g" \ | 
|---|
| 278 | -e "s,%%NSPR_VERSION%%,%{nspr_version},g" \ | 
|---|
| 279 | -e "s,%%NSSUTIL_VERSION%%,%{nss_util_version},g" \ | 
|---|
| 280 | -e "s,%%SOFTOKEN_VERSION%%,%{nss_softokn_version},g" > \ | 
|---|
| 281 | ./mozilla/dist/pkgconfig/nss.pc | 
|---|
| 282 |  | 
|---|
| 283 | # util-Set up our package file | 
|---|
| 284 | %{__cat} %{SOURCE21} | sed -e "s,%%libdir%%,%{_libdir},g" \ | 
|---|
| 285 | -e "s,%%prefix%%,%{_prefix},g" \ | 
|---|
| 286 | -e "s,%%exec_prefix%%,%{_prefix},g" \ | 
|---|
| 287 | -e "s,%%includedir%%,%{_includedir}/nss3,g" \ | 
|---|
| 288 | -e "s,%%NSPR_VERSION%%,%{nspr_version},g" \ | 
|---|
| 289 | -e "s,%%NSSUTIL_VERSION%%,%{version},g" > \ | 
|---|
| 290 | ./mozilla/dist/pkgconfig/nss-util.pc | 
|---|
| 291 |  | 
|---|
| 292 | # softokn-Set up our package file | 
|---|
| 293 | %{__cat} %{SOURCE31} | sed -e "s,%%libdir%%,%{_libdir},g" \ | 
|---|
| 294 | -e "s,%%prefix%%,%{_prefix},g" \ | 
|---|
| 295 | -e "s,%%exec_prefix%%,%{_prefix},g" \ | 
|---|
| 296 | -e "s,%%includedir%%,%{_includedir}/nss3,g" \ | 
|---|
| 297 | -e "s,%%NSPR_VERSION%%,%{nspr_version},g" \ | 
|---|
| 298 | -e "s,%%NSSUTIL_VERSION%%,%{nss_util_version},g" \ | 
|---|
| 299 | -e "s,%%SOFTOKEN_VERSION%%,%{version},g" > \ | 
|---|
| 300 | ./mozilla/dist/pkgconfig/nss-softokn.pc | 
|---|
| 301 |  | 
|---|
| 302 | NSS_VMAJOR=`cat mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMAJOR" | awk '{print $3}'` | 
|---|
| 303 | NSS_VMINOR=`cat mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VMINOR" | awk '{print $3}'` | 
|---|
| 304 | NSS_VPATCH=`cat mozilla/security/nss/lib/nss/nss.h | grep "#define.*NSS_VPATCH" | awk '{print $3}'` | 
|---|
| 305 |  | 
|---|
| 306 | export NSS_VMAJOR | 
|---|
| 307 | export NSS_VMINOR | 
|---|
| 308 | export NSS_VPATCH | 
|---|
| 309 |  | 
|---|
| 310 | %{__cat} %{SOURCE2} | sed -e "s,@libdir@,%{_libdir},g" \ | 
|---|
| 311 | -e "s,@prefix@,%{_prefix},g" \ | 
|---|
| 312 | -e "s,@exec_prefix@,%{_prefix},g" \ | 
|---|
| 313 | -e "s,@includedir@,%{_includedir}/nss3,g" \ | 
|---|
| 314 | -e "s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g" \ | 
|---|
| 315 | -e "s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g" \ | 
|---|
| 316 | -e "s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g" \ | 
|---|
| 317 | > ./mozilla/dist/pkgconfig/nss-config | 
|---|
| 318 | %{__cat} %{SOURCE22} | sed -e "s,@libdir@,%{_libdir},g" \ | 
|---|
| 319 | -e "s,@prefix@,%{_prefix},g" \ | 
|---|
| 320 | -e "s,@exec_prefix@,%{_prefix},g" \ | 
|---|
| 321 | -e "s,@includedir@,%{_includedir}/nss3,g" \ | 
|---|
| 322 | -e "s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g" \ | 
|---|
| 323 | -e "s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g" \ | 
|---|
| 324 | -e "s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g" \ | 
|---|
| 325 | > ./mozilla/dist/pkgconfig/nss-util-config | 
|---|
| 326 | %{__cat} %{SOURCE32} | sed -e "s,@libdir@,%{_libdir},g" \ | 
|---|
| 327 | -e "s,@prefix@,%{_prefix},g" \ | 
|---|
| 328 | -e "s,@exec_prefix@,%{_prefix},g" \ | 
|---|
| 329 | -e "s,@includedir@,%{_includedir}/nss3,g" \ | 
|---|
| 330 | -e "s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g" \ | 
|---|
| 331 | -e "s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g" \ | 
|---|
| 332 | -e "s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g" \ | 
|---|
| 333 | > ./mozilla/dist/pkgconfig/nss-softokn-config | 
|---|
| 334 |  | 
|---|
| 335 | chmod 755 ./mozilla/dist/pkgconfig/nss-config | 
|---|
| 336 |  | 
|---|
| 337 | #%{__cat} %{SOURCE9} > ./mozilla/dist/pkgconfig/setup-nsssysinit.sh | 
|---|
| 338 | #chmod 755 ./mozilla/dist/pkgconfig/setup-nsssysinit.sh | 
|---|
| 339 |  | 
|---|
| 340 |  | 
|---|
| 341 | # There is no make install target so we'll do it ourselves. | 
|---|
| 342 |  | 
|---|
| 343 | %{__mkdir_p} $RPM_BUILD_ROOT/%{_includedir}/nss3 | 
|---|
| 344 | %{__mkdir_p} $RPM_BUILD_ROOT/%{_bindir} | 
|---|
| 345 | %{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir} | 
|---|
| 346 | %{__mkdir_p} $RPM_BUILD_ROOT/%{unsupported_tools_directory} | 
|---|
| 347 | %{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig | 
|---|
| 348 |  | 
|---|
| 349 | # Copy the binary libraries we want nsspemk.dll libnsssysinitk.dll | 
|---|
| 350 | for file in nss3k.dll nssckbik.dll smime3k.dll ssl3k.dll nssuti3k.dll softok3k.dll nssdbm3k.dll freebl3k.dll | 
|---|
| 351 | do | 
|---|
| 352 | %{__install} -p -m 755 mozilla/dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir} | 
|---|
| 353 | done | 
|---|
| 354 | # Copy the import libraries we want | 
|---|
| 355 | for file in nss3.a smime3.a ssl3.a nssdbm3.a | 
|---|
| 356 | do | 
|---|
| 357 | %{__install} -p -m 755 mozilla/dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir} | 
|---|
| 358 | done | 
|---|
| 359 | %{__install} -p -m 755 mozilla/dist/*.OBJ/lib/nssuti3.a $RPM_BUILD_ROOT/%{_libdir}/nssutil3.a | 
|---|
| 360 | %{__install} -p -m 755 mozilla/dist/*.OBJ/lib/softok3.a $RPM_BUILD_ROOT/%{_libdir}/softokn3.a | 
|---|
| 361 |  | 
|---|
| 362 | # Install the empty NSS db files | 
|---|
| 363 | # Legacy db | 
|---|
| 364 | #%{__mkdir_p} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb | 
|---|
| 365 | #%{__install} -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/cert8.db | 
|---|
| 366 | #%{__install} -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/key3.db | 
|---|
| 367 | #%{__install} -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/secmod.db | 
|---|
| 368 | # Shared db | 
|---|
| 369 | #%{__install} -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/cert9.db | 
|---|
| 370 | #%{__install} -p -m 644 %{SOURCE7} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/key4.db | 
|---|
| 371 | #%{__install} -p -m 644 %{SOURCE8} $RPM_BUILD_ROOT/%{_sysconfdir}/pki/nssdb/pkcs11.txt | 
|---|
| 372 |  | 
|---|
| 373 | # Copy the development libraries we want | 
|---|
| 374 | for file in crmf.a nssb.a nssckfw.a freebl.a | 
|---|
| 375 | do | 
|---|
| 376 | %{__install} -p -m 644 mozilla/dist/*.OBJ/lib/$file $RPM_BUILD_ROOT/%{_libdir} | 
|---|
| 377 | done | 
|---|
| 378 |  | 
|---|
| 379 | # Copy the binaries we want | 
|---|
| 380 | for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap | 
|---|
| 381 | do | 
|---|
| 382 | %{__install} -p -m 755 mozilla/dist/*.OBJ/bin/$file.exe $RPM_BUILD_ROOT/%{_bindir} | 
|---|
| 383 | done | 
|---|
| 384 |  | 
|---|
| 385 | # Copy the binaries we ship as unsupported | 
|---|
| 386 | for file in atob btoa derdump ocspclnt pp selfserv strsclnt symkeyutil tstclnt vfyserv vfychain shlibsign | 
|---|
| 387 | do | 
|---|
| 388 | %{__install} -p -m 755 mozilla/dist/*.OBJ/bin/$file.exe $RPM_BUILD_ROOT/%{unsupported_tools_directory} | 
|---|
| 389 | done | 
|---|
| 390 |  | 
|---|
| 391 | # Copy the include files we want | 
|---|
| 392 | for file in mozilla/dist/public/nss/*.h | 
|---|
| 393 | do | 
|---|
| 394 | %{__install} -p -m 644 $file $RPM_BUILD_ROOT/%{_includedir}/nss3 | 
|---|
| 395 | done | 
|---|
| 396 |  | 
|---|
| 397 | # Copy a freebl include file we also want | 
|---|
| 398 | for file in mozilla/dist/private/nss/blapi.h | 
|---|
| 399 | do | 
|---|
| 400 | %{__install} -p -m 644 $file $RPM_BUILD_ROOT/%{_includedir}/nss3 | 
|---|
| 401 | done | 
|---|
| 402 |  | 
|---|
| 403 | # Copy the package configuration files | 
|---|
| 404 | %{__install} -p -m 644 ./mozilla/dist/pkgconfig/nss.pc $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/nss.pc | 
|---|
| 405 | %{__install} -p -m 755 ./mozilla/dist/pkgconfig/nss-config $RPM_BUILD_ROOT/%{_bindir}/nss-config | 
|---|
| 406 | # Copy the pkcs #11 configuration script | 
|---|
| 407 | #%{__install} -p -m 755 ./mozilla/dist/pkgconfig/setup-nsssysinit.sh $RPM_BUILD_ROOT/%{_bindir}/setup-nsssysinit.sh | 
|---|
| 408 |  | 
|---|
| 409 | # util-Copy the package configuration files | 
|---|
| 410 | %{__install} -p -m 644 ./mozilla/dist/pkgconfig/nss-util.pc $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/nss-util.pc | 
|---|
| 411 | %{__install} -p -m 755 ./mozilla/dist/pkgconfig/nss-util-config $RPM_BUILD_ROOT/%{_bindir}/nss-util-config | 
|---|
| 412 |  | 
|---|
| 413 | # softokn-Copy the package configuration files | 
|---|
| 414 | %{__install} -p -m 644 ./mozilla/dist/pkgconfig/nss-softokn.pc $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/nss-softokn.pc | 
|---|
| 415 | %{__install} -p -m 755 ./mozilla/dist/pkgconfig/nss-softokn-config $RPM_BUILD_ROOT/%{_bindir}/nss-softokn-config | 
|---|
| 416 |  | 
|---|
| 417 | # Copy the digital signatures | 
|---|
| 418 | for file in freebl3k nssdbm3k softok3k | 
|---|
| 419 | do | 
|---|
| 420 | %{__install} -p -m 644 mozilla/dist/*.OBJ/lib/$file.chk $RPM_BUILD_ROOT/%{_libdir} | 
|---|
| 421 | done | 
|---|
| 422 |  | 
|---|
| 423 |  | 
|---|
| 424 | %clean | 
|---|
| 425 | %{__rm} -rf $RPM_BUILD_ROOT | 
|---|
| 426 |  | 
|---|
| 427 | #%triggerpostun -n nss-sysinit -- nss-sysinit < 3.12.8-3 | 
|---|
| 428 | # Reverse unwanted disabling of sysinit by faulty preun sysinit scriplet | 
|---|
| 429 | # from previous versions of nss.spec | 
|---|
| 430 | #/@unixroot/usr/bin/setup-nsssysinit.sh on | 
|---|
| 431 |  | 
|---|
| 432 | #%post -p /sbin/ldconfig | 
|---|
| 433 |  | 
|---|
| 434 | #%postun -p /sbin/ldconfig | 
|---|
| 435 |  | 
|---|
| 436 |  | 
|---|
| 437 | %files | 
|---|
| 438 | %defattr(-,root,root) | 
|---|
| 439 | %{_libdir}/nss3k.dll | 
|---|
| 440 | %{_libdir}/ssl3k.dll | 
|---|
| 441 | %{_libdir}/smime3k.dll | 
|---|
| 442 | %{_libdir}/nssckbik.dll | 
|---|
| 443 | #%{_libdir}/nsspemk.dll | 
|---|
| 444 | #%dir %{_sysconfdir}/pki/nssdb | 
|---|
| 445 | #%config(noreplace) %{_sysconfdir}/pki/nssdb/cert8.db | 
|---|
| 446 | #%config(noreplace) %{_sysconfdir}/pki/nssdb/key3.db | 
|---|
| 447 | #%config(noreplace) %{_sysconfdir}/pki/nssdb/secmod.db | 
|---|
| 448 |  | 
|---|
| 449 | #%files sysinit | 
|---|
| 450 | #%defattr(-,root,root) | 
|---|
| 451 | #%{_libdir}/libnsssysinitk.dll | 
|---|
| 452 | #%config(noreplace) %{_sysconfdir}/pki/nssdb/cert9.db | 
|---|
| 453 | #%config(noreplace) %{_sysconfdir}/pki/nssdb/key4.db | 
|---|
| 454 | #%config(noreplace) %{_sysconfdir}/pki/nssdb/pkcs11.txt | 
|---|
| 455 | #%{_bindir}/setup-nsssysinit.sh | 
|---|
| 456 |  | 
|---|
| 457 | %files tools | 
|---|
| 458 | %defattr(-,root,root) | 
|---|
| 459 | %{_bindir}/certutil.exe | 
|---|
| 460 | %{_bindir}/cmsutil.exe | 
|---|
| 461 | %{_bindir}/crlutil.exe | 
|---|
| 462 | %{_bindir}/modutil.exe | 
|---|
| 463 | %{_bindir}/pk12util.exe | 
|---|
| 464 | %{_bindir}/signtool.exe | 
|---|
| 465 | %{_bindir}/signver.exe | 
|---|
| 466 | %{_bindir}/ssltap.exe | 
|---|
| 467 | %{unsupported_tools_directory}/atob.exe | 
|---|
| 468 | %{unsupported_tools_directory}/btoa.exe | 
|---|
| 469 | %{unsupported_tools_directory}/derdump.exe | 
|---|
| 470 | %{unsupported_tools_directory}/ocspclnt.exe | 
|---|
| 471 | %{unsupported_tools_directory}/pp.exe | 
|---|
| 472 | %{unsupported_tools_directory}/selfserv.exe | 
|---|
| 473 | %{unsupported_tools_directory}/strsclnt.exe | 
|---|
| 474 | %{unsupported_tools_directory}/symkeyutil.exe | 
|---|
| 475 | %{unsupported_tools_directory}/tstclnt.exe | 
|---|
| 476 | %{unsupported_tools_directory}/vfyserv.exe | 
|---|
| 477 | %{unsupported_tools_directory}/vfychain.exe | 
|---|
| 478 |  | 
|---|
| 479 | %files devel | 
|---|
| 480 | %defattr(-,root,root) | 
|---|
| 481 | %{_libdir}/nss3.a | 
|---|
| 482 | %{_libdir}/smime3.a | 
|---|
| 483 | %{_libdir}/ssl3.a | 
|---|
| 484 | %{_libdir}/crmf.a | 
|---|
| 485 | %{_libdir}/pkgconfig/nss.pc | 
|---|
| 486 | %{_bindir}/nss-config | 
|---|
| 487 |  | 
|---|
| 488 | %dir %{_includedir}/nss3 | 
|---|
| 489 | %{_includedir}/nss3/cert.h | 
|---|
| 490 | %{_includedir}/nss3/certdb.h | 
|---|
| 491 | %{_includedir}/nss3/certt.h | 
|---|
| 492 | %{_includedir}/nss3/cmmf.h | 
|---|
| 493 | %{_includedir}/nss3/cmmft.h | 
|---|
| 494 | %{_includedir}/nss3/cms.h | 
|---|
| 495 | %{_includedir}/nss3/cmsreclist.h | 
|---|
| 496 | %{_includedir}/nss3/cmst.h | 
|---|
| 497 | %{_includedir}/nss3/crmf.h | 
|---|
| 498 | %{_includedir}/nss3/crmft.h | 
|---|
| 499 | %{_includedir}/nss3/cryptohi.h | 
|---|
| 500 | %{_includedir}/nss3/cryptoht.h | 
|---|
| 501 | %{_includedir}/nss3/jar-ds.h | 
|---|
| 502 | %{_includedir}/nss3/jar.h | 
|---|
| 503 | %{_includedir}/nss3/jarfile.h | 
|---|
| 504 | %{_includedir}/nss3/key.h | 
|---|
| 505 | %{_includedir}/nss3/keyhi.h | 
|---|
| 506 | %{_includedir}/nss3/keyt.h | 
|---|
| 507 | %{_includedir}/nss3/keythi.h | 
|---|
| 508 | %{_includedir}/nss3/nss.h | 
|---|
| 509 | %{_includedir}/nss3/nssckbi.h | 
|---|
| 510 | #%{_includedir}/nss3/nsspem.h | 
|---|
| 511 | %{_includedir}/nss3/ocsp.h | 
|---|
| 512 | %{_includedir}/nss3/ocspt.h | 
|---|
| 513 | %{_includedir}/nss3/p12.h | 
|---|
| 514 | %{_includedir}/nss3/p12plcy.h | 
|---|
| 515 | %{_includedir}/nss3/p12t.h | 
|---|
| 516 | %{_includedir}/nss3/pk11func.h | 
|---|
| 517 | %{_includedir}/nss3/pk11pqg.h | 
|---|
| 518 | %{_includedir}/nss3/pk11priv.h | 
|---|
| 519 | %{_includedir}/nss3/pk11pub.h | 
|---|
| 520 | %{_includedir}/nss3/pk11sdr.h | 
|---|
| 521 | %{_includedir}/nss3/pkcs12.h | 
|---|
| 522 | %{_includedir}/nss3/pkcs12t.h | 
|---|
| 523 | %{_includedir}/nss3/pkcs7t.h | 
|---|
| 524 | %{_includedir}/nss3/preenc.h | 
|---|
| 525 | %{_includedir}/nss3/secmime.h | 
|---|
| 526 | %{_includedir}/nss3/secmod.h | 
|---|
| 527 | %{_includedir}/nss3/secpkcs5.h | 
|---|
| 528 | %{_includedir}/nss3/secpkcs7.h | 
|---|
| 529 | %{_includedir}/nss3/smime.h | 
|---|
| 530 | %{_includedir}/nss3/ssl.h | 
|---|
| 531 | %{_includedir}/nss3/sslerr.h | 
|---|
| 532 | %{_includedir}/nss3/sslproto.h | 
|---|
| 533 | %{_includedir}/nss3/sslt.h | 
|---|
| 534 |  | 
|---|
| 535 |  | 
|---|
| 536 | %files pkcs11-devel | 
|---|
| 537 | %defattr(-, root, root) | 
|---|
| 538 | %{_includedir}/nss3/nssbase.h | 
|---|
| 539 | %{_includedir}/nss3/nssbaset.h | 
|---|
| 540 | %{_includedir}/nss3/nssckepv.h | 
|---|
| 541 | %{_includedir}/nss3/nssckft.h | 
|---|
| 542 | %{_includedir}/nss3/nssckfw.h | 
|---|
| 543 | %{_includedir}/nss3/nssckfwc.h | 
|---|
| 544 | %{_includedir}/nss3/nssckfwt.h | 
|---|
| 545 | %{_includedir}/nss3/nssckg.h | 
|---|
| 546 | %{_includedir}/nss3/nssckmdt.h | 
|---|
| 547 | %{_includedir}/nss3/nssckt.h | 
|---|
| 548 | %{_libdir}/nssb.a | 
|---|
| 549 | %{_libdir}/nssckfw.a | 
|---|
| 550 |  | 
|---|
| 551 | %files util | 
|---|
| 552 | %defattr(-,root,root) | 
|---|
| 553 | %{_libdir}/nssuti3k.dll | 
|---|
| 554 |  | 
|---|
| 555 | %files util-devel | 
|---|
| 556 | %defattr(-,root,root) | 
|---|
| 557 | # package configuration files | 
|---|
| 558 | %{_libdir}/pkgconfig/nss-util.pc | 
|---|
| 559 | %{_bindir}/nss-util-config | 
|---|
| 560 | %{_libdir}/nssutil3.a | 
|---|
| 561 | # co-owned with nss | 
|---|
| 562 | %dir %{_includedir}/nss3 | 
|---|
| 563 | # these are marked as public export in | 
|---|
| 564 | # mozilla/security/nss/lib/util/manifest.mk | 
|---|
| 565 | %{_includedir}/nss3/base64.h | 
|---|
| 566 | %{_includedir}/nss3/ciferfam.h | 
|---|
| 567 | %{_includedir}/nss3/nssb64.h | 
|---|
| 568 | %{_includedir}/nss3/nssb64t.h | 
|---|
| 569 | %{_includedir}/nss3/nsslocks.h | 
|---|
| 570 | %{_includedir}/nss3/nssilock.h | 
|---|
| 571 | %{_includedir}/nss3/nssilckt.h | 
|---|
| 572 | %{_includedir}/nss3/nssrwlk.h | 
|---|
| 573 | %{_includedir}/nss3/nssrwlkt.h | 
|---|
| 574 | %{_includedir}/nss3/nssutil.h | 
|---|
| 575 | %{_includedir}/nss3/pkcs11.h | 
|---|
| 576 | %{_includedir}/nss3/pkcs11f.h | 
|---|
| 577 | %{_includedir}/nss3/pkcs11n.h | 
|---|
| 578 | %{_includedir}/nss3/pkcs11p.h | 
|---|
| 579 | %{_includedir}/nss3/pkcs11t.h | 
|---|
| 580 | %{_includedir}/nss3/pkcs11u.h | 
|---|
| 581 | %{_includedir}/nss3/portreg.h | 
|---|
| 582 | %{_includedir}/nss3/secasn1.h | 
|---|
| 583 | %{_includedir}/nss3/secasn1t.h | 
|---|
| 584 | %{_includedir}/nss3/seccomon.h | 
|---|
| 585 | %{_includedir}/nss3/secder.h | 
|---|
| 586 | %{_includedir}/nss3/secdert.h | 
|---|
| 587 | %{_includedir}/nss3/secdig.h | 
|---|
| 588 | %{_includedir}/nss3/secdigt.h | 
|---|
| 589 | %{_includedir}/nss3/secerr.h | 
|---|
| 590 | %{_includedir}/nss3/secitem.h | 
|---|
| 591 | %{_includedir}/nss3/secoid.h | 
|---|
| 592 | %{_includedir}/nss3/secoidt.h | 
|---|
| 593 | %{_includedir}/nss3/secport.h | 
|---|
| 594 | %{_includedir}/nss3/utilrename.h | 
|---|
| 595 |  | 
|---|
| 596 | %files softokn | 
|---|
| 597 | %defattr(-,root,root) | 
|---|
| 598 | %{_libdir}/nssdbm3k.dll | 
|---|
| 599 | %{_libdir}/nssdbm3k.chk | 
|---|
| 600 | %{_libdir}/softok3k.dll | 
|---|
| 601 | %{_libdir}/softok3k.chk | 
|---|
| 602 | # shared with nss-tools | 
|---|
| 603 | %dir %{_libdir}/nss | 
|---|
| 604 | #%dir %{saved_files_dir} | 
|---|
| 605 | %dir %{unsupported_tools_directory} | 
|---|
| 606 | %{unsupported_tools_directory}/shlibsign.exe | 
|---|
| 607 |  | 
|---|
| 608 | %files softokn-freebl | 
|---|
| 609 | %defattr(-,root,root) | 
|---|
| 610 | %{_libdir}/freebl3k.dll | 
|---|
| 611 | %{_libdir}/freebl3k.chk | 
|---|
| 612 | # and these symbolic links | 
|---|
| 613 | #%{_libdir}/libfreebl3.so | 
|---|
| 614 | #%{_libdir}/libfreebl3.chk | 
|---|
| 615 |  | 
|---|
| 616 | %files softokn-freebl-devel | 
|---|
| 617 | %defattr(-,root,root) | 
|---|
| 618 | %{_libdir}/freebl.a | 
|---|
| 619 | %{_includedir}/nss3/blapi.h | 
|---|
| 620 |  | 
|---|
| 621 | %files softokn-devel | 
|---|
| 622 | %defattr(-,root,root) | 
|---|
| 623 | %{_libdir}/pkgconfig/nss-softokn.pc | 
|---|
| 624 | %{_libdir}/nssdbm3.a | 
|---|
| 625 | %{_libdir}/softokn3.a | 
|---|
| 626 | %{_bindir}/nss-softokn-config | 
|---|
| 627 | # co-owned with nss | 
|---|
| 628 | %dir %{_includedir}/nss3 | 
|---|
| 629 | # | 
|---|
| 630 | # The following headers are those exported public in | 
|---|
| 631 | # mozilla/security/nss/lib/freebl/manifest.mn and | 
|---|
| 632 | # mozilla/security/nss/lib/softoken/manifest.mn | 
|---|
| 633 | # | 
|---|
| 634 | # The following list is short because many headers, such as | 
|---|
| 635 | # the pkcs #11 ones, have been provided by nss-util-devel | 
|---|
| 636 | # which installed them before us. | 
|---|
| 637 | # | 
|---|
| 638 | %{_includedir}/nss3/blapit.h | 
|---|
| 639 | %{_includedir}/nss3/ecl-exp.h | 
|---|
| 640 | %{_includedir}/nss3/hasht.h | 
|---|
| 641 | %{_includedir}/nss3/sechash.h | 
|---|
| 642 | #%{_includedir}/nss3/nsslowhash.h | 
|---|
| 643 | %{_includedir}/nss3/secmodt.h | 
|---|
| 644 | %{_includedir}/nss3/shsign.h | 
|---|
| 645 |  | 
|---|
| 646 | %changelog | 
|---|
| 647 | * Mon Jan 16 2012 yd | 
|---|
| 648 | - rebuild with libc 0.6.4 runtime. | 
|---|