-
Download
leveldb-jna
from repository and install sub-modules:git clone [email protected]:protonail/leveldb-jna.git cd leveldb-jna git submodule init git submodule update
-
Install MSYS2 for correspond architecture.
-
Open MinGW shell correspond to platform architecture (MinGW-w64 Win64 Shell or MinGW-w64 Win32 Shell).
-
Update the system packages:
pacman --needed -Sy bash pacman pacman-mirrors msys2-runtime
-
(!!!) Close MSYS2, run it again from Start menu and update the rest:
pacman -Su
-
Install packages for development:
pacman -S base-devel git
-
Install toolchain for correspond architecture:
For Windows x64:
pacman -S mingw-w64-x86_64-toolchain
For Windows x86:
pacman -S mingw-w64-i686-toolchain
-
Install packages required for build:
brew install automake libtool pkg-config
-
Install packages required for build:
apt-get install build-essential apt-get install automake libtool pkg-config
You should repeat these steps for each platform.
-
Open
leveldb-jna
root directory and execute build script:bin/build_leveldb.sh clean
It should build Snappy and LevelDB and copy correspond native library file to
leveldb-jna-native/src/main/resources/<JNA platform identificator>/<library name>.{so,dylib,dll}
. -
Run tests
mvn test
-
Build Java library with native binaries inside and deploy it to remote Maven repository:
mvn deploy -DaltSnapshotDeploymentRepository=<altSnapshotDeploymentRepository> -DaltReleaseDeploymentRepository=<altReleaseDeploymentRepository> -pl leveldb-jna-native
where altSnapshotDeploymentRepository and altReleaseDeploymentRepository is your Maven repositories (i.e. run on Nexus Sonatype). Details is here.
-
Build Core Java library and deploy it to remote Maven repository:
mvn deploy -DaltSnapshotDeploymentRepository=<altSnapshotDeploymentRepository> -DaltReleaseDeploymentRepository=<altReleaseDeploymentRepository> -pl leveldb-jna-core
where altSnapshotDeploymentRepository and altReleaseDeploymentRepository is your Maven repositories (i.e. run on Nexus Sonatype). Details is here.