]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - nss/nss.nm
Merge remote-tracking branch 'maniacikarus/samba'
[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 = 4
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 chrpath
32 nspr-devel
33 nss-softokn-devel
34 nss-util-devel
35 perl
36 pkg-config
37 psmisc
38 sqlite-devel
39 zlib-devel
40 end
41
42 ## Define some global environment variables
43
44 export FREEBL_NO_DEPEND=1
45
46 # Enable compiler optimizations and disable debugging code
47 export BUILD_OPT=1
48 export XCFLAGS=%{CFLAGS}
49
50 export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
51 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
52
53 export NSPR_INCLUDE_DIR=/usr/include/nspr4
54 export NSPR_LIB_DIR=%{libdir}
55
56 export NSS_INCLUDE_DIR=/usr/include/nss3
57 export NSS_LIB_DIR=%{libdir}
58
59 export NSS_USE_SYSTEM_SQLITE=1
60
61 if "%{DISTRO_ARCH}" == "x86_64"
62 export USE_64=1
63 end
64
65 prepare
66 # Extract tarball
67 cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}-stripped.tar.bz2
68
69 # Extract tarball into nss directory.
70 cd %{DIR_APP} && %{MACRO_EXTRACT} %{DIR_DL}/%{name}-pem-20100809.tar.bz2
71
72 # Apply all patches
73 %{MACRO_PATCHES}
74
75 cp -vf %{DIR_SOURCE}/PayPalEE.cert \
76 %{DIR_APP}/mozilla/security/nss/tests/libpkix/certs
77 end
78
79 build
80 make -C ./mozilla/security/coreconf
81 make -C ./mozilla/security/dbm
82 make -C ./mozilla/security/nss
83 end
84
85 install
86 mkdir -pv %{BUILDROOT}/usr/include/nss3
87 mkdir -pv %{BUILDROOT}/usr/{bin,%{lib}}
88 mkdir -pv %{BUILDROOT}%{libdir}/pkgconfig
89 mkdir -pv %{BUILDROOT}%{libdir}/nss/unsupported-tools
90
91 install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnss3.so \
92 %{BUILDROOT}%{libdir}
93 install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnssckbi.so \
94 %{BUILDROOT}%{libdir}
95 install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnsspem.so \
96 %{BUILDROOT}%{libdir}
97 install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnsssysinit.so \
98 %{BUILDROOT}%{libdir}
99 install -p -v -m 755 mozilla/dist/*.OBJ/lib/libsmime3.so \
100 %{BUILDROOT}%{libdir}
101 install -p -v -m 755 mozilla/dist/*.OBJ/lib/libssl3.so \
102 %{BUILDROOT}%{libdir}
103
104 # Install the empty NSS db files
105 mkdir -pv %{BUILDROOT}/etc/pki/nssdb
106 cp -vf %{DIR_SOURCE}/*.db %{BUILDROOT}/etc/pki/nssdb/
107 install -p -v -m 644 %{DIR_SOURCE}/system-pkcs11.txt \
108 %{BUILDROOT}/etc/pki/nssdb/pkcs11.txt
109
110 # Copy the binaries we want
111 install -p -v -m 755 mozilla/dist/*.OBJ/bin/certutil %{BUILDROOT}/usr/bin
112 install -p -v -m 755 mozilla/dist/*.OBJ/bin/cmsutil %{BUILDROOT}/usr/bin
113 install -p -v -m 755 mozilla/dist/*.OBJ/bin/crlutil %{BUILDROOT}/usr/bin
114 install -p -v -m 755 mozilla/dist/*.OBJ/bin/modutil %{BUILDROOT}/usr/bin
115 install -p -v -m 755 mozilla/dist/*.OBJ/bin/pk12util %{BUILDROOT}/usr/bin
116 install -p -v -m 755 mozilla/dist/*.OBJ/bin/signtool %{BUILDROOT}/usr/bin
117 install -p -v -m 755 mozilla/dist/*.OBJ/bin/signver %{BUILDROOT}/usr/bin
118 install -p -v -m 755 mozilla/dist/*.OBJ/bin/ssltap %{BUILDROOT}/usr/bin
119 chrpath --delete %{BUILDROOT}/usr/bin/*
120
121 # Copy the binaries we ship as unsupported
122 install -p -v -m 755 mozilla/dist/*.OBJ/bin/atob %{BUILDROOT}%{libdir}/nss/unsupported-tools
123 install -p -v -m 755 mozilla/dist/*.OBJ/bin/btoa %{BUILDROOT}%{libdir}/nss/unsupported-tools
124 install -p -v -m 755 mozilla/dist/*.OBJ/bin/derdump %{BUILDROOT}%{libdir}/nss/unsupported-tools
125 install -p -v -m 755 mozilla/dist/*.OBJ/bin/ocspclnt %{BUILDROOT}%{libdir}/nss/unsupported-tools
126 install -p -v -m 755 mozilla/dist/*.OBJ/bin/pp %{BUILDROOT}%{libdir}/nss/unsupported-tools
127 install -p -v -m 755 mozilla/dist/*.OBJ/bin/selfserv %{BUILDROOT}%{libdir}/nss/unsupported-tools
128 install -p -v -m 755 mozilla/dist/*.OBJ/bin/strsclnt %{BUILDROOT}%{libdir}/nss/unsupported-tools
129 install -p -v -m 755 mozilla/dist/*.OBJ/bin/symkeyutil %{BUILDROOT}%{libdir}/nss/unsupported-tools
130 install -p -v -m 755 mozilla/dist/*.OBJ/bin/tstclnt %{BUILDROOT}%{libdir}/nss/unsupported-tools
131 install -p -v -m 755 mozilla/dist/*.OBJ/bin/vfyserv %{BUILDROOT}%{libdir}/nss/unsupported-tools
132 install -p -v -m 755 mozilla/dist/*.OBJ/bin/vfychain %{BUILDROOT}%{libdir}/nss/unsupported-tools
133
134 sed -e "s,@libdir@,%{libdir},g" \
135 -e "s,@prefix@,/usr,g" \
136 -e "s,@exec_prefix@,/usr,g" \
137 -e "s,@includedir@,/usr/include/nss3,g" \
138 -e "s,@MOD_MAJOR_VERSION@,$(grep "#define.*NSS_VMAJOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \
139 -e "s,@MOD_MINOR_VERSION@,$(grep "#define.*NSS_VMINOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \
140 -e "s,@MOD_PATCH_VERSION@,$(grep "#define.*NSS_VPATCH" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \
141 < %{DIR_SOURCE}/nss-config.in \
142 > %{BUILDROOT}/usr/bin/nss-config
143 chmod -v 755 %{BUILDROOT}/usr/bin/nss-config
144
145 install -p -v -m 755 %{DIR_SOURCE}/setup-nsssysinit.sh %{BUILDROOT}/usr/bin
146
147 # Set up our package file
148 # The nspr_version and nss_{util|softokn}_version globals used
149 # here match the ones nss has for its Requires.
150
151 # XXX need to fix this
152 sed \
153 -e "s,%libdir%,%{libdir},g" \
154 -e "s,%prefix%,/usr,g" \
155 -e "s,%exec_prefix%,/usr,g" \
156 -e "s,%includedir%,/usr/include/nss3,g" \
157 -e "s,%NSS_VERSION%,%{version},g" \
158 -e "s,%NSPR_VERSION%,$(nspr-config --version),g" \
159 -e "s,%NSSUTIL_VERSION%,$(nss-util-config --version),g" \
160 -e "s,%SOFTOKEN_VERSION%,$(nss-softokn-config --version),g" \
161 < %{DIR_SOURCE}/nss.pc.in \
162 > %{BUILDROOT}%{libdir}/pkgconfig/nss.pc
163
164 # Copy the include files we want
165 cp -vf mozilla/dist/public/nss/*.h %{BUILDROOT}/usr/include/nss3
166 chmod -v 644 %{BUILDROOT}/usr/include/nss3/*.h
167
168 # remove the nss-util-devel headers
169 cd %{BUILDROOT}/usr/include/nss3 && rm -vf \
170 base64.h \
171 ciferfam.h \
172 nssb64.h \
173 nssb64t.h \
174 nsslocks.h \
175 nssilock.h \
176 nssilckt.h \
177 nssrwlk.h \
178 nssrwlkt.h \
179 nssutil.h \
180 pkcs11{,f,n,p,t,u}.h \
181 portreg.h \
182 secasn1.h \
183 secasn1t.h \
184 seccomon.h \
185 secder.h \
186 secdert.h \
187 secdig.h \
188 secdigt.h \
189 secerr.h \
190 secitem.h \
191 secoid.h \
192 secoidt.h \
193 secport.h \
194 utilrename.h
195
196 # remove header shipped in nss-softokn-devel
197 cd %{BUILDROOT}/usr/include/nss3 && rm -vf \
198 blapit.h \
199 ecl-exp.h \
200 hasht.h \
201 sechash.h \
202 secmodt.h \
203 shsign.h \
204 nsslowhash.h
205 end
206 end
207
208 packages
209 package %{name}
210
211 package %{name}-libs
212 template LIBS
213
214 files
215 %{libdir}/*.so
216 end
217 end
218
219 package %{name}-devel
220 template DEVEL
221
222 requires
223 nspr-devel
224 %{name}
225 nss-softokn-devel
226 nss-util-devel
227 end
228
229 # Mozilla does no versioning :(
230 files
231 /usr/bin/*-config
232 /usr/include
233 %{libdir}/pkgconfig
234 end
235 end
236
237 package %{name}-debuginfo
238 template DEBUGINFO
239 end
240 end