]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - pkgs/nss/nss.nm
PKG_GROUP -> PKG_GROUPS on all packages.
[people/ms/ipfire-3.x.git] / pkgs / nss / nss.nm
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
15 # #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include $(PKGROOT)/Include
26
27 PKG_NAME = nss
28 PKG_VER = 3.12.8
29 PKG_REL = 3
30
31 PKG_MAINTAINER =
32 PKG_GROUPS = System/Libraries
33 PKG_URL = http://www.mozilla.org/projects/security/pki/nss/
34 PKG_LICENSE = MPLv1.1 or GPLv2+ or LGPLv2+
35 PKG_SUMMARY = Network Security Services.
36
37 PKG_BUILD_DEPS+= nspr-devel nss-softokn-devel nss-util-devel perl pkg-config \
38 psmisc sqlite-devel zlib-devel
39
40 define PKG_DESCRIPTION
41 Network Security Services (NSS) is a set of libraries designed to \
42 support cross-platform development of security-enabled client and \
43 server applications. Applications built with NSS can support SSL v2 \
44 and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 \
45 v3 certificates, and other security standards.
46 endef
47
48 PKG_TARBALL = $(THISAPP)-stripped.tar.bz2
49 PKG_OBJECTS += nss-pem-20100809.tar.bz2
50
51 PKG_PACKAGES += $(PKG_NAME_REAL)-devel $(PKG_NAME_REAL)-libs
52
53 PKG_DEPS-$(PKG_NAME_REAL)-devel += nspr-devel nss nss-softokn-devel nss-util-devel
54
55 # Mozilla does no versioning :(
56 define PKG_FILES-$(PKG_NAME_REAL)-devel
57 /usr/bin/*-config
58 /usr/include
59 /usr/lib/pkgconfig
60 endef
61
62 define PKG_FILES-$(PKG_NAME_REAL)-libs
63 /usr/lib/*.so
64 endef
65
66 # XXX -> need to be removed
67 define QUALITY_AGENT_WHITELIST_RPATH
68 $$ORIGIN/../lib
69 endef
70
71 ## Define some global environment variables
72
73 export FREEBL_NO_DEPEND=1
74
75 # Enable compiler optimizations and disable debugging code
76 export BUILD_OPT=1
77 export XCFLAGS=$(CFLAGS)
78
79 export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
80 export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
81
82 export NSPR_INCLUDE_DIR=/usr/include/nspr4
83 export NSPR_LIB_DIR=/usr/lib
84
85 export NSS_INCLUDE_DIR=/usr/include/nss3
86 export NSS_LIB_DIR=/usr/lib
87
88 export NSS_USE_SYSTEM_SQLITE=1
89
90 define STAGE_PREPARE
91 cd $(DIR_SRC) && $(DO_EXTRACT) $(DIR_DL)/$(PKG_TARBALL)
92 cd $(DIR_APP) && $(DO_EXTRACT) $(DIR_DL)/nss-pem-20100809.tar.bz2
93
94 $(DO_PATCHES)
95
96 cp -vf $(DIR_SOURCE)/PayPalEE.cert \
97 $(DIR_APP)/mozilla/security/nss/tests/libpkix/certs
98 endef
99
100 define STAGE_BUILD
101 cd $(DIR_APP) && make -C ./mozilla/security/coreconf
102 cd $(DIR_APP) && make -C ./mozilla/security/dbm
103 cd $(DIR_APP) && make -C ./mozilla/security/nss
104 endef
105
106 define STAGE_INSTALL
107 -mkdir -pv $(BUILDROOT)/usr/include/nss3
108 -mkdir -pv $(BUILDROOT)/usr/{bin,lib}
109 -mkdir -pv $(BUILDROOT)/usr/lib/pkgconfig
110 -mkdir -pv $(BUILDROOT)/usr/lib/nss/unsupported-tools
111
112 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/lib/libnss3.so \
113 $(BUILDROOT)/usr/lib
114 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/lib/libnssckbi.so \
115 $(BUILDROOT)/usr/lib
116 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/lib/libnsspem.so \
117 $(BUILDROOT)/usr/lib
118 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/lib/libnsssysinit.so \
119 $(BUILDROOT)/usr/lib
120 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/lib/libsmime3.so \
121 $(BUILDROOT)/usr/lib
122 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/lib/libssl3.so \
123 $(BUILDROOT)/usr/lib
124
125 # Install the empty NSS db files
126 -mkdir -pv $(BUILDROOT)/etc/pki/nssdb
127 cp -vf $(DIR_SOURCE)/*.db $(BUILDROOT)/etc/pki/nssdb/
128 install -p -v -m 644 $(DIR_SOURCE)/system-pkcs11.txt \
129 $(BUILDROOT)/etc/pki/nssdb/pkcs11.txt
130
131 # Copy the binaries we want
132 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/certutil $(BUILDROOT)/usr/bin
133 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/cmsutil $(BUILDROOT)/usr/bin
134 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/crlutil $(BUILDROOT)/usr/bin
135 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/modutil $(BUILDROOT)/usr/bin
136 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/pk12util $(BUILDROOT)/usr/bin
137 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/signtool $(BUILDROOT)/usr/bin
138 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/signver $(BUILDROOT)/usr/bin
139 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/ssltap $(BUILDROOT)/usr/bin
140
141 # Copy the binaries we ship as unsupported
142 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/atob $(BUILDROOT)/usr/lib/nss/unsupported-tools
143 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/btoa $(BUILDROOT)/usr/lib/nss/unsupported-tools
144 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/derdump $(BUILDROOT)/usr/lib/nss/unsupported-tools
145 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/ocspclnt $(BUILDROOT)/usr/lib/nss/unsupported-tools
146 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/pp $(BUILDROOT)/usr/lib/nss/unsupported-tools
147 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/selfserv $(BUILDROOT)/usr/lib/nss/unsupported-tools
148 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/strsclnt $(BUILDROOT)/usr/lib/nss/unsupported-tools
149 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/symkeyutil $(BUILDROOT)/usr/lib/nss/unsupported-tools
150 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/tstclnt $(BUILDROOT)/usr/lib/nss/unsupported-tools
151 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/vfyserv $(BUILDROOT)/usr/lib/nss/unsupported-tools
152 install -p -v -m 755 $(DIR_APP)/mozilla/dist/*.OBJ/bin/vfychain $(BUILDROOT)/usr/lib/nss/unsupported-tools
153
154 sed -e "s,@libdir@,/usr/lib,g" \
155 -e "s,@prefix@,/usr,g" \
156 -e "s,@exec_prefix@,/usr,g" \
157 -e "s,@includedir@,/usr/include/nss3,g" \
158 -e "s,@MOD_MAJOR_VERSION@,$$(grep "#define.*NSS_VMAJOR" $(DIR_APP)/mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \
159 -e "s,@MOD_MINOR_VERSION@,$$(grep "#define.*NSS_VMINOR" $(DIR_APP)/mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \
160 -e "s,@MOD_PATCH_VERSION@,$$(grep "#define.*NSS_VPATCH" $(DIR_APP)/mozilla/security/nss/lib/nss/nss.h | awk '{print $3}'),g" \
161 < $(DIR_SOURCE)/nss-config.in \
162 > $(BUILDROOT)/usr/bin/nss-config
163 chmod -v 755 $(BUILDROOT)/usr/bin/nss-config
164
165 install -p -v -m 755 $(DIR_SOURCE)/setup-nsssysinit.sh $(BUILDROOT)/usr/bin
166
167 # Set up our package file
168 # The nspr_version and nss_{util|softokn}_version globals used
169 # here match the ones nss has for its Requires.
170
171 # XXX need to fix this
172 sed \
173 -e "s,%libdir%,/usr/lib,g" \
174 -e "s,%prefix%,/usr,g" \
175 -e "s,%exec_prefix%,/usr,g" \
176 -e "s,%includedir%,/usr/include/nss3,g" \
177 -e "s,%NSS_VERSION%,$(PKG_VER),g" \
178 -e "s,%NSPR_VERSION%,$$(nspr-config --version),g" \
179 -e "s,%NSSUTIL_VERSION%,$$(nss-util-config --version),g" \
180 -e "s,%SOFTOKEN_VERSION%,$$(nss-softokn-config --version),g" \
181 < $(DIR_SOURCE)/nss.pc.in \
182 > $(BUILDROOT)/usr/lib/pkgconfig/nss.pc
183
184 # Copy the include files we want
185 cp -vf $(DIR_APP)/mozilla/dist/public/nss/*.h $(BUILDROOT)/usr/include/nss3
186 chmod -v 644 $(BUILDROOT)/usr/include/nss3/*.h
187
188 # remove the nss-util-devel headers
189 cd $(BUILDROOT)/usr/include/nss3 && rm -vf \
190 base64.h \
191 ciferfam.h \
192 nssb64.h \
193 nssb64t.h \
194 nsslocks.h \
195 nssilock.h \
196 nssilckt.h \
197 nssrwlk.h \
198 nssrwlkt.h \
199 nssutil.h \
200 pkcs11{,f,n,p,t,u}.h \
201 portreg.h \
202 secasn1.h \
203 secasn1t.h \
204 seccomon.h \
205 secder.h \
206 secdert.h \
207 secdig.h \
208 secdigt.h \
209 secerr.h \
210 secitem.h \
211 secoid.h \
212 secoidt.h \
213 secport.h \
214 utilrename.h
215
216 # remove header shipped in nss-softokn-devel
217 cd $(BUILDROOT)/usr/include/nss3 && rm -vf \
218 blapit.h \
219 ecl-exp.h \
220 hasht.h \
221 sechash.h \
222 secmodt.h \
223 shsign.h \
224 nsslowhash.h
225 endef