From b102b5122afaf84005c485bf0f4d823118abe813 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Mon, 23 May 2022 20:45:06 +0200 Subject: [PATCH] Added PKGBUILD & .SRCINFO --- .SRCINFO | 13 +++++++++++++ .gitignore | 5 +++++ PKGBUILD | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 .SRCINFO create mode 100644 .gitignore create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..cc0a665 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,13 @@ +pkgbase = packwiz-git + pkgdesc = packwiz is a command line tool for creating Minecraft modpacks. + pkgver = r211.e71b63e + pkgrel = 1 + url = https://github.com/packwiz/packwiz + arch = x86_64 + license = MIT + makedepends = go + depends = glibc + source = packwiz-git::git+https://github.com/packwiz/packwiz#branch=master + md5sums = SKIP + +pkgname = packwiz-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c6a9b95 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +* + +!.gitignore +!PKGBUILD +!.SRCINFO diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..88c0e5a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Jef Roosens + +pkgbase='packwiz-git' +pkgname='packwiz-git' +pkgver=r211.e71b63e +pkgrel=1 +pkgdesc='packwiz is a command line tool for creating Minecraft modpacks.' +arch=('x86_64') + +url='https://github.com/packwiz/packwiz' +license=('MIT') + +depends=('glibc') +makedepends=('go') + +source=("${pkgname}::git+https://github.com/packwiz/packwiz#branch=master") +md5sums=('SKIP') + +pkgver() { + cd "${pkgname}" + + commit_count="$(git rev-list --count HEAD)" + commit="$(git rev-parse --short HEAD)" + + echo "r${commit_count}.${commit}" +} + +build() { + cd "${pkgname}" + + go build -ldflags "-s -w" +} + +package() { + install -Dm755 "${pkgname}/packwiz" "${pkgdir}/usr/bin/packwiz" +}