From 06089e3d766e921ac0115ac4b3b9ed88ef7d90f3 Mon Sep 17 00:00:00 2001 From: Leon Poyyayil Date: Fri, 24 Oct 2025 08:43:34 +0200 Subject: [PATCH] initial build instructions --- Building-BorderCastle.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Building-BorderCastle.md diff --git a/Building-BorderCastle.md b/Building-BorderCastle.md new file mode 100644 index 0000000..363f1f7 --- /dev/null +++ b/Building-BorderCastle.md @@ -0,0 +1,40 @@ +# Build Instructions for BorderCastle + +1. Clone this repository into a local work directory, called `IC_HOME` in the following steps, and make it the current directory. +2. Download the full distribution from the BouncyCastle GitHub release page, e.g. `bc-java-r1v81.zip`. +3. Unpack the downloaded archive and rename the created folder to `crypto`: + ```shell + IC_HOME$ unzip bc-java-r1v81.zip + IC_HOME$ mv bc-java-r1v81 crypto + IC_HOME$ chmod -R u+w crypto/* +``` +4. Execute the script to convert the project structure to maven: + ```shell + IC_HOME$ bin/bouncycastle-to-maven-layout.sh +``` +5. Execute the script to perform the package renaming and other replacements. + This script requires the version which is being built as an argument, e.g. **1.81**: + ```shell + IC_HOME$ bin/bouncycastle-to-bordercastle.sh 1.81 +``` +6. Apply the patch for the chosen version to add the BorderCastle specific additions and changes: + ```shell + IC_HOME$ patch -p1 < bouncycastle/crypto-1.81.patch +``` +7. Compile the libraries with Maven (assuming a version compatible with Maven 3.0.5): + ```shell + IC_HOME$ mvn clean install +``` +8. If all went well, you'll find the built libraries in the target folder in each of the maven project folders, e.g.: + ```shell + IC_HOME$ find -name "*.jar" + ./ic-light/target/ic-light-1.81.jar + ./ic-mail/target/ic-mail-1.81.jar + ./ic-pg/target/ic-pg-1.81.jar + ./ic-pkix/target/ic-pkix-1.81.jar + ./ic-prov/target/ic-prov-1.81.jar + ./ic-test/target/ic-test-1.81.jar + ./ic-tls/target/ic-tls-1.81.jar + ./ic-util/target/ic-util-1.81.jar + IC_HOME$ +``` \ No newline at end of file