summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCrankySupertoon2020-10-25 16:13:06 -0400
committerCrankySupertoon2020-10-25 16:13:06 -0400
commitfeac6b50e41267f6cb5f5a0048c3495782af0f43 (patch)
tree39b8e9c5058bdb6d05107c602f6ce74cf265cbc1 /PKGBUILD
downloadaur-feac6b50e41267f6cb5f5a0048c3495782af0f43.tar.gz
Initial Commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD55
1 files changed, 55 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..82427ba1edd0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Cranky Supertoon <crankysupertoon@gmail.com>
+pkgname="modsman"
+pkgver="0.32.1"
+pkgrel=1
+arch=('x86_64')
+pkgdesc="Minecraft mod manager and updater for the CLI"
+url='https://github.com/sargunv/modsman'
+license=('GPL3')
+makedepends=('gendesk' 'unzip')
+depends=('java-runtime=8')
+conflicts=('modsman-git' 'modsman-bin')
+source_x86_64=(
+ "${pkgname}-${pkgver}.zip::${url}/archive/${pkgver}.zip"
+)
+
+md5sums_x86_64=('SKIP')
+
+prepare() {
+cat > "${pkgname}" <<-EOT
+#!/bin/sh
+cd /opt/modsman/bin
+./modsman-cli
+EOT
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./gradlew :${pkgname}-cli:distZip --info --stacktrace
+}
+
+package() {
+
+ # Unzip Compiled project
+ cd "${srcdir}/${pkgname}-${pkgver}/${pkgname}-cli/build/distributions"
+ unzip -o ${pkgname}-cli.zip
+ rm -rf "${pkgname}/"
+ cp -r "${pkgname}-cli/" "${pkgname}/"
+ rm -f "modsman/bin/${pkgname}-cli.bat"
+
+ # install the main files.
+ install -d -m755 "${pkgdir}/opt/${pkgname}"
+ cp -Rr "${srcdir}/${pkgname}-${pkgver}/modsman-cli/build/distributions/modsman" "${pkgdir}/opt/"
+
+ # fix file permissions - all files as 644 - directories as 755
+ find "${pkgdir}/"opt -type d -exec chmod 755 {} \;
+ find "${pkgdir}/"opt -type f -exec chmod 644 {} \;
+
+ # link the binary
+ install -d -m755 "${pkgdir}/usr/bin"
+ cp -Rr "${srcdir}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+
+ # make sure the main binary has the right permissions
+ chmod +x "${pkgdir}/usr/bin/${pkgname}"
+ chmod +x "${pkgdir}/opt/${pkgname}/bin/${pkgname}-cli"
+}