diff --git a/.gitignore b/.gitignore index 442907e..85078d2 100644 --- a/.gitignore +++ b/.gitignore @@ -36,5 +36,4 @@ hs_err_pid* .project .settings/ .vscode/ -PKGBUILD .claude/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..f24d7f5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: Cametendo cameronmathis08@gmail.com +pkgname=cflash +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Small and lightweight image and iso flasher build on dd." +arch=('any') +url="https://github.com/cametendo/cflash-git" +license=('MIT') +depends=('java-runtime>=21') +makedepends=('java-environment>=21' 'maven') +source=("cflash::git+https://github.com/cametendo/cflash-git.git") +sha256sums=('SKIP') + +build() { + cd "$pkgname" + # using 'package' because pom.xml triggers the assembly plugin during this phase + mvn clean package +} + +package() { + cd "$srcdir/cflash" + + # for some reason MAKEPKD won't accept my version, using the wildcard for literally anything if may find + install -Dm644 target/cflash-*-jar-with-dependencies.jar \ + "$pkgdir/usr/share/java/cflash/cflash.jar" + + # Create the executable + install -d "$pkgdir/usr/bin" + cat < "$pkgdir/usr/bin/cflash" +#!/bin/sh +exec /usr/bin/java -jar /usr/share/java/cflash/cflash.jar "\$@" +EOF + # makes the program executable + chmod +x "$pkgdir/usr/bin/cflash" +} \ No newline at end of file