This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nss.cygport
153 lines (133 loc) · 4.24 KB
/
nss.cygport
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
NAME="nss"
VERSION=3.45
RELEASE=1
CATEGORY="Utils"
SUMMARY="Netscape Network Security Services"
DESCRIPTION="Network Security Services (NSS) is a set of libraries designed
to support cross-platform development of security-enabled client and server
applications. Applications built with NSS can support SSL v2 and v3, TLS,
PKCS#5, PKCS#7, PKCS#11, PKCS#12, S/MIME, X.509 v3 certificates, and other
security standards."
HOMEPAGE="http://www.mozilla.org/projects/security/pki/nss/"
SRC_URI="https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_${VERSION//./_}_RTM/src/nss-${VERSION}.tar.gz
fedora/nss-util.pc.in
fedora/nss-util-config.in
fedora/nss-softokn.pc.in
fedora/nss-softokn-config.in
fedora/nss.pc.in
fedora/nss-config.in
https://pkgs.fedoraproject.org/repo/pkgs/nss/blank-cert8.db/a5ae49867124ac75f029a9a33af31bad/blank-cert8.db
https://pkgs.fedoraproject.org/repo/pkgs/nss/blank-cert9.db/691e663ccc07b7a1eaa6f088e03bf8e2/blank-cert9.db
https://pkgs.fedoraproject.org/repo/pkgs/nss/blank-key3.db/9315689bbd9f28ceebd47894f99fccbd/blank-key3.db
https://pkgs.fedoraproject.org/repo/pkgs/nss/blank-key4.db/2ec9e0606ba40fe65196545564b7cc2a/blank-key4.db
https://pkgs.fedoraproject.org/repo/pkgs/nss/blank-secmod.db/73bc040a0542bba387e6dd7fb9fd7d23/blank-secmod.db
fedora/system-pkcs11.txt
fedora/setup-nsssysinit.sh
fedora/nss-config.xml
fedora/setup-nsssysinit.xml
fedora/pkcs11.txt.xml
fedora/cert8.db.xml
fedora/cert9.db.xml
fedora/key3.db.xml
fedora/key4.db.xml
fedora/secmod.db.xml
fedora/nss-p11-kit.config
"
PATCH_URI="
fedora/nss-539183.patch
fedora/iquote.patch
3.30.2-cygwin.patch
3.45-docs.patch
"
PKG_NAMES="nss libnss3 libnss-devel"
nss_CONTENTS="
--exclude=*-config*
usr/bin/*.exe
usr/bin/setup-nsssysinit
usr/share/doc/
usr/share/man/man1/
"
libnss3_CATEGORY="Libs"
libnss3_REQUIRES="ca-certificates crypto-policies p11-kit-trust"
libnss3_CONTENTS="
etc/
usr/bin/cyg*3.chk
usr/bin/cyg*3.dll
usr/lib/libnss*.so
usr/share/man/man5/
"
libnss_devel_CATEGORY="Libs"
libnss_devel_CONTENTS="
usr/bin/*-config
usr/include/nss/
usr/lib/lib*.a
usr/lib/pkgconfig/nss*.pc
usr/share/man/man1/*-config.1*
"
CYGPORT_USE_UNSTABLE_API=1
src_unpack_hook() {
mv *.xml nss/doc/
rm -fr nss/doc/{html,nroff}/
}
src_compile() {
lndirs
cd ${B}/nss
export FREEBL_NO_DEPEND=1
export FREEBL_LOWHASH=1
export IN_TREE_FREEBL_HEADERS_FIRST=1
export NSS_USE_SYSTEM_SQLITE=1
export NSS_ALLOW_SSLKEYLOGFILE=1
export POLICY_FILE="nss.config"
export POLICY_PATH="/etc/crypto-policies/back-ends"
cygmake -j1 CC="${CC}" OPTIMIZER="${CFLAGS}"
cygmake -j1 build_docs
for l in nss nss-softokn nss-util
do
sed -e "s,@prefix@,/usr,g" \
-e "s,@MOD_MAJOR_VERSION@,${PV[1]},g" \
-e "s,@MOD_MINOR_VERSION@,${PV[2]},g" \
-e "s,@MOD_PATCH_VERSION@,${PV[3]},g" \
${S}/$l-config.in > ${B}/dist/$l-config
sed -e "s,%prefix%,/usr,g" \
-e "s,%exec_prefix%,/usr,g" \
-e "s,%includedir%,/usr/include/nss," \
-e "s,%libdir%,/usr/lib,g" \
-e "s,%NSPR_VERSION%,`nspr-config --version`,g" \
-e "s,%NSS_VERSION%,${VERSION},g" \
-e "s,%NSSUTIL_VERSION%,${VERSION},g" \
-e "s,%SOFTOKN_VERSION%,${VERSION},g" \
${S}/$l.pc.in > ${B}/dist/$l.pc
done
}
src_install() {
cd ${B}/dist
dobin CYGWIN*/bin/{cert,cms,crl,mod,pk12}util.exe
dobin CYGWIN*/bin/{signtool,signver,ssltap}.exe
dobin CYGWIN*/lib/*3.dll
dobin nss-config nss-softokn-config nss-util-config
insinto /usr/bin
doins CYGWIN*/lib/*.chk
dolib CYGWIN*/lib/*3.dll.a CYGWIN*/lib/lib{crmf,nssb,nssckfw}.a
includeinto nss
doinclude public/nss/*.h
dopkgconfig nss.pc nss-softokn.pc nss-util.pc
# https://fedoraproject.org/wiki/Features/SharedSystemCertificates
dosym /usr/lib/pkcs11/p11-kit-trust.so /usr/lib/libnssckbi.so
# crypto-policies
insinto /etc/crypto-policies/local.d
doins ${S}/nss-p11-kit.config
insinto /etc/pki/nssdb
# legacy db
newins ${S}/blank-cert8.db cert8.db
newins ${S}/blank-key3.db key3.db
newins ${S}/blank-secmod.db secmod.db
# shared db
newins ${S}/blank-cert9.db cert9.db
newins ${S}/blank-key4.db key4.db
newins ${S}/system-pkcs11.txt pkcs11.txt
newlib CYGWIN*/lib/cygnsssysinit.dll libnsssysinit.so
newbin ${S}/setup-nsssysinit.sh setup-nsssysinit
make_etc_defaults /etc/pki/nssdb
doman ${B}/nss/doc/nroff/*.[15]
dodoc ${S}/nss/COPYING ${S}/nss/trademarks.txt
}