1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 groups = System/Libraries
11 url = http://www.mozilla.org/projects/security/pki/nss/
12 license = MPLv1.1 or GPLv2+ or LGPLv2+
13 summary = Network Security Services.
16 Network Security Services (NSS) is a set of libraries designed to
17 support cross-platform development of security-enabled client and
18 server applications. Applications built with NSS can support SSL v2
19 and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509
20 v3 certificates, and other security standards.
25 %{thisapp}-stripped.tar.bz2
26 %{name}-pem-20100809.tar.bz2
41 ## Define some global environment variables
43 export FREEBL_NO_DEPEND=1
45 # Enable compiler optimizations and disable debugging code
47 export XCFLAGS=%{CFLAGS}
49 export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
50 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
52 export NSPR_INCLUDE_DIR=/usr/include/nspr4
53 export NSPR_LIB_DIR=/usr/lib
55 export NSS_INCLUDE_DIR=/usr/include/nss3
56 export NSS_LIB_DIR=/usr/lib
58 export NSS_USE_SYSTEM_SQLITE=1
62 cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}-stripped.tar.bz2
64 # Extract tarball into nss directory.
65 cd %{DIR_APP} && %{MACRO_EXTRACT} %{DIR_DL}/%{name}-pem-20100809.tar.bz2
70 cp -vf %{DIR_SOURCE}/PayPalEE.cert \
71 %{DIR_APP}/mozilla/security/nss/tests/libpkix/certs
75 make -C ./mozilla/security/coreconf
76 make -C ./mozilla/security/dbm
77 make -C ./mozilla/security/nss
81 mkdir -pv %{BUILDROOT}/usr/include/nss3
82 mkdir -pv %{BUILDROOT}/usr/{bin,lib}
83 mkdir -pv %{BUILDROOT}/usr/lib/pkgconfig
84 mkdir -pv %{BUILDROOT}/usr/lib/nss/unsupported-tools
86 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnss3.so \
88 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnssckbi.so \
90 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnsspem.so \
92 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnsssysinit.so \
94 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libsmime3.so \
96 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libssl3.so \
99 # Install the empty NSS db files
100 mkdir -pv %{BUILDROOT}/etc/pki/nssdb
101 cp -vf %{DIR_SOURCE}/*.db %{BUILDROOT}/etc/pki/nssdb/
102 install -p -v -m 644 %{DIR_SOURCE}/system-pkcs11.txt \
103 %{BUILDROOT}/etc/pki/nssdb/pkcs11.txt
105 # Copy the binaries we want
106 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/certutil %{BUILDROOT}/usr/bin
107 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/cmsutil %{BUILDROOT}/usr/bin
108 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/crlutil %{BUILDROOT}/usr/bin
109 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/modutil %{BUILDROOT}/usr/bin
110 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/pk12util %{BUILDROOT}/usr/bin
111 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/signtool %{BUILDROOT}/usr/bin
112 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/signver %{BUILDROOT}/usr/bin
113 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/ssltap %{BUILDROOT}/usr/bin
115 # Copy the binaries we ship as unsupported
116 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/atob %{BUILDROOT}/usr/lib/nss/unsupported-tools
117 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/btoa %{BUILDROOT}/usr/lib/nss/unsupported-tools
118 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/derdump %{BUILDROOT}/usr/lib/nss/unsupported-tools
119 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/ocspclnt %{BUILDROOT}/usr/lib/nss/unsupported-tools
120 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/pp %{BUILDROOT}/usr/lib/nss/unsupported-tools
121 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/selfserv %{BUILDROOT}/usr/lib/nss/unsupported-tools
122 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/strsclnt %{BUILDROOT}/usr/lib/nss/unsupported-tools
123 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/symkeyutil %{BUILDROOT}/usr/lib/nss/unsupported-tools
124 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/tstclnt %{BUILDROOT}/usr/lib/nss/unsupported-tools
125 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/vfyserv %{BUILDROOT}/usr/lib/nss/unsupported-tools
126 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/bin/vfychain %{BUILDROOT}/usr/lib/nss/unsupported-tools
128 sed -e "s,@libdir@,/usr/lib,g" \
129 -e "s,@prefix@,/usr,g" \
130 -e "s,@exec_prefix@,/usr,g" \
131 -e "s,@includedir@,/usr/include/nss3,g" \
132 -e "s,@MOD_MAJOR_VERSION@,$(grep "#define.*NSS_VMAJOR" %{DIR_APP}/mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \
133 -e "s,@MOD_MINOR_VERSION@,$(grep "#define.*NSS_VMINOR" %{DIR_APP}/mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \
134 -e "s,@MOD_PATCH_VERSION@,$(grep "#define.*NSS_VPATCH" %{DIR_APP}/mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \
135 < %{DIR_SOURCE}/nss-config.in \
136 > %{BUILDROOT}/usr/bin/nss-config
137 chmod -v 755 %{BUILDROOT}/usr/bin/nss-config
139 install -p -v -m 755 %{DIR_SOURCE}/setup-nsssysinit.sh %{BUILDROOT}/usr/bin
141 # Set up our package file
142 # The nspr_version and nss_{util|softokn}_version globals used
143 # here match the ones nss has for its Requires.
145 # XXX need to fix this
147 -e "s,%libdir%,/usr/lib,g" \
148 -e "s,%prefix%,/usr,g" \
149 -e "s,%exec_prefix%,/usr,g" \
150 -e "s,%includedir%,/usr/include/nss3,g" \
151 -e "s,%NSS_VERSION%,%{version},g" \
152 -e "s,%NSPR_VERSION%,$(nspr-config --version),g" \
153 -e "s,%NSSUTIL_VERSION%,$(nss-util-config --version),g" \
154 -e "s,%SOFTOKEN_VERSION%,$(nss-softokn-config --version),g" \
155 < %{DIR_SOURCE}/nss.pc.in \
156 > %{BUILDROOT}/usr/lib/pkgconfig/nss.pc
158 # Copy the include files we want
159 cp -vf %{DIR_APP}/mozilla/dist/public/nss/*.h %{BUILDROOT}/usr/include/nss3
160 chmod -v 644 %{BUILDROOT}/usr/include/nss3/*.h
162 # remove the nss-util-devel headers
163 cd %{BUILDROOT}/usr/include/nss3 && rm -vf \
174 pkcs11{,f,n,p,t,u}.h \
190 # remove header shipped in nss-softokn-devel
191 cd %{BUILDROOT}/usr/include/nss3 && rm -vf \
202 # XXX need to be removed
220 package %{name}-devel
230 # Mozilla does no versioning :(
238 package %{name}-debuginfo