diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 35 |
3 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2aac68b12bcd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = modpack-dl-go-git + pkgdesc = Minecraft modpack downloader written in Go + pkgver = 1.0.0.r0.g140b4b6 + pkgrel = 1 + url = https://github.com/database64128/modpack-dl-go + arch = x86_64 + arch = aarch64 + license = AGPL3 + makedepends = git + makedepends = go + provides = modpack-dl-go + conflicts = modpack-dl-go + source = modpack-dl-go-git::git+https://github.com/database64128/modpack-dl-go.git + b2sums = SKIP + +pkgname = modpack-dl-go-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..25a08ca8830c --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +pkg/ +src/ +modpack-dl-go-git/ +*.tar.zst diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a3b36fb5894e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: database64128 <free122448@hotmail.com> + +_pkgname=modpack-dl-go +pkgname=$_pkgname-git +pkgver=1.0.0.r0.g140b4b6 +pkgrel=1 +pkgdesc="Minecraft modpack downloader written in Go" +arch=('x86_64' 'aarch64') +url="https://github.com/database64128/$_pkgname" +license=('AGPL3') +makedepends=('git' 'go') +provides=("$_pkgname") +conflicts=("$_pkgname") +source=("$pkgname::git+$url.git") +b2sums=('SKIP') + +pkgver() { + cd $pkgname + git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd $pkgname + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath" + go build -ldflags='-s -w -linkmode=external' ./cmd/$_pkgname +} + +package() { + cd $pkgname + install -Dm755 $_pkgname "$pkgdir"/usr/bin/$_pkgname +} |