]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - nss/nss.nm
78740359ccdabc450ef2e8ab8b1f772032544403
[people/amarx/ipfire-3.x.git] / nss / nss.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = nss
7 version = 3.13.1
8 release = 2
9
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.
14
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
20 v3 certificates, and other security standards.
21 end
22
23 sources += \
24 %{name}-pem-20100809.tar.bz2
25
26 build
27 requires
28 chrpath
29 nspr-devel
30 perl
31 pkg-config
32 psmisc
33 sqlite-devel
34 zlib-devel
35 end
36
37 ## Define some global environment variables
38
39 export FREEBL_NO_DEPEND=1
40
41 # Enable compiler optimizations and disable debugging code
42 export BUILD_OPT=1
43 export XCFLAGS=%{CFLAGS}
44
45 # Allow the usage of system libraries.
46 export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
47 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
48
49 # Define where to find nspr header files and libraries.
50 export NSPR_INCLUDE_DIR=/usr/include/nspr4
51 export NSPR_LIB_DIR=%{libdir}
52
53 # Disable support for SHA224.
54 export NO_SHA224_AVAILABLE=1
55
56 # Use sqlite from system.
57 export NSS_USE_SYSTEM_SQLITE=1
58
59 if "%{DISTRO_ARCH}" == "x86_64"
60 export USE_64=1
61 end
62
63 prepare
64 # Extract tarball.
65 cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}.tar.gz
66
67 # Extract pem tarball into nss directory.
68 cd %{DIR_APP} && %{MACRO_EXTRACT} %{DIR_DL}/%{name}-pem-20100809.tar.bz2
69
70 # Apply all patches
71 %{MACRO_PATCHES}
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
81 # We have to do the complete install stuff self.
82
83 # Create directory layout.
84 mkdir -pv %{BUILDROOT}/usr/include/nss3
85 mkdir -pv %{BUILDROOT}/usr/{bin,%{lib}}
86 mkdir -pv %{BUILDROOT}%{libdir}/pkgconfig
87 mkdir -pv %{BUILDROOT}%{libdir}/nss/unsupported-tools
88
89 # Install all libraries.
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}
98 install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnssutil3.so \
99 %{BUILDROOT}%{libdir}
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}
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}
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
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/*
127
128 # Copy the binaries we ship as unsupported
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
135 install -p -v -m 755 mozilla/dist/*.OBJ/bin/shlibsign %{BUILDROOT}%{libdir}/nss/unsupported-tools
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
141 chrpath --delete %{BUILDROOT}%{libdir}/nss/unsupported-tools/*
142
143 sed -e "s,@libdir@,%{libdir},g" \
144 -e "s,@prefix@,/usr,g" \
145 -e "s,@exec_prefix@,/usr,g" \
146 -e "s,@includedir@,/usr/include/nss3,g" \
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" \
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
156 # Generate file for pkg-config.
157 sed \
158 -e "s,%libdir%,%{libdir},g" \
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" \
164 < %{DIR_SOURCE}/nss.pc.in \
165 > %{BUILDROOT}%{libdir}/pkgconfig/nss.pc
166
167 # Copy the include files we want
168 cp -vf mozilla/dist/public/nss/*.h %{BUILDROOT}/usr/include/nss3
169 cp -vf mozilla/dist/private/nss/blapi.h %{BUILDROOT}/usr/include/nss3
170 chmod -v 644 %{BUILDROOT}/usr/include/nss3/*.h
171 end
172 end
173
174 packages
175 package %{name}
176
177 package %{name}-libs
178 template LIBS
179
180 files
181 %{libdir}/*.so
182 end
183 end
184
185 package %{name}-devel
186 template DEVEL
187
188 requires
189 nspr-devel
190 nss=%{thisver}
191 end
192
193 # Mozilla does no versioning :(
194 files
195 /usr/bin/*-config
196 /usr/include
197 %{libdir}/pkgconfig
198 end
199 end
200
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
241 package %{name}-debuginfo
242 template DEBUGINFO
243 end
244 end