]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - nss/nss.nm
Merge remote-tracking branch 'stevee/sqlite'
[people/amarx/ipfire-3.x.git] / nss / nss.nm
CommitLineData
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 6name = nss
c288ae89
SS
7ver_major = 3
8ver_minor = 13
9ver_patch = 1
10version = %{ver_major}.%{ver_minor}.%{ver_patch}
11release = 3
137c9981 12
c288ae89 13maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
802ea3af
MT
14groups = System/Libraries
15url = http://www.mozilla.org/projects/security/pki/nss/
16license = MPLv1.1 or GPLv2+ or LGPLv2+
17summary = Network Security Services.
137c9981 18
802ea3af
MT
19description
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
137c9981 24 v3 certificates, and other security standards.
802ea3af 25end
137c9981 26
94bd60cc 27sources += \
802ea3af 28 %{name}-pem-20100809.tar.bz2
137c9981 29
c288ae89
SS
30source_dl = ftp://ftp.mozilla.org/pub/security/nss/releases/NSS_%{ver_major}_%{ver_minor}_%{ver_patch}_RTM/src/
31
802ea3af
MT
32build
33 requires
c1646d96 34 chrpath
802ea3af 35 nspr-devel
802ea3af
MT
36 perl
37 pkg-config
38 psmisc
39 sqlite-devel
40 zlib-devel
41 end
137c9981 42
802ea3af 43 ## Define some global environment variables
137c9981 44
802ea3af 45 export FREEBL_NO_DEPEND=1
137c9981 46
802ea3af
MT
47 # Enable compiler optimizations and disable debugging code
48 export BUILD_OPT=1
49 export XCFLAGS=%{CFLAGS}
137c9981 50
94bd60cc 51 # Allow the usage of system libraries.
802ea3af
MT
52 export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
53 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
137c9981 54
94bd60cc 55 # Define where to find nspr header files and libraries.
802ea3af 56 export NSPR_INCLUDE_DIR=/usr/include/nspr4
c1646d96 57 export NSPR_LIB_DIR=%{libdir}
137c9981 58
94bd60cc
SS
59 # Disable support for SHA224.
60 export NO_SHA224_AVAILABLE=1
137c9981 61
94bd60cc 62 # Use sqlite from system.
802ea3af 63 export NSS_USE_SYSTEM_SQLITE=1
137c9981 64
c1646d96
MT
65 if "%{DISTRO_ARCH}" == "x86_64"
66 export USE_64=1
67 end
68
802ea3af 69 prepare
94bd60cc
SS
70 # Extract tarball.
71 cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}.tar.gz
137c9981 72
94bd60cc 73 # Extract pem tarball into nss directory.
802ea3af 74 cd %{DIR_APP} && %{MACRO_EXTRACT} %{DIR_DL}/%{name}-pem-20100809.tar.bz2
1f9bc2f0 75
802ea3af
MT
76 # Apply all patches
77 %{MACRO_PATCHES}
802ea3af
MT
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
94bd60cc
SS
87 # We have to do the complete install stuff self.
88
89 # Create directory layout.
802ea3af 90 mkdir -pv %{BUILDROOT}/usr/include/nss3
c1646d96
MT
91 mkdir -pv %{BUILDROOT}/usr/{bin,%{lib}}
92 mkdir -pv %{BUILDROOT}%{libdir}/pkgconfig
93 mkdir -pv %{BUILDROOT}%{libdir}/nss/unsupported-tools
94
94bd60cc 95 # Install all libraries.
c1646d96
MT
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}
94bd60cc
SS
104 install -p -v -m 755 mozilla/dist/*.OBJ/lib/libnssutil3.so \
105 %{BUILDROOT}%{libdir}
c1646d96
MT
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}
94bd60cc
SS
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}
802ea3af
MT
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
c1646d96
MT
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/*
802ea3af
MT
133
134 # Copy the binaries we ship as unsupported
c1646d96
MT
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
94bd60cc 141 install -p -v -m 755 mozilla/dist/*.OBJ/bin/shlibsign %{BUILDROOT}%{libdir}/nss/unsupported-tools
c1646d96
MT
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
94bd60cc 147 chrpath --delete %{BUILDROOT}%{libdir}/nss/unsupported-tools/*
c1646d96
MT
148
149 sed -e "s,@libdir@,%{libdir},g" \
802ea3af
MT
150 -e "s,@prefix@,/usr,g" \
151 -e "s,@exec_prefix@,/usr,g" \
152 -e "s,@includedir@,/usr/include/nss3,g" \
c1646d96
MT
153 -e "s,@MOD_MAJOR_VERSION@,$(grep "#define.*NSS_VMAJOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \
154 -e "s,@MOD_MINOR_VERSION@,$(grep "#define.*NSS_VMINOR" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \
155 -e "s,@MOD_PATCH_VERSION@,$(grep "#define.*NSS_VPATCH" mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \
802ea3af
MT
156 < %{DIR_SOURCE}/nss-config.in \
157 > %{BUILDROOT}/usr/bin/nss-config
158 chmod -v 755 %{BUILDROOT}/usr/bin/nss-config
159
160 install -p -v -m 755 %{DIR_SOURCE}/setup-nsssysinit.sh %{BUILDROOT}/usr/bin
161
94bd60cc 162 # Generate file for pkg-config.
802ea3af 163 sed \
c1646d96 164 -e "s,%libdir%,%{libdir},g" \
802ea3af
MT
165 -e "s,%prefix%,/usr,g" \
166 -e "s,%exec_prefix%,/usr,g" \
167 -e "s,%includedir%,/usr/include/nss3,g" \
168 -e "s,%NSS_VERSION%,%{version},g" \
169 -e "s,%NSPR_VERSION%,$(nspr-config --version),g" \
802ea3af 170 < %{DIR_SOURCE}/nss.pc.in \
c1646d96 171 > %{BUILDROOT}%{libdir}/pkgconfig/nss.pc
802ea3af
MT
172
173 # Copy the include files we want
c1646d96 174 cp -vf mozilla/dist/public/nss/*.h %{BUILDROOT}/usr/include/nss3
94bd60cc 175 cp -vf mozilla/dist/private/nss/blapi.h %{BUILDROOT}/usr/include/nss3
802ea3af 176 chmod -v 644 %{BUILDROOT}/usr/include/nss3/*.h
802ea3af
MT
177 end
178end
179
802ea3af
MT
180packages
181 package %{name}
182
183 package %{name}-libs
184 template LIBS
185
c288ae89
SS
186 requires
187 nss-softokn=%{thisver}
188 nss-softokn-freebl=%{thisver}
189 end
190
802ea3af 191 files
c1646d96 192 %{libdir}/*.so
802ea3af
MT
193 end
194 end
195
196 package %{name}-devel
197 template DEVEL
198
199 requires
200 nspr-devel
94bd60cc 201 nss=%{thisver}
802ea3af
MT
202 end
203
204 # Mozilla does no versioning :(
205 files
206 /usr/bin/*-config
207 /usr/include
c1646d96 208 %{libdir}/pkgconfig
802ea3af
MT
209 end
210 end
1f9bc2f0 211
94bd60cc
SS
212 package %{name}-softokn
213 summary = Network Security Services Softoken Module.
214 description
215 Network Security Services Softoken Cryptographic Module.
216 end
217
218 requires = nss=%{thisver}
219
220 files
221 %{libdir}/libnssdbm3.so
222 %{libdir}/libsoftokn3.so
223 %{libdir}/nss/unsupported-tools/shlibsign
224 end
225 end
226
227 package %{name}-softokn-freebl
228 summary = Freebl library for the Network Security Services.
229 description
230 NSS Softoken Cryptographic Module Freelb Library.
231 end
232
233 requires
234 nss=%{thisver}
235 nss-softokn=%{thisver}
236 end
237
238 files = %{libdir}/libfreebl3.so
239 end
240
241 package %{name}-util
242 summary = Network Security Services Utilities Library.
243 description
244 Utilities for Network Security Services and the Softoken module.
245 end
246
247 requires = nss=%{thisver}
248
249 files = %{libdir}/libnssutil3.so
250 end
251
1f9bc2f0
MT
252 package %{name}-debuginfo
253 template DEBUGINFO
254 end
802ea3af 255end