60 lines
1.6 KiB
Makefile
60 lines
1.6 KiB
Makefile
dist:
|
|
mkdir -p dist
|
|
|
|
# Debian packages required for build
|
|
install-build-tools:
|
|
apt install erlang build-essential curl unzip openssl git cmake file
|
|
|
|
# Elixir
|
|
elixir-1.14.1: dist
|
|
wget https://codeload.github.com/elixir-lang/elixir/tar.gz/refs/tags/v1.14.1 \
|
|
-O elixir-1.14.1.tar.gz
|
|
tar zxf elixir-1.14.1.tar.gz
|
|
rm elixir-1.14.1.tar.gz
|
|
|
|
build-elixir: elixir-1.14.1
|
|
make -C elixir-1.14.1 -j$(shell nproc --ignore=1)
|
|
make -C elixir-1.14.1 Precompiled.zip
|
|
mv elixir-1.14.1/Precompiled.zip dist/elixir-1.14.1.zip
|
|
|
|
install-elixir: build-elixir
|
|
make -C elixir-1.14.1 install
|
|
/usr/local/bin/elixir --version
|
|
|
|
# NodeJS
|
|
node-v18.12.1-linux-x64.tar.xz: dist
|
|
wget --inet4-only https://nodejs.org/dist/v18.12.1/node-v18.12.1-linux-x64.tar.xz \
|
|
-O dist/node-v18.12.1-linux-x64.tar.xz
|
|
|
|
install-nodejs: node-v18.12.1-linux-x64.tar.xz
|
|
tar --directory=/usr/local/ \
|
|
--strip-components=1 \
|
|
-Jxf $(shell pwd)/dist/node-v18.12.1-linux-x64.tar.xz
|
|
/usr/local/bin/node --version
|
|
|
|
# Mobilizon
|
|
build-release: dist
|
|
git clone \
|
|
--branch chapril-v3 \
|
|
https://forge.april.org/Chapril/mobilizon.chapril.org-mobilizon.git \
|
|
mobilizon
|
|
make -C mobilizon release
|
|
mv mobilizon/*.tar.gz dist/
|
|
|
|
# Show results
|
|
list-built-packages:
|
|
ls -l dist
|
|
|
|
clean:
|
|
rm node-v18.12.1-linux-x64.tar.xz
|
|
|
|
help:
|
|
@echo To compile and release, Mobilizon you need to install build tools
|
|
@echo Run \`sudo make install-build-tools install-elixir install-nodejs\`
|
|
@echo
|
|
@echo You are now able to compile and package Mobilizon
|
|
@echo Run \`make build-release\`
|
|
@echo
|
|
@echo The resulting packages will be located under dist.
|
|
@echo Run \`make list-built-packages\` to see them
|