shrub/nix/nixcrpkgs/pkgs/lmdb/builder.sh
benjamin-tlon ade1e59ce1
Get cross-compilation ready for release. (#1263)
* Add cross-compilation for `lmdb`.
* Got built caching working in CI with `cachix`.
* Cache cross compilation dependencies and toolchains.
* Do release builds in CI.
* Upload release builds to `bootstrap.urbit.org` on successful build.
* Lots of optimization work for CI.
* Boot from a solid pill in CI and load arvo with `-A`.
* Increase `vere` HTTP timeout to 15m.
2019-05-02 13:13:48 -07:00

17 lines
383 B
Bash

source $setup
cp -r $src ./src
chmod -R u+w ./src
cd src/libraries/liblmdb
sed -i 's/liblmdb.a liblmdb..SOEXT.$/liblmdb.a/' Makefile
sed -i "s/gcc/$host-gcc/" Makefile
sed -i "s/ar/$host-ar/" Makefile
sed -i 's/^CC.*/CC = '"$host-gcc/" Makefile
cat Makefile
make CFLAGS+="-fPIC"
make DESTDIR="$out" prefix=/ install