diff options
author | CrankySupertoon | 2020-10-25 17:22:05 -0400 |
---|---|---|
committer | CrankySupertoon | 2020-10-25 17:22:05 -0400 |
commit | b0b2472d01f4107fb021a52086355cab8d57d5cd (patch) | |
tree | dea59e86966a77caefdddb73f503ecdcd5a4cdf3 | |
parent | feac6b50e41267f6cb5f5a0048c3495782af0f43 (diff) | |
download | aur-b0b2472d01f4107fb021a52086355cab8d57d5cd.tar.gz |
Rework the package to actually clone a git repo because some idiot of a script calls it a dirty package
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 31 |
2 files changed, 22 insertions, 16 deletions
@@ -1,17 +1,18 @@ pkgbase = modsman pkgdesc = Minecraft mod manager and updater for the CLI pkgver = 0.32.1 - pkgrel = 1 + pkgrel = 2 url = https://github.com/sargunv/modsman arch = x86_64 license = GPL3 makedepends = gendesk makedepends = unzip + makedepends = git depends = java-runtime=8 conflicts = modsman-git conflicts = modsman-bin - source_x86_64 = modsman-0.32.1.zip::https://github.com/sargunv/modsman/archive/0.32.1.zip - md5sums_x86_64 = SKIP + source = modsman::git+https://github.com/sargunv/modsman.git + md5sums = SKIP pkgname = modsman @@ -1,22 +1,27 @@ # Maintainer: Cranky Supertoon <crankysupertoon@gmail.com> pkgname="modsman" pkgver="0.32.1" -pkgrel=1 +pkgrel=2 +commithash="6add8e25be26080164cd4f84ce5338b8d98e4e4e" +shorthash="g6add8e2" arch=('x86_64') pkgdesc="Minecraft mod manager and updater for the CLI" url='https://github.com/sargunv/modsman' license=('GPL3') -makedepends=('gendesk' 'unzip') +makedepends=('gendesk' 'unzip' 'git') depends=('java-runtime=8') conflicts=('modsman-git' 'modsman-bin') -source_x86_64=( - "${pkgname}-${pkgver}.zip::${url}/archive/${pkgver}.zip" -) - -md5sums_x86_64=('SKIP') +source=("${pkgname}::git+${url}.git") +md5sums=('SKIP') prepare() { -cat > "${pkgname}" <<-EOT + #Rebase project to proper commit + #because the project cannot be built dirty + cd "${srcdir}/${pkgname}" + git reset --hard ${commithash} + + # Create Startup Script + cat > "${pkgname}" <<-EOT #!/bin/sh cd /opt/modsman/bin ./modsman-cli @@ -24,22 +29,22 @@ EOT } build() { - cd "${srcdir}/${pkgname}-${pkgver}" + cd "${srcdir}/${pkgname}" ./gradlew :${pkgname}-cli:distZip --info --stacktrace } package() { # Unzip Compiled project - cd "${srcdir}/${pkgname}-${pkgver}/${pkgname}-cli/build/distributions" - unzip -o ${pkgname}-cli.zip + cd "${srcdir}/${pkgname}/${pkgname}-cli/build/distributions" + unzip -o ${pkgname}-cli-${pkgver}-${pkgrel}-${shorthash}.dirty.zip rm -rf "${pkgname}/" - cp -r "${pkgname}-cli/" "${pkgname}/" + cp -r "${pkgname}-cli-${pkgver}-${pkgrel}-${shorthash}.dirty/" "${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/" + cp -Rr "${srcdir}/${pkgname}/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 {} \; |