A build template to compile single unit compilation projects, in:
- .deb
- .rpm
- linux executable
- windows 32 bits executable
- windows 64 bits executable
install Darwin on version 0.020 with:
curl -L https://github.com/OUIsolutions/Darwin/releases/download/0.020/darwin.out -o darwin.out && sudo chmod +x darwin.out && sudo mv darwin.out /usr/bin/darwin
and you also will also need to PODMAN or DOCKER to build the packages (yo can edit these here on CONTANIZER var Config
to build all the packages, just fork these repo, put all your code into src dir (note that your code must compile with gcc --static main.c) and build everything with:
darwin run_blueprint build/ --mode folder amalgamation_build alpine_static_build windowsi32_build windowsi64_build rpm_static_build debian_static_build
you can configure every aspect of the build in Config
each build its a Lua function that matchs a flag,note that your function must be runnable by darwin runtine check Darwin Api Usage
flag | output | what its | Function |
---|---|---|---|
amalgamation_build | release/amalgamation.c | a C file with all the code in one file | Function implementation |
alpine_static_build | release/alpine_static.out | a linux executable with musl | Function implementation |
windowsi32_build | release/windowsi32.exe | a windows 32 bits executable | Function implementation |
windowsi64_build | release/windows64.exe | a windows 64 bits executable | Function implementation |
rpm_static_build | release/rpm_static.rpm | a rpm package with musl | Function implementation |
debian_static_build | release/debian_static.deb | a debian package with musl | Function implementation |
to add your build flag just create a function in build dir and add it:Build Funcs
you can test all linux distributions with
darwin run_blueprint build --mode folder test_container <your_distro>
note that the dir "release will be mounted on /release on the container