forked from bcgit/bc-java
-
Notifications
You must be signed in to change notification settings - Fork 140
/
buildj2me
242 lines (230 loc) · 11.4 KB
/
buildj2me
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
#!/bin/sh -
#
# build script for J2ME - this only includes the lightweight API
# if a distribution name is given as an argument the build is placed
# in a subdirectory - nothing gets compiled as we expect the classes
# to be in ./palm
#
# Note: this script expects javadoc for jdk 1.3 to be in your path.
#
base=$1
version=`echo $base | sed -e "s/\([0-9]\)\([0-9a-z]*\)/\1.\2/"`
WINDOWTITLE="Bouncy Castle Cryptography $version API Specification"
HEADER="<b>Bouncy Castle Cryptography $version</b>"
DOCTITLE="Bouncy Castle $version API Specification"
echo "making j2me lightweight release"
if test "$base" != ""
then
target=build/artifacts/j2me/lcrypto-j2me-$base
mkdir -p $target
mkdir $target/javadoc
mkdir $target/src
tar cf - index.html LICENSE.html CONTRIBUTORS.html docs zips | (cd $target && tar xf -)
((cd core/src/main/java; tar cf - * ) | (cd $target/src && tar xf -))
((cd core/src/main/javadoc; tar cf - * ) | (cd $target/src && tar xf -))
((cd core/src/main/jdk1.4; tar cf - * ) | (cd $target/src && tar xf -))
((cd core/src/main/j2me; tar cf - * ) | (cd $target/src && tar xf -))
((cd core/src/test/java; tar cf - * ) | (cd $target/src && tar xf -))
((cd core/src/test/j2me; tar cf - * ) | (cd $target/src && tar xf -))
((cd pkix/src/main/java; tar cf - * ) | (cd $target/src && tar xf -))
((cd pkix/src/main/javadoc; tar cf - * ) | (cd $target/src && tar xf -))
((cd pkix/src/main/j2me; tar cf - * ) | (cd $target/src && tar xf -))
((cd pkix/src/test/java; tar cf - org/bouncycastle/cert/test ) | (cd $target/src && tar xf - ) )
((cd pkix/src/test/j2me; tar cf - * ) | (cd $target/src && tar xf -))
((cd pg/src/main/java; tar cf - * ) | (cd $target/src && tar xf -))
((cd pg/src/main/javadoc; tar cf - * ) | (cd $target/src && tar xf -))
((cd pg/src/main/j2me; tar cf - * ) | (cd $target/src && tar xf -))
(cd $target;
rm src/org/bouncycastle/crypto/test/AllTests.java
rm src/org/bouncycastle/crypto/test/SHA3DigestTest.java
rm src/org/bouncycastle/crypto/test/SHAKEDigestTest.java
rm src/org/bouncycastle/util/StreamParser.java
rm src/org/bouncycastle/util/StreamParsingException.java
rm src/org/bouncycastle/asn1/util/Dump.java
rm src/org/bouncycastle/asn1/test/AllTests.java
rm src/org/bouncycastle/asn1/test/ASN1IntegerTest.java
rm src/org/bouncycastle/asn1/test/ASN1SequenceParserTest.java
rm src/org/bouncycastle/asn1/test/AttributeTableUnitTest.java
rm src/org/bouncycastle/asn1/test/BiometricDataUnitTest.java
rm src/org/bouncycastle/asn1/test/BitStringConstantTester.java
rm src/org/bouncycastle/asn1/test/CommitmentTypeIndicationUnitTest.java
rm src/org/bouncycastle/asn1/test/CommitmentTypeQualifierUnitTest.java
rm src/org/bouncycastle/asn1/test/DataGroupHashUnitTest.java
rm src/org/bouncycastle/asn1/test/DERUTF8StringTest.java
rm src/org/bouncycastle/asn1/test/EqualsAndHashCodeTest.java
rm src/org/bouncycastle/asn1/test/GeneralizedTimeTest.java
rm src/org/bouncycastle/asn1/test/GenerationTest.java
rm src/org/bouncycastle/asn1/test/InputStreamTest.java
rm src/org/bouncycastle/asn1/test/Iso4217CurrencyCodeUnitTest.java
rm src/org/bouncycastle/asn1/test/KeyUsageTest.java
rm src/org/bouncycastle/asn1/test/LDSSecurityObjectUnitTest.java
rm src/org/bouncycastle/asn1/test/CMCFailInfoTest.java
rm src/org/bouncycastle/asn1/test/CMCStatusTest.java
rm src/org/bouncycastle/asn1/test/PublishTrustAnchorsTest.java
rm src/org/bouncycastle/asn1/test/RevokeRequestTest.java
rm -rf src/org/bouncycastle/math/raw/test
rm -rf src/org/bouncycastle/math/test
rm -rf src/org/bouncycastle/pqc/math/ntru
rm -rf src/org/bouncycastle/pqc/crypto/test/ntru
rm -rf src/org/bouncycastle/pqc/crypto/*/NTRU*
rm -rf src/org/bouncycastle/pqc/crypto/*/BitStringTest*
rm -rf src/org/bouncycastle/pqc/crypto/*/IndexGenerator*
rm -rf src/org/bouncycastle/pqc/crypto/xmss
rm -rf src/org/bouncycastle/pqc/crypto/test/XMSS*
rm src/org/bouncycastle/asn1/test/MonetaryValueUnitTest.java
rm src/org/bouncycastle/asn1/test/NameOrPseudonymUnitTest.java
rm src/org/bouncycastle/asn1/test/NetscapeCertTypeTest.java
rm src/org/bouncycastle/asn1/test/OctetStringTest.java
rm src/org/bouncycastle/asn1/test/ParseTest.java
rm src/org/bouncycastle/asn1/test/PersonalDataUnitTest.java
rm src/org/bouncycastle/asn1/test/PKIFailureInfoTest.java
rm src/org/bouncycastle/asn1/test/QCStatementUnitTest.java
rm src/org/bouncycastle/asn1/test/ReasonFlagsTest.java
rm src/org/bouncycastle/asn1/test/SemanticsInformationUnitTest.java
rm src/org/bouncycastle/asn1/test/SetTest.java
rm src/org/bouncycastle/asn1/test/SignerLocationUnitTest.java
rm src/org/bouncycastle/asn1/test/SMIMETest.java
rm src/org/bouncycastle/asn1/test/TagTest.java
rm src/org/bouncycastle/asn1/test/TypeOfBiometricDataUnitTest.java
rm src/org/bouncycastle/asn1/test/UTCTimeTest.java
rm src/org/bouncycastle/crypto/test/AESVectorFileTest.java
rm src/org/bouncycastle/crypto/test/GCMReorderTest.java
rm src/org/bouncycastle/crypto/test/HCFamilyVecTest.java
rm src/org/bouncycastle/crypto/test/RSABlindedTest.java
find src -name AllTests.java -exec rm {} \;
find src -name jcajce -exec rm -r {} \;
rm src/org/bouncycastle/asn1/test/GetInstanceTest.java
rm src/org/bouncycastle/asn1/test/ASN1SequenceParserTest.java
rm src/org/bouncycastle/asn1/test/OctetStringTest.java
rm src/org/bouncycastle/asn1/test/ParseTest.java
rm src/org/bouncycastle/crypto/test/GCMReorderTest.java
rm -r src/org/bouncycastle/pqc/crypto/test
rm src/org/bouncycastle/cert/test/BcCertTest.java
rm src/org/bouncycastle/cert/test/GOST3410_2012CMSTest.java
rm src/org/bouncycastle/crypto/test/SCryptTest.java
rm src/org/bouncycastle/crypto/examples/DESExample.java
rm src/org/bouncycastle/pqc/crypto/test/EncryptionKeyTest.java
rm -r src/org/bouncycastle/util/io/pem
rm -r src/org/bouncycastle/crypto/test/cavp
rm -r src/org/bouncycastle/crypto/test/speedy
rm -r src/org/bouncycastle/asn1/test/EnumeratedTest.java
rm -r src/org/bouncycastle/crypto/test/KDFFeedbackGeneratorTest.java
rm -r src/org/bouncycastle/crypto/test/KDFDoublePipelineIteratorGeneratorTest.java
rm -r src/org/bouncycastle/crypto/test/KDFCounterGeneratorTest.java
rm src/org/bouncycastle/cert/test/ConverterTest.java
rm src/org/bouncycastle/cert/test/BcPKCS10Test.java
rm src/org/bouncycastle/cert/test/BcAttrCertTest.java
rm src/org/bouncycastle/cert/test/BcAttrCertSelectorTest.java
rm src/org/bouncycastle/cert/test/CertPathLoopTest.java
rm src/org/bouncycastle/cert/test/DANETest.java
rm src/org/bouncycastle/cert/test/X509ExtensionUtilsTest.java
rm src/org/bouncycastle/crypto/test/BigSkippingCipherTest.java
rm -r src/org/bouncycastle/util/utiltest
rm -r src/org/bouncycastle/openpgp/examples
rm src/org/bouncycastle/openpgp/PGPCompressed*
rm -r src/org/bouncycastle/util/encoders/test
rm -r src/org/bouncycastle/util/io/test
rm src/org/bouncycastle/cms/CMSProcessableFile.java
rm -r src/org/bouncycastle/math/ec/test
rm -r src/org/bouncycastle/crypto/agreement/test
rm -r src/org/bouncycastle/crypto/tls/test
rm -r src/org/bouncycastle/i18n
rm -r src/org/bouncycastle/openssl
rm -r src/org/bouncycastle/apache
rm -r src/org/bouncycastle/voms
rm -r src/org/bouncycastle/math/ec/tools
rm src/org/bouncycastle/mozilla/SignedPublicKeyAndChallenge.java
)
find $target/src -name "*.java" -exec scripts/trim.sh \{\} \;
(2>&1 find $target -name CVS -exec rm -rf \{\} \; ) > /dev/null
(
cd $target;
javadoc -windowtitle "$WINDOWTITLE" -doctitle "$DOCTITLE" \
-header "$HEADER" \
-group "Lightweight Crypto Packages" "org.bouncycastle.crypto*" \
-group "ASN.1 Support Packages" "org.bouncycastle.asn1*" \
-group "OpenPGP Support Packages" "org.bouncycastle.bcpg*:org.bouncycastle.openpgp*" \
-group "Basic Signing And Encryption" "org.bouncycastle.operator*" \
-group "Certificate Generation And Handling Support Packages" "org.bouncycastle.cert*" \
-group "CMS Support Packages" "org.bouncycastle.cms*" \
-group "EAC Support Packages" "org.bouncycastle.eac*" \
-group "TSP Support Packages" "org.bouncycastle.tsp*" \
-group "PKCS Support Packages" "org.bouncycastle.pkcs*" \
-group "Post-Quantum Crypto Packages" "org.bouncycastle.pqc*" \
-group "Utility Packages" "org.bouncycastle.util*:org.bouncycastle.math*" \
-classpath classes \
-d javadoc -sourcepath src -breakiterator \
org.bouncycastle.asn1 \
org.bouncycastle.asn1.cmp \
org.bouncycastle.asn1.cms \
org.bouncycastle.asn1.cryptopro \
org.bouncycastle.asn1.esf \
org.bouncycastle.asn1.ess \
org.bouncycastle.asn1.gnu \
org.bouncycastle.asn1.iana \
org.bouncycastle.asn1.icao \
org.bouncycastle.asn1.misc \
org.bouncycastle.asn1.mozilla \
org.bouncycastle.asn1.nist \
org.bouncycastle.asn1.ocsp \
org.bouncycastle.asn1.oiw \
org.bouncycastle.asn1.pkcs \
org.bouncycastle.asn1.sec \
org.bouncycastle.asn1.smime \
org.bouncycastle.asn1.teletrust \
org.bouncycastle.asn1.test \
org.bouncycastle.asn1.tsp \
org.bouncycastle.asn1.util \
org.bouncycastle.asn1.x500 \
org.bouncycastle.asn1.x500.style \
org.bouncycastle.asn1.x509 \
org.bouncycastle.asn1.x9 \
org.bouncycastle.bcpg \
org.bouncycastle.bcpg.sig \
org.bouncycastle.openpgp \
org.bouncycastle.openpgp.bc \
org.bouncycastle.openpgp.operator \
org.bouncycastle.openpgp.operator.bc \
org.bouncycastle.operator \
org.bouncycastle.operator.bc \
org.bouncycastle.cert \
org.bouncycastle.cert.crmf \
org.bouncycastle.cert.crmf.bc \
org.bouncycastle.cert.cmp \
org.bouncycastle.pkcs \
org.bouncycastle.pkcs.bc \
org.bouncycastle.tsp \
org.bouncycastle.cms \
org.bouncycastle.cms.bc \
org.bouncycastle.math.ec \
org.bouncycastle.crypto \
org.bouncycastle.crypto.agreement \
org.bouncycastle.crypto.commitments \
org.bouncycastle.crypto.digests \
org.bouncycastle.crypto.encodings \
org.bouncycastle.crypto.engines \
org.bouncycastle.crypto.generators \
org.bouncycastle.crypto.io \
org.bouncycastle.crypto.kems \
org.bouncycastle.crypto.macs \
org.bouncycastle.crypto.modes \
org.bouncycastle.crypto.params \
org.bouncycastle.crypto.parsers \
org.bouncycastle.crypto.paddings \
org.bouncycastle.crypto.signers \
org.bouncycastle.crypto.prng \
org.bouncycastle.crypto.tls \
org.bouncycastle.crypto.test \
org.bouncycastle.crypto.util \
org.bouncycastle.crypto.examples \
org.bouncycastle.pqc.asn1 \
org.bouncycastle.pqc.crypto \
org.bouncycastle.pqc.crypto.rainbow \
org.bouncycastle.pqc.crypto.mceliece \
org.bouncycastle.pqc.crypto.gmss \
org.bouncycastle.pqc.math.linearalgebra \
org.bouncycastle.util \
org.bouncycastle.util.encoders \
org.bouncycastle.util.test > /dev/null \
)
fi