Last active
August 30, 2018 13:50
-
-
Save mqu/6ed2a3f1530a6a0552aa1b827af809fa to your computer and use it in GitHub Desktop.
building kaitai-struct-compiler from source as a Debian Package using Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # links: | |
| # - http://kaitai.io/ | |
| # - http://doc.kaitai.io/developers.html#_building_for_jvm | |
| # - https://hub.docker.com/r/hseeberger/scala-sbt/ | |
| # - https://www.scala-sbt.org/ | |
| # tags : sbt, kaitai, docker | |
| # ------------------------------------------------------------------------ | |
| # in your shell | |
| # ------------------------------------------------------------------------ | |
| tmp=$DIR/tmp/kaitai | |
| mkdir -p $tmp | |
| docker run --rm -it -v $dir:/srv/kaitai hseeberger/scala-sbt /bin/bash | |
| # ------------------------------------------------------------------------ | |
| # now in a docker container | |
| # ------------------------------------------------------------------------ | |
| apt update | |
| apt-get install -y dpkg dpkg-sig dpkg-dev lintian fakeroot | |
| # download and install kaitai_struct_compiler from sources | |
| cd /srv | |
| git clone https://github.com/kaitai-io/kaitai_struct_compiler.git | |
| cd kaitai* | |
| # building process | |
| sbt compilerJVM/debian:packageBin | |
| # package should be available in this directory | |
| ls jvm/target/kaitai-struct-compiler_*_all.deb | |
| cp jvm/target/kaitai-struct-compiler_*_all.deb /srv/kaitai | |
| # and voila ! | |
| exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment