From ce5f0aaa6397173fa6bcddb96ee2a1ee4434f23b Mon Sep 17 00:00:00 2001 From: "David J. Allen" Date: Sat, 7 Oct 2023 13:42:59 -0600 Subject: [PATCH] Created initial PKGBUILD and Dockerfile - Update `bin/compile.sh` to generate sha256sums from binaries --- Dockerfile | 11 +++++++++++ PKGBUILD | 22 ++++++++++++++++++++++ bin/compile.sh | 7 +++++++ 3 files changed, 40 insertions(+) create mode 100644 Dockerfile create mode 100644 PKGBUILD diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..75ad5c7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM cgr.dev/chainguard/wolfi-base + +RUN apk add --no-cache tini + +USER 65534:65534 + +COPY build/gdpm.static /gdpm + +CMD ["/gdpm"] + +ENTRYPOINT [ "/sbin/tini", "--" ] \ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..80f8cdb --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: David J. Allen +pkgname=gdpm +pkgver=0.0.1 +pkgrel=1 +pkgdesc="CLI tool to automate managing Godot game engine assets from the command-line. This includes a pre-built, static binary." +arch=('x86_64') +url="https://github.com/davidallendj/gdpm" +license=('MIT') +#groups= +depends=('glibc') +makedepends=('cmake', 'make', 'clang') +source=("https://github.com/davidallendj/gdpm/releases/download/v$pkgver/$pkgname.static.$arch.linux.static") +sha256sums=('012e3c32511d6d762ac070808e8bcae7f68dd261bf1cad3dbf4607c97aa1bb3d') + +build () { + # shouldn't need to build anything with static binary... +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install +} \ No newline at end of file diff --git a/bin/compile.sh b/bin/compile.sh index 3042f09..ce05fd9 100755 --- a/bin/compile.sh +++ b/bin/compile.sh @@ -53,6 +53,12 @@ function clean(){ rm ${script_dir}/../bin/$tests } +function checksums(){ + sha256sums ${script_dir}/../bin/$exe + sha256sums ${script_dir}/../bin/$static + sha256sums ${script_dir}/../bin/$tests +} + # Run this script at project root #meson configure build #CXX=clang++ meson compile -C build -j$(proc) @@ -118,6 +124,7 @@ do --exe) build_exe shift;; --libs) build_libs shift;; --tests) build_tests shift;; + --sums) checksums shift;; -d|--docs) build_docs shift;; -c|--clean) clean shift;; -s|--strip) strip_all shift;;