From 8d14d5c3fd6931462bba53f7d8232e0beb35bf05 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Sat, 28 Jan 2023 14:36:46 +0100 Subject: [PATCH] chore: update PKGBUILD to use git submodule --- PKGBUILD.dev | 30 ++++++++++++++++++++---------- src/cron/expression.c.v | 2 ++ src/libvieter | 2 +- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/PKGBUILD.dev b/PKGBUILD.dev index 79c7f37..6c5123b 100644 --- a/PKGBUILD.dev +++ b/PKGBUILD.dev @@ -11,27 +11,37 @@ makedepends=('git' 'vlang') arch=('x86_64' 'aarch64') url='https://git.rustybever.be/vieter-v/vieter' license=('AGPL3') -source=("$pkgname::git+https://git.rustybever.be/vieter-v/vieter#branch=dev") +source=( + "${pkgname}::git+https://git.rustybever.be/vieter-v/vieter#branch=dev" + "libvieter::git+https://git.rustybever.be/vieter-v/libvieter" +) md5sums=('SKIP') provides=('vieter') conflicts=('vieter') pkgver() { - cd "$pkgname" + cd "${pkgname}" git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { - export VMODULES="$srcdir/.vmodules" + cd "${pkgname}" - cd "$pkgname/src" && v install + # Add the libvieter submodule + git submodule init + git config submodules.src/libvieter.url "${srcdir}/libvieter" + git -c protocol.file.allow=always submodule update + + export VMODULES="${srcdir}/.vmodules" + + cd "${pkgname}/src" && v install } build() { - export VMODULES="$srcdir/.vmodules" + export VMODULES="${srcdir}/.vmodules" - cd "$pkgname" + cd "${pkgname}" make prod @@ -42,9 +52,9 @@ build() { } package() { - install -dm755 "$pkgdir/usr/bin" - install -Dm755 "$pkgname/pvieter" "$pkgdir/usr/bin/vieter" + install -dm755 "${pkgdir}/usr/bin" + install -Dm755 "${pkgname}/pvieter" "${pkgdir}/usr/bin/vieter" - install -dm755 "$pkgdir/usr/share/man/man1" - install -Dm644 "$pkgname/man"/*.1 "$pkgdir/usr/share/man/man1" + install -dm755 "${pkgdir}/usr/share/man/man1" + install -Dm644 "${pkgname}/man"/*.1 "${pkgdir}/usr/share/man/man1" } diff --git a/src/cron/expression.c.v b/src/cron/expression.c.v index 8c574c7..a41ad27 100644 --- a/src/cron/expression.c.v +++ b/src/cron/expression.c.v @@ -5,6 +5,7 @@ module cron #flag -lvieter #include "vieter_cron.h" +[typedef] pub struct C.vieter_cron_expression { minutes &u8 hours &u8 @@ -57,6 +58,7 @@ fn (ce1 Expression) == (ce2 Expression) bool { return true } +[typeef] struct C.vieter_cron_simple_time { year int month int diff --git a/src/libvieter b/src/libvieter index 379a05a..11709cc 160000 --- a/src/libvieter +++ b/src/libvieter @@ -1 +1 @@ -Subproject commit 379a05a7b6b604c107360e0a679fb3ea5400e02c +Subproject commit 11709cc611c02a4e9140409a0e81d639522c06f1