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