Merge pull request #30 from ngtuna/Makefile

add Makefile
This commit is contained in:
Tuna
2017-06-01 16:42:09 +07:00
committed by GitHub
3 changed files with 46 additions and 0 deletions
+1
View File
@@ -1,2 +1,3 @@
build
.installed-requirements
namibase/nami-linux-x64.tar.gz
+32
View File
@@ -0,0 +1,32 @@
BUILD_DIR := build
MKDIR_P = mkdir -p
RM = rm -rf
.PHONY: build clean clobber
all: build
clean:
${RM} ${CURDIR}/${BUILD_DIR}
clobber: clean
@${RM} .installed-requirements
.installed-requirements:
@echo "Installing required packages..."
@./pre-build.sh
@touch $@
build: .installed-requirements
@echo "Building all supported distros..."
@./buildall
%:
@echo "Building $@..."
@$(MAKE) .installed-requirements
@${MKDIR_P} ${CURDIR}/${BUILD_DIR}
./mkimage ${CURDIR}/${BUILD_DIR}/$@.tar $@
test-%:
@cat ${CURDIR}/${BUILD_DIR}/$*.tar | docker import - minideb:$*
@./test minideb:$*
Executable
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
set -e
set -u
set -o pipefail
if [[ ! -f /etc/debian_version ]]; then
echo "minideb can currently only be built on debian based distros, aborting..."
exit 1
fi
apt-get update
apt-get install -y debootstrap debian-archive-keyring jq dpkg-dev