diff options
author | Lucas Melo | 2022-08-23 01:46:11 -0300 |
---|---|---|
committer | Lucas Melo | 2022-08-23 01:46:11 -0300 |
commit | f080ae8dae0bcef4f72f10bb639073cb81ea1bca (patch) | |
tree | 9ded5a1e992ca11e4070356555cd646c65e4e161 | |
download | aur-f080ae8dae0bcef4f72f10bb639073cb81ea1bca.tar.gz |
First commit.
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 37 | ||||
-rwxr-xr-x | clonehero | 38 | ||||
-rw-r--r-- | clonehero.desktop | 8 | ||||
-rw-r--r-- | clonehero.install | 7 |
6 files changed, 117 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..49ff586529fc --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = clonehero-ptb + pkgdesc = Public test build for Clone Hero. Clone Hero is a free rhythm game, which can be played with any 5 or 6 button guitar controller, game controllers, or just your standard computer keyboard. + pkgver = v1.0.0.3747 + pkgrel = 1 + url = https://clonehero.net/ + install = clonehero.install + arch = x86_64 + license = freeware-proprietary + depends = gtk2 + depends = opengl-driver + depends = sdl2 + optdepends = discord: Discord rich presence support + conflicts = clonehero + source = clonehero-linux_v1.0.0.3747.tar.xz::https://pubdl.clonehero.net/ptb/v1.0.0.3747-master/clonehero-linux.tar.xz + source = clonehero.desktop + source = clonehero.install + source = clonehero + sha256sums = 05f501d0caa03d26fb6397b6afa5f52fd10575fb714e33f1e854dc2d17472eff + sha256sums = 6d6d3e8e08ba65fedcc07a2d4ef8d5f6eabd4aec20dbc7e0febc6d58faff72bf + sha256sums = a2a4829d71d91d106a9c756d6323bfbf505e2757c83abba199a661728dccde9a + sha256sums = c15846bf8deb9089c1d0c600ab1d53aecaae0f054c308626d2c1038935f38ad1 + +pkgname = clonehero-ptb diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..ee882f16102a --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +clonehero-linux*.tar.xz +pkg/ +src/ +*.tar.zst diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f233dc0ad13f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Lucas Melo <luluco250 at gmail dot com> + +pkgname=clonehero-ptb +pkgver=v1.0.0.3747 +pkgrel=1 +pkgdesc=\ +'Public test build for Clone Hero. Clone Hero is a free rhythm game, which '\ +'can be played with any 5 or 6 button guitar controller, game controllers, '\ +'or just your standard computer keyboard.' +arch=('x86_64') +url='https://clonehero.net/' +license=('freeware-proprietary') +depends=('gtk2' 'opengl-driver' 'sdl2') +optdepends=('discord: Discord rich presence support') +conflicts=('clonehero') +source=( + "clonehero-linux_$pkgver.tar.xz::https://pubdl.clonehero.net/ptb/$pkgver-master/clonehero-linux.tar.xz" + 'clonehero.desktop' + 'clonehero.install' + 'clonehero' +) +sha256sums=( + '05f501d0caa03d26fb6397b6afa5f52fd10575fb714e33f1e854dc2d17472eff' + '6d6d3e8e08ba65fedcc07a2d4ef8d5f6eabd4aec20dbc7e0febc6d58faff72bf' + 'a2a4829d71d91d106a9c756d6323bfbf505e2757c83abba199a661728dccde9a' + 'c15846bf8deb9089c1d0c600ab1d53aecaae0f054c308626d2c1038935f38ad1' +) +install=clonehero.install + +package() { + install -Dm644 clonehero.desktop "$pkgdir/usr/share/applications/clonehero.desktop" + install -Dm755 clonehero "$pkgdir/usr/bin/clonehero" + cd "$srcdir/clonehero-linux" || exit 1 + find . -type f -exec install -Dm644 "{}" "$pkgdir/opt/clonehero/{}" \; + chmod +x "$pkgdir/opt/clonehero/clonehero" + install -Dm644 'clonehero_Data/Resources/UnityPlayer.png' "$pkgdir/usr/share/pixmaps/clonehero.png" +} diff --git a/clonehero b/clonehero new file mode 100755 index 000000000000..ad5ae0f92e06 --- /dev/null +++ b/clonehero @@ -0,0 +1,38 @@ +#!/bin/bash + +# Create/locate local user folder for the game. +xdg_data_home="${XDG_DATA_HOME:-$HOME/.local/share}" +dir="$xdg_data_home/clonehero" + +if ! mkdir -p "$dir"; then + echo "Failed to create directory at ยด$dir'" + exit 1 +fi + +if ! cd "$dir"; then + echo "Failed to change to directory '$dir'" + exit 1 +fi + +# Executable *must* be in a writable directory. +# The game is probably trying to write to files relative to the executable's +# path rather than the working directory. +# This way a link does not work, as the game seemingly dereferences it and tries +# to write inside /opt/clonehero. +if ! cp /opt/clonehero/clonehero clonehero; then + echo "Failed to copy 'clonehero' to '$dir/clonehero'" + exit 1 +fi + +# And then we link everything else we can avoid copying. +for f in UnityPlayer.so clonehero_Data; do + if ! ln -sfT "/opt/clonehero/$f" "$f"; then + echo "Failed to link '$f' to '$dir/$f'" + exit 1 + fi +done + +# We won't touch neither the Custom/ nor Songs/ directories as those are +# probably best left to the user to populate (or link to another folder). + +exec ./clonehero "$@" diff --git a/clonehero.desktop b/clonehero.desktop new file mode 100644 index 000000000000..f78563dc3186 --- /dev/null +++ b/clonehero.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Clone Hero +GenericName=Clone Hero +Comment=A clone of Guitar Hero, Rock Band and other rhythm games. +Exec=/usr/bin/clonehero +Icon=/usr/share/pixmaps/clonehero.png +Type=Application +Categories=Game diff --git a/clonehero.install b/clonehero.install new file mode 100644 index 000000000000..dbfb1754cb69 --- /dev/null +++ b/clonehero.install @@ -0,0 +1,7 @@ +#!/bin/bash + +post_install() { + echo "Use 'clonehero' or the desktop file to run the game and place your" \ +"songs + customs in \$XDG_DATA_HOME/clonehero or ~/.local/share/clonehero" \ +"(the folders will be created upon launching the game for the first time)." +} |