--- /dev/null
+prefix=%prefix%
+exec_prefix=%exec_prefix%
+libdir=%libdir%
+includedir=%includedir%
+
+Name: NSS-SOFTOKN
+Description: Network Security Services Softoken PKCS #11 Module
+Version: %SOFTOKEN_VERSION%
+Requires: nspr >= %NSPR_VERSION%, nss >= %NSS_VERSION%
+Libs: -L${libdir} -lfreebl3 -lnssdbm3 -lsoftokn3
+Cflags: -I${includedir}
Summary(pl.UTF-8): NSS - Network Security Services
Name: nss
Version: 3.17.2
-Release: 2
+Release: 3
Epoch: 1
License: MPL v2.0
Group: Libraries
Source2: %{name}-config.in
Source3: http://www.cacert.org/certs/root.der
# Source3-md5: a61b375e390d9c3654eebd2031461f6b
+Source4: nss-softokn.pc.in
Patch0: %{name}-Makefile.patch
# Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1083900
Patch1: tls12.patch
# compatibility symlink
ln -s nss.pc $RPM_BUILD_ROOT%{_pkgconfigdir}/mozilla-nss.pc
+cat %{SOURCE4} | \
+sed -e "s,%%libdir%%,%{_libdir},g" \
+ -e "s,%%prefix%%,%{_prefix},g" \
+ -e "s,%%exec_prefix%%,%{_prefix},g" \
+ -e "s,%%includedir%%,%{_includedir}/nss,g" \
+ -e "s,%%NSPR_VERSION%%,$(echo %{nspr_ver} | sed -e 's#.*:##g'),g" \
+ -e "s,%%NSS_VERSION%%,%{version},g" \
+ -e "s,%%SOFTOKEN_VERSION%%,%{version},g" > \
+ $RPM_BUILD_ROOT%{_pkgconfigdir}/nss-softokn.pc
+
+
NSS_VMAJOR=$(awk '/#define.*NSS_VMAJOR/ {print $3}' nss/lib/nss/nss.h)
NSS_VMINOR=$(awk '/#define.*NSS_VMINOR/ {print $3}' nss/lib/nss/nss.h)
NSS_VPATCH=$(awk '/#define.*NSS_VPATCH/ {print $3}' nss/lib/nss/nss.h)
%{_includedir}/nss
%{_pkgconfigdir}/mozilla-nss.pc
%{_pkgconfigdir}/nss.pc
+%{_pkgconfigdir}/nss-softokn.pc
%files tools
%defattr(644,root,root,755)