]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - nss/nss.nm
Add a -debuginfo for every package that is not noarch.
[people/ms/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.12.8
8 release = 3
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 source_dl =
24 sources
25 %{thisapp}-stripped.tar.bz2
26 %{name}-pem-20100809.tar.bz2
27 end
28
29 build
30 requires
31 nspr-devel
32 nss-softokn-devel
33 nss-util-devel
34 perl
35 pkg-config
36 psmisc
37 sqlite-devel
38 zlib-devel
39 end
40
41 ## Define some global environment variables
42
43 export FREEBL_NO_DEPEND=1
44
45 # Enable compiler optimizations and disable debugging code
46 export BUILD_OPT=1
47 export XCFLAGS=%{CFLAGS}
48
49 export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
50 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
51
52 export NSPR_INCLUDE_DIR=/usr/include/nspr4
53 export NSPR_LIB_DIR=/usr/lib
54
55 export NSS_INCLUDE_DIR=/usr/include/nss3
56 export NSS_LIB_DIR=/usr/lib
57
58 export NSS_USE_SYSTEM_SQLITE=1
59
60 prepare
61 # Extract tarball
62 cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}-stripped.tar.bz2
63
64 # Extract tarball into nss directory.
65 cd %{DIR_APP} && %{MACRO_EXTRACT} %{DIR_DL}/%{name}-pem-20100809.tar.bz2
66
67 # Apply all patches
68 %{MACRO_PATCHES}
69
70 cp -vf %{DIR_SOURCE}/PayPalEE.cert \
71 %{DIR_APP}/mozilla/security/nss/tests/libpkix/certs
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 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
85
86 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnss3.so \
87 %{BUILDROOT}/usr/lib
88 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnssckbi.so \
89 %{BUILDROOT}/usr/lib
90 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnsspem.so \
91 %{BUILDROOT}/usr/lib
92 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libnsssysinit.so \
93 %{BUILDROOT}/usr/lib
94 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libsmime3.so \
95 %{BUILDROOT}/usr/lib
96 install -p -v -m 755 %{DIR_APP}/mozilla/dist/*.OBJ/lib/libssl3.so \
97 %{BUILDROOT}/usr/lib
98
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
104
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
114
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
127
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
138
139 install -p -v -m 755 %{DIR_SOURCE}/setup-nsssysinit.sh %{BUILDROOT}/usr/bin
140
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.
144
145 # XXX need to fix this
146 sed \
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
157
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
161
162 # remove the nss-util-devel headers
163 cd %{BUILDROOT}/usr/include/nss3 && rm -vf \
164 base64.h \
165 ciferfam.h \
166 nssb64.h \
167 nssb64t.h \
168 nsslocks.h \
169 nssilock.h \
170 nssilckt.h \
171 nssrwlk.h \
172 nssrwlkt.h \
173 nssutil.h \
174 pkcs11{,f,n,p,t,u}.h \
175 portreg.h \
176 secasn1.h \
177 secasn1t.h \
178 seccomon.h \
179 secder.h \
180 secdert.h \
181 secdig.h \
182 secdigt.h \
183 secerr.h \
184 secitem.h \
185 secoid.h \
186 secoidt.h \
187 secport.h \
188 utilrename.h
189
190 # remove header shipped in nss-softokn-devel
191 cd %{BUILDROOT}/usr/include/nss3 && rm -vf \
192 blapit.h \
193 ecl-exp.h \
194 hasht.h \
195 sechash.h \
196 secmodt.h \
197 shsign.h \
198 nsslowhash.h
199 end
200 end
201
202 # XXX need to be removed
203 quality-agent
204 whitelist_rpath
205 $ORIGIN/../lib
206 end
207 end
208
209 packages
210 package %{name}
211
212 package %{name}-libs
213 template LIBS
214
215 files
216 /usr/lib/*.so
217 end
218 end
219
220 package %{name}-devel
221 template DEVEL
222
223 requires
224 nspr-devel
225 %{name}
226 nss-softokn-devel
227 nss-util-devel
228 end
229
230 # Mozilla does no versioning :(
231 files
232 /usr/bin/*-config
233 /usr/include
234 /usr/lib/pkgconfig
235 end
236 end
237
238 package %{name}-debuginfo
239 template DEBUGINFO
240 end
241 end