diff options
author | eomanis | 2023-03-04 00:13:59 +0100 |
---|---|---|
committer | eomanis | 2023-03-04 00:13:59 +0100 |
commit | 319a13e3fb9ffcab32b098f4a6105bf8cab4657b (patch) | |
tree | 8828a6a543c3f50a66b47ee839043d61f9114865 | |
parent | 5948457625df574d87db0f5f30ac3c1e4d121cb4 (diff) | |
download | aur-319a13e3fb9ffcab32b098f4a6105bf8cab4657b.tar.gz |
Update to version 0.3.9, re-write some parts of the PKGBUILD
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r--[-rwxr-xr-x] | PKGBUILD | 60 | ||||
-rw-r--r--[-rwxr-xr-x] | fix-pom.xslt | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | jmusicbot.service | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | jmusicbot@.service | 0 |
5 files changed, 32 insertions, 34 deletions
@@ -1,6 +1,6 @@ pkgbase = jmusicbot pkgdesc = A cross-platform Discord music bot with a clean interface - pkgver = 0.3.8 + pkgver = 0.3.9 pkgrel = 1 url = https://github.com/jagrosh/MusicBot arch = any @@ -9,11 +9,11 @@ pkgbase = jmusicbot makedepends = maven makedepends = libxslt depends = java-runtime-headless>=11 - source = JMusicBot-0.3.8.tar.gz::https://github.com/jagrosh/MusicBot/archive/refs/tags/0.3.8.tar.gz + source = JMusicBot-0.3.9.tar.gz::https://github.com/jagrosh/MusicBot/archive/refs/tags/0.3.9.tar.gz source = fix-pom.xslt source = jmusicbot@.service source = jmusicbot.service - sha384sums = eaa43b8296f3f86b9011344e8e240ac573508f555f44cc2605a5c6d81e3ee3e6d2e0d0b4afd6a06893b2260d77c0a5f3 + sha384sums = 67fff98a7c88718fbac88a1bcb11e7de96a3f6557ffa3b2ee3f036a49cd0a535376725b6533909388a0c94ac3b728aef sha384sums = b14dcf390d40f51d40b2aee4e8c44722837ad7a9850ecfd48174c74e8ed50709b6a64a817c301a2186e6386c26de0440 sha384sums = 0e2f5b34b17ab99c425712b8e164493538c0d8df45b9d997649dbf6332bbdef7d6ce33e195ed331cf02d132ee2fa7e88 sha384sums = b57c88e240c167debd323399b4144a1f0a566205ccfe54075f06481fe6cfb105f92bc94536575b84bbc1607c102b5e75 diff --git a/PKGBUILD b/PKGBUILD index c4a5c377e625..61b97d529a1a 100755..100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,8 +1,11 @@ +# shellcheck shell=bash +# shellcheck disable=SC2034 # Various variables that are used by makepkg +# shellcheck disable=SC2154 # Various variables that are provided by makepkg # Maintainer: eomanis at web dot de _appname='jmusicbot' pkgname="$_appname" -_pkgverUpstream="0.3.8" +_pkgverUpstream="0.3.9" pkgver="${_pkgverUpstream//-/.}" pkgrel=1 pkgdesc="A cross-platform Discord music bot with a clean interface" @@ -15,7 +18,7 @@ source=("JMusicBot-${_pkgverUpstream}.tar.gz::https://github.com/jagrosh/MusicBo "fix-pom.xslt" "jmusicbot@.service" "jmusicbot.service") -sha384sums=('eaa43b8296f3f86b9011344e8e240ac573508f555f44cc2605a5c6d81e3ee3e6d2e0d0b4afd6a06893b2260d77c0a5f3' +sha384sums=('67fff98a7c88718fbac88a1bcb11e7de96a3f6557ffa3b2ee3f036a49cd0a535376725b6533909388a0c94ac3b728aef' 'b14dcf390d40f51d40b2aee4e8c44722837ad7a9850ecfd48174c74e8ed50709b6a64a817c301a2186e6386c26de0440' '0e2f5b34b17ab99c425712b8e164493538c0d8df45b9d997649dbf6332bbdef7d6ce33e195ed331cf02d132ee2fa7e88' 'b57c88e240c167debd323399b4144a1f0a566205ccfe54075f06481fe6cfb105f92bc94536575b84bbc1607c102b5e75') @@ -29,26 +32,26 @@ sha384sums=('eaa43b8296f3f86b9011344e8e240ac573508f555f44cc2605a5c6d81e3ee3e6d2e build() { local buildDir="${srcdir}/MusicBot-${_pkgverUpstream}" - cd "$buildDir" + cd "$buildDir" || return 1 # Project version in pom.xml is set to "Snapshot" # Set it to the upstream version xsltproc --nonet --stringparam project-version "$_pkgverUpstream" "${srcdir}/fix-pom.xslt" "pom.xml" > "pom.xml.tmp" - mv "pom.xml" "pom.xml.original" - mv "pom.xml.tmp" "pom.xml" + mv -- "pom.xml" "pom.xml.original" + mv -- "pom.xml.tmp" "pom.xml" # Set JAVA_HOME if it is not set if test -z ${JAVA_HOME+x}; then - export JAVA_HOME="/usr/lib/jvm/default" + JAVA_HOME="/usr/lib/jvm/default" fi - export JAVA_HOME="$JAVA_HOME" + export JAVA_HOME echo "JAVA_HOME is \"$JAVA_HOME\"" >&2 # Set MVN_HOME if it is not set if test -z ${MVN_HOME+x}; then - export MVN_HOME="/opt/maven" + MVN_HOME="/opt/maven" fi - export MVN_HOME="$MVN_HOME" + export MVN_HOME echo "MVN_HOME is \"$MVN_HOME\"" >&2 # Build with Maven @@ -63,44 +66,39 @@ package() { local refConfFileName="reference-${_pkgverUpstream}.conf" local refConfFileNameUnversioned="reference.conf" + # Create the required directories + install --mode=u=rwx,go=rx --directory -- \ + "${pkgdir}/usr/bin" \ + "${pkgdir}/usr/share/jmusicbot" \ + "${pkgdir}/usr/lib/systemd/system" \ + "${pkgdir}/usr/lib/systemd/user" + # Place the .jar file and create a non-versioned symlink to it - mkdir --parents "${pkgdir}/usr/bin" - cd "${pkgdir}/usr/bin" - cp --target-directory . "${buildDir}/target/$jarFileName" - chmod u=rwx,go=rx "$jarFileName" - ln -s "$jarFileName" "$jarFileNameUnversioned" + install --mode=u=rwx,go=rx --target-directory="${pkgdir}/usr/bin" -- "${buildDir}/target/$jarFileName" + ln --symbolic --relative -- "${pkgdir}/usr/bin/$jarFileName" "${pkgdir}/usr/bin/$jarFileNameUnversioned" # Create bash launcher: Default echo -n \ "#!/bin/bash /usr/bin/java -jar \"/usr/bin/${jarFileNameUnversioned}\" \"\$@\" -" > jmusicbot - chmod u=rwx,go=rx jmusicbot +" > "${pkgdir}/usr/bin/jmusicbot" + chmod -- u=rwx,go=rx "${pkgdir}/usr/bin/jmusicbot" # Create bash launcher: Command line only echo -n \ "#!/bin/bash /usr/bin/java -Dnogui=true -jar \"/usr/bin/${jarFileNameUnversioned}\" \"\$@\" -" > jmusicbot-nogui - chmod u=rwx,go=rx jmusicbot-nogui +" > "${pkgdir}/usr/bin/jmusicbot-nogui" + chmod -- u=rwx,go=rx "${pkgdir}/usr/bin/jmusicbot-nogui" # Place the reference configuration file and create a non-versioned # symlink to it - mkdir --parents "${pkgdir}/usr/share/jmusicbot" - cd "${pkgdir}/usr/share/jmusicbot" - cp "${buildDir}/src/main/resources/reference.conf" "$refConfFileName" - chmod u=rwx,go=rx "$refConfFileName" - ln -s "$refConfFileName" "$refConfFileNameUnversioned" + install --mode=u=rw,go=r -- "${buildDir}/src/main/resources/reference.conf" "${pkgdir}/usr/share/jmusicbot/$refConfFileName" + ln --symbolic --relative -- "${pkgdir}/usr/share/jmusicbot/$refConfFileName" "${pkgdir}/usr/share/jmusicbot/$refConfFileNameUnversioned" # Place the systemd instantiated system service - mkdir --parents "${pkgdir}/usr/lib/systemd/system" - cd "${pkgdir}/usr/lib/systemd/system" - cp --target-directory . "${srcdir}/jmusicbot@.service" - chmod u=rwx,go=rx "jmusicbot@.service" + install --mode=u=rw,go=r --target-directory="${pkgdir}/usr/lib/systemd/system" -- "${srcdir}/jmusicbot@.service" # Place the systemd user service - mkdir --parents "${pkgdir}/usr/lib/systemd/user" - cd "${pkgdir}/usr/lib/systemd/user" - cp --target-directory . "${srcdir}/jmusicbot.service" - chmod u=rwx,go=rx "jmusicbot.service" + install --mode=u=rw,go=r --target-directory="${pkgdir}/usr/lib/systemd/user" -- "${srcdir}/jmusicbot.service" } diff --git a/fix-pom.xslt b/fix-pom.xslt index 01a8cf9e959e..01a8cf9e959e 100755..100644 --- a/fix-pom.xslt +++ b/fix-pom.xslt diff --git a/jmusicbot.service b/jmusicbot.service index d75cca664b3b..d75cca664b3b 100755..100644 --- a/jmusicbot.service +++ b/jmusicbot.service diff --git a/jmusicbot@.service b/jmusicbot@.service index d613cd4d767f..d613cd4d767f 100755..100644 --- a/jmusicbot@.service +++ b/jmusicbot@.service |