Add README, refactor some variable names

This commit is contained in:
Samuel Aubertin 2023-10-13 13:52:40 +02:00
parent 80fcff150e
commit 304a2da223
2 changed files with 35 additions and 7 deletions

View File

@ -14,31 +14,32 @@ include ../skz-opack/src/opack.mk
.PHONY: sync provision cleanrelease halt
RELEASE= release
SRC= ../skzbsd-src
RELEASE_PATH= release
SRC_REPO= ../skzbsd-src
BRANCH= master
TARGET= SKZ-VIRT
cleanrelease:
rm -rf $(RELEASE)
rm -rf $(RELEASE_PATH)
ssh-config: opack
(echo Host $(OPACK_TARGET) && (vagrant ssh-config | sed '1d')) > $@
sync: ssh-config
scp -F ssh-config -q -r src $(OPACK_TARGET):/root/build
scp -F ssh-config -q -r $(SRC)/. $(OPACK_TARGET):/usr/src
scp -F ssh-config -q -r $(SRC_REPO)/. $(OPACK_TARGET):/usr/src
provision: sync
vagrant ssh -c "make -C build all" || true
sleep 30 && while ! nc -z -w 10 $(shell grep HostName ssh-config | awk '{print $$2}') 22 2> /dev/null ; do sleep 10; printf '#'; done;\
$(RELEASE): provision
$(RELEASE_PATH): provision
mkdir -p $@
vagrant ssh -c "BUILD_TARGET=$(TARGET) make -C build/release all" || vagrant ssh -c "cat /var/log/master_build.log.err"
vagrant ssh -c "BUILD_TARGET=$(TARGET) TAG=$(BRANCH) make -C build/release all" || vagrant ssh -c "cat /var/log/master_build.log.err"
scp -F ssh-config -q -r $(OPACK_TARGET):'/home/build/master/*' $@
halt: $(RELEASE)
halt: $(RELEASE_PATH)
vagrant halt
all: halt

27
README.md Normal file
View File

@ -0,0 +1,27 @@
```
██████ ██ ▄█▀▒███████▒▓█████▄ ██████ ▓█████▄ ▓█████▄ █ ██ ██▓ ██▓ ▓█████▄
▒██ ▒ ██▄█▒ ▒ ▒ ▒ ▄▀░▒██▒ ▄██▒██ ▒ ▒██▀ ██▌ ▒██▒ ▄██ ██ ▓██▒▓██▒▓██▒ ▒██▀ ██▌
░ ▓██▄ ▓███▄░ ░ ▒ ▄▀▒░ ▒██░█▀ ░ ▓██▄ ░██ █▌ ▓▒█ ▒██░█▀ ▓██ ▒██░▒██▒▒██░ ░██ █▌
▒ ██▒▓██ █▄ ▄▀▒ ░░▓█ ▀█▓ ▒ ██▒░▓█▄ ▌ ░▒ ░▓█ ▀█ ▓▓█ ░██░░██░▒██░ ░▓█▄ ▌
▒██████▒▒▒██▒ █▄▒███████▒░▓█████▀▒██████▒▒░▒████▓ ░▓█████▀▒▒█████▓ ░██░░██████▒░▒████▓
▒ ▒▓▒ ▒ ░▒ ▒▒ ▓▒░▒▒ ▓░▒░▒ ░▒ ░ ▒ ▒▓▒ ▒ ░ ▒▒▓ ▒ ░ ░▒ ░ ░▒▓▒ ▒ ▒ ░▓ ░ ▒░▓ ░ ▒▒▓ ▒
░ ░▒ ░ ░ ░▒ ▒░ ▒ ▒ ░ ▒ ░ https://git.sk4.nz/sk4nz/skzbsd-build ░ ░ ░ ▒ ░░ ░ ▒ ░ ▒ ▒
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░
```
*Samuel 'sk4nz' AUBERTIN*
**skzbsd-build** is an automated [OpenBSD](https://www.openbsd.org) *[release](https://man.openbsd.org/release)* builder for the *amd64* platform .
It automatically compiles an arbitrary OpenBSD `src` tree leveraging [skz-opack](https://git.sk4.nz/sk4nz/skz-opack), defined by :
- `RELEASE_PATH`: destination directory for the release
- `SRC_REPO`: OpenBSD `src` git tree local directory
- `BRANCH`: git branch or commit hash to checkout in `SRC_REPO`. Defaults to 'master'
- `TARGET`: OpenBSD release config file to use. Defaults to 'GENERIC'
To see all the options used, see the [Makefile](Makefile).
## License
**skzbsd-build** is distributed under the [OpenBSD License](https://www.openbsd.org/policy.html). See the [LICENSE](LICENSE) file for more details.