From d5c1366d650be1d93b97e9269573be52c7607dbf Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Tue, 22 Feb 2022 20:46:28 +0100 Subject: [PATCH] Failed attempt at writing PKGBUILD [CI SKIP] --- CHANGELOG.md | 11 ++++++++--- Makefile | 4 ++-- PKGBUILD | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 PKGBUILD diff --git a/CHANGELOG.md b/CHANGELOG.md index edae68bd..9eaf477f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://git.rustybever.be/Chewing_Bever/vieter) +## Changed + +* Better environment variable support + * Each env var can now be provided from a file by appending it with `_FILE` + & passing the path to the file as value + ## Added * Very basic build system @@ -15,10 +21,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Packages are always rebuilt, even if they haven't changed * Hardcoded planning of builds * Builds are sequential -* Better environment variable support - * Each env var can now be provided from a file by appending it with `_FILE` - & passing the path to the file as value * API for managing Git repositories to build +* CLI to list, add & remove Git repos to build +* Published packages on my Vieter instance ## Fixed diff --git a/Makefile b/Makefile index bd629c93..9debf8cf 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ c: .PHONY: cli cli: dvieterctl dvieterctl: cli.v - $(V_PATH) -showcc -o dvieterctl cli.v + $(V_PATH) -showcc -g -o dvieterctl cli.v .PHONY: cli-prod cli-prod: vieterctl @@ -97,4 +97,4 @@ v/v: make -C v clean: - rm -rf 'data' 'vieter' 'dvieter' 'pvieter' 'vieter.c' + rm -rf 'data' 'vieter' 'dvieter' 'pvieter' 'vieter.c' 'dvieterctl' 'vieterctl' diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 00000000..a8426dca --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Jef Roosens + +pkgbase='vieter' +pkgname=('vieter' 'vieterctl') +pkgver=0.1.0.rc1.r45.g6d3ff8a +pkgrel=1 +depends=('openssl' 'libarchive' 'gc') +arch=('x86_64' 'aarch64' 'armv7') +url='https://git.rustybever.be/Chewing_Bever/vieter' +license=('AGPL3') +source=($pkgname::git+https://git.rustybever.be/Chewing_Bever/vieter#branch=dev) +md5sums=('SKIP') + +pkgver() { + cd "$pkgname" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "$pkgname" + + # Build the compiler + make v + + # Build the server & the CLI tool + make prod + make cli-prod +} + +package_vieter() { + install -dm755 "$pkgdir/usr/bin" + + install -Dm755 "$pkgname/pvieter" "$pkgdir/usr/bin/vieter" +} + +package_vieterctl() { + install -dm755 "$pkgdir/usr/bin" + + install -Dm755 "$pkgname/vieterctl" "$pkgdir/usr/bin/vieterctl" +}