diff --git a/.gitignore b/.gitignore index 5ab4ce9..50c25c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *\~ sncf +build-deps* diff --git a/README.org b/README.org index 22bc6a7..d18cc73 100644 --- a/README.org +++ b/README.org @@ -62,11 +62,25 @@ Arguments: ** Building instructions +*** Static executable using Docker + The build script will use Docker to build a fully static executable. The Dockerfile is based on the [[https://hub.docker.com/r/gerbil/alpine][gerbil/alpine]] image. #+begin_src sh -$ ./build.sh +./build.sh #+end_src -This project depends on [[https://github.com/dlozeve/fancy][dlozeve/fancy]]. +*** With your local [[https://cons.io/][Gerbil]] installation + +This project depends on [[https://github.com/dlozeve/fancy][dlozeve/fancy]]. Install it with the package +manager: +#+begin_src sh +gxpkg install github.com/dlozeve/fancy +#+end_src + +The project comes with a build script for the [[https://cons.io/guide/build.html][standard build tool]], +which installs the =sncf= executable in =$GERBIL_HOME/bin=: +#+begin_src sh +./build.ss +#+end_src diff --git a/build.ss b/build.ss new file mode 100755 index 0000000..db81327 --- /dev/null +++ b/build.ss @@ -0,0 +1,23 @@ +#!/usr/bin/env gxi + +(import :std/make) + +;; the build specification +(def build-spec + '((exe: "sncf"))) + +;; the source directory anchor +(def srcdir + (path-normalize (path-directory (this-source-file)))) + +;; the main function of the script +(def (main . args) + (match args + ;; this is the default (and, here, only) action, which builds the project + ([] + (make srcdir: srcdir ; source anchor + ;;bindir: srcdir ; where to place executables; default is GERBIL_PATH/bin + optimize: #t ; enable optimizations + debug: #f ; enable debugger introspection + static: #t ; don't generate static compilation artifacts + build-spec)))) ; the actual build specification diff --git a/gerbil.pkg b/gerbil.pkg new file mode 100644 index 0000000..4d0df29 --- /dev/null +++ b/gerbil.pkg @@ -0,0 +1 @@ +(package: dlozeve)