]>
Commit | Line | Data |
---|---|---|
137c9981 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
137c9981 MT |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = nss |
94bd60cc | 7 | version = 3.13.1 |
c0622cfc | 8 | release = 2 |
137c9981 | 9 | |
802ea3af MT |
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. | |
137c9981 | 14 | |
802ea3af MT |
15 | description |
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 | |
137c9981 | 20 | v3 certificates, and other security standards. |
802ea3af | 21 | end |
137c9981 | 22 | |
94bd60cc | 23 | sources += \ |
802ea3af | 24 | %{name}-pem-20100809.tar.bz2 |
137c9981 | 25 | |
802ea3af MT |
26 | build |
27 | requires | |
c1646d96 | 28 | chrpath |
802ea3af | 29 | nspr-devel |
802ea3af MT |
30 | perl |
31 | pkg-config | |
32 | psmisc | |
33 | sqlite-devel | |
34 | zlib-devel | |
35 | end | |
137c9981 | 36 | |
802ea3af | 37 | ## Define some global environment variables |
137c9981 | 38 | |
802ea3af | 39 | export FREEBL_NO_DEPEND=1 |
137c9981 | 40 | |
802ea3af MT |
41 | # Enable compiler optimizations and disable debugging code |
42 | export BUILD_OPT=1 | |
43 | export XCFLAGS=%{CFLAGS} | |
137c9981 | 44 | |
94bd60cc | 45 | # Allow the usage of system libraries. |
802ea3af MT |
46 | export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 |
47 | export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 | |
137c9981 | 48 | |
94bd60cc | 49 | # Define where to find nspr header files and libraries. |
802ea3af | 50 | export NSPR_INCLUDE_DIR=/usr/include/nspr4 |
c1646d96 | 51 | export NSPR_LIB_DIR=%{libdir} |
137c9981 | 52 | |
94bd60cc SS |
53 | # Disable support for SHA224. |
54 | export NO_SHA224_AVAILABLE=1 | |
137c9981 | 55 | |
94bd60cc | 56 | # Use sqlite from system. |
802ea3af | 57 | export NSS_USE_SYSTEM_SQLITE=1 |
137c9981 | 58 | |
c1646d96 MT |
59 | if "%{DISTRO_ARCH}" == "x86_64" |
60 | export USE_64=1 | |
61 | end | |
62 | ||
802ea3af | 63 | prepare |
94bd60cc SS |
64 | # Extract tarball. |
65 | cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}.tar.gz | |
137c9981 | 66 | |
94bd60cc | 67 | # Extract pem tarball into nss directory. |
802ea3af | 68 | cd %{DIR_APP} && %{MACRO_EXTRACT} %{DIR_DL}/%{name}-pem-20100809.tar.bz2 |
1f9bc2f0 | 69 | |
802ea3af MT |
70 | # Apply all patches |
71 | %{MACRO_PATCHES} | |
802ea3af MT |
72 | end |
73 | ||
74 | build | |
75 | make -C ./mozilla/security/coreconf | |
76 | make -C ./mozilla/security/dbm | |
77 | make -C ./mozilla/security/nss | |
78 | end | |
79 | ||
80 | install | |
94bd60cc SS |
81 | # We have to do the complete install stuff self. |
82 | ||
83 | # Create directory layout. | |
802ea3af | 84 | mkdir -pv %{BUILDROOT}/usr/include/nss3 |
c1646d96 MT |
85 | mkdir -pv %{BUILDROOT}/usr/{bin,%{lib}} |
86 | mkdir -pv %{BUILDROOT}%{libdir}/pkgconfig | |
87 | mkdir -pv %{BUILDROOT}%{libdir}/nss/unsupported-tools | |
88 | ||
94bd60cc | 89 | # Install all libraries. |
c1646d96 MT |
90 | install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnss3.so \ |
91 | %{BUILDROOT}%{libdir} | |
92 | install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnssckbi.so \ | |
93 | %{BUILDROOT}%{libdir} | |
94 | install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnsspem.so \ | |
95 | %{BUILDROOT}%{libdir} | |
96 | install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnsssysinit.so \ | |
97 | %{BUILDROOT}%{libdir} | |
94bd60cc SS |
98 | install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnssutil3.so \ |
99 | %{BUILDROOT}%{libdir} | |
c1646d96 MT |
100 | install -p -v -m 755 mozilla/dist/*.OBJ/lib/libsmime3.so \ |
101 | %{BUILDROOT}%{libdir} | |
102 | install -p -v -m 755 mozilla/dist/*.OBJ/lib/libssl3.so \ | |
103 | %{BUILDROOT}%{libdir} | |
94bd60cc SS |
104 | install -p -v -m 755 mozilla/dist/*.OBJ/lib/libsoftokn3.so \ |
105 | %{BUILDROOT}%{libdir} | |
106 | install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnssdbm3.so \ | |
107 | %{BUILDROOT}%{libdir} | |
108 | install -p -v -m 755 mozilla/dist/*.OBJ/lib/libfreebl3.so \ | |
109 | %{BUILDROOT}/%{libdir} | |
802ea3af MT |
110 | |
111 | # Install the empty NSS db files | |
112 | mkdir -pv %{BUILDROOT}/etc/pki/nssdb | |
113 | cp -vf %{DIR_SOURCE}/*.db %{BUILDROOT}/etc/pki/nssdb/ | |
114 | install -p -v -m 644 %{DIR_SOURCE}/system-pkcs11.txt \ | |
115 | %{BUILDROOT}/etc/pki/nssdb/pkcs11.txt | |
116 | ||
117 | # Copy the binaries we want | |
c1646d96 MT |
118 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/certutil %{BUILDROOT}/usr/bin |
119 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/cmsutil %{BUILDROOT}/usr/bin | |
120 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/crlutil %{BUILDROOT}/usr/bin | |
121 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/modutil %{BUILDROOT}/usr/bin | |
122 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/pk12util %{BUILDROOT}/usr/bin | |
123 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/signtool %{BUILDROOT}/usr/bin | |
124 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/signver %{BUILDROOT}/usr/bin | |
125 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/ssltap %{BUILDROOT}/usr/bin | |
126 | chrpath --delete %{BUILDROOT}/usr/bin/* | |
802ea3af MT |
127 | |
128 | # Copy the binaries we ship as unsupported | |
c1646d96 MT |
129 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/atob %{BUILDROOT}%{libdir}/nss/unsupported-tools |
130 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/btoa %{BUILDROOT}%{libdir}/nss/unsupported-tools | |
131 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/derdump %{BUILDROOT}%{libdir}/nss/unsupported-tools | |
132 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/ocspclnt %{BUILDROOT}%{libdir}/nss/unsupported-tools | |
133 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/pp %{BUILDROOT}%{libdir}/nss/unsupported-tools | |
134 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/selfserv %{BUILDROOT}%{libdir}/nss/unsupported-tools | |
94bd60cc | 135 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/shlibsign %{BUILDROOT}%{libdir}/nss/unsupported-tools |
c1646d96 MT |
136 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/strsclnt %{BUILDROOT}%{libdir}/nss/unsupported-tools |
137 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/symkeyutil %{BUILDROOT}%{libdir}/nss/unsupported-tools | |
138 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/tstclnt %{BUILDROOT}%{libdir}/nss/unsupported-tools | |
139 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/vfyserv %{BUILDROOT}%{libdir}/nss/unsupported-tools | |
140 | install -p -v -m 755 mozilla/dist/*.OBJ/bin/vfychain %{BUILDROOT}%{libdir}/nss/unsupported-tools | |
94bd60cc | 141 | chrpath --delete %{BUILDROOT}%{libdir}/nss/unsupported-tools/* |
c1646d96 MT |
142 | |
143 | sed -e "s,@libdir@,%{libdir},g" \ | |
802ea3af MT |
144 | -e "s,@prefix@,/usr,g" \ |
145 | -e "s,@exec_prefix@,/usr,g" \ | |
146 | -e "s,@includedir@,/usr/include/nss3,g" \ | |
c1646d96 MT |
147 | -e "s,@MOD_MAJOR_VERSION@,$(grep "#define.*NSS_VMAJOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \ |
148 | -e "s,@MOD_MINOR_VERSION@,$(grep "#define.*NSS_VMINOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \ | |
149 | -e "s,@MOD_PATCH_VERSION@,$(grep "#define.*NSS_VPATCH" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \ | |
802ea3af MT |
150 | < %{DIR_SOURCE}/nss-config.in \ |
151 | > %{BUILDROOT}/usr/bin/nss-config | |
152 | chmod -v 755 %{BUILDROOT}/usr/bin/nss-config | |
153 | ||
154 | install -p -v -m 755 %{DIR_SOURCE}/setup-nsssysinit.sh %{BUILDROOT}/usr/bin | |
155 | ||
94bd60cc | 156 | # Generate file for pkg-config. |
802ea3af | 157 | sed \ |
c1646d96 | 158 | -e "s,%libdir%,%{libdir},g" \ |
802ea3af MT |
159 | -e "s,%prefix%,/usr,g" \ |
160 | -e "s,%exec_prefix%,/usr,g" \ | |
161 | -e "s,%includedir%,/usr/include/nss3,g" \ | |
162 | -e "s,%NSS_VERSION%,%{version},g" \ | |
163 | -e "s,%NSPR_VERSION%,$(nspr-config --version),g" \ | |
802ea3af | 164 | < %{DIR_SOURCE}/nss.pc.in \ |
c1646d96 | 165 | > %{BUILDROOT}%{libdir}/pkgconfig/nss.pc |
802ea3af MT |
166 | |
167 | # Copy the include files we want | |
c1646d96 | 168 | cp -vf mozilla/dist/public/nss/*.h %{BUILDROOT}/usr/include/nss3 |
94bd60cc | 169 | cp -vf mozilla/dist/private/nss/blapi.h %{BUILDROOT}/usr/include/nss3 |
802ea3af | 170 | chmod -v 644 %{BUILDROOT}/usr/include/nss3/*.h |
802ea3af MT |
171 | end |
172 | end | |
173 | ||
802ea3af MT |
174 | packages |
175 | package %{name} | |
176 | ||
177 | package %{name}-libs | |
178 | template LIBS | |
179 | ||
180 | files | |
c1646d96 | 181 | %{libdir}/*.so |
802ea3af MT |
182 | end |
183 | end | |
184 | ||
185 | package %{name}-devel | |
186 | template DEVEL | |
187 | ||
188 | requires | |
189 | nspr-devel | |
94bd60cc | 190 | nss=%{thisver} |
802ea3af MT |
191 | end |
192 | ||
193 | # Mozilla does no versioning :( | |
194 | files | |
195 | /usr/bin/*-config | |
196 | /usr/include | |
c1646d96 | 197 | %{libdir}/pkgconfig |
802ea3af MT |
198 | end |
199 | end | |
1f9bc2f0 | 200 | |
94bd60cc SS |
201 | package %{name}-softokn |
202 | summary = Network Security Services Softoken Module. | |
203 | description | |
204 | Network Security Services Softoken Cryptographic Module. | |
205 | end | |
206 | ||
207 | requires = nss=%{thisver} | |
208 | ||
209 | files | |
210 | %{libdir}/libnssdbm3.so | |
211 | %{libdir}/libsoftokn3.so | |
212 | %{libdir}/nss/unsupported-tools/shlibsign | |
213 | end | |
214 | end | |
215 | ||
216 | package %{name}-softokn-freebl | |
217 | summary = Freebl library for the Network Security Services. | |
218 | description | |
219 | NSS Softoken Cryptographic Module Freelb Library. | |
220 | end | |
221 | ||
222 | requires | |
223 | nss=%{thisver} | |
224 | nss-softokn=%{thisver} | |
225 | end | |
226 | ||
227 | files = %{libdir}/libfreebl3.so | |
228 | end | |
229 | ||
230 | package %{name}-util | |
231 | summary = Network Security Services Utilities Library. | |
232 | description | |
233 | Utilities for Network Security Services and the Softoken module. | |
234 | end | |
235 | ||
236 | requires = nss=%{thisver} | |
237 | ||
238 | files = %{libdir}/libnssutil3.so | |
239 | end | |
240 | ||
1f9bc2f0 MT |
241 | package %{name}-debuginfo |
242 | template DEBUGINFO | |
243 | end | |
802ea3af | 244 | end |