diff options
author | Aidan Coward | 2020-12-30 13:50:19 -0500 |
---|---|---|
committer | Aidan Coward | 2020-12-30 13:50:19 -0500 |
commit | 9c7c3a1ecec55faaa3fa3a3e527263976c6e84ed (patch) | |
tree | 647fec35813e0ab24dbc152d7e591bc1d8666a3f | |
parent | 3897df02887262514d4ce51d78f271b4a6cd34bb (diff) | |
download | aur-9c7c3a1ecec55faaa3fa3a3e527263976c6e84ed.tar.gz |
Added secondary PKGBUILD if users wants to avoid using the bundled java
installation
Added information to README.txt
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | PKGBUILD-only-openjdk | 76 | ||||
-rw-r--r-- | README.txt | 14 |
3 files changed, 86 insertions, 6 deletions
@@ -3,7 +3,7 @@ pkgname=xmage pkgver=1.4.47V1 -pkgrel=0 +pkgrel=1 pkgdesc="Java-based program for playing Magic:The Gathering, including client and server" diff --git a/PKGBUILD-only-openjdk b/PKGBUILD-only-openjdk new file mode 100644 index 000000000000..f70805f5a931 --- /dev/null +++ b/PKGBUILD-only-openjdk @@ -0,0 +1,76 @@ +# Maintainer: Aidan Coward <aidan -dot- coward -at- gmail -dot- com> +# Feedback is appreciated + +pkgname=xmage +pkgver=1.4.47V1 +pkgrel=1 + +pkgdesc="Java-based program for playing Magic:The Gathering, including client and server" + +arch=('any') +url="http://xmage.de" +license=('MIT') + + +source=("http://xmage.de/files/xmage_${pkgver}.zip" + 'https://raw.githubusercontent.com/magefree/mage/master/LICENSE.txt' + 'https://raw.githubusercontent.com/magefree/Launcher/master/src/main/resources/icon-mage.png') + +sha256sums=("eb87a9e8a632d3691f6c7401d99bffd44f52d572b1434e07546ddbb35991c7bb" + "SKIP" + "SKIP") + +depends=('jre8-openjdk') +makedepends=('detox') +optdepends=('wmname: change window manager name for compatibility with certain WMs') +install="${pkgname}.install" + +package() { + + cd "${srcdir}" + + # clean up filenames + detox -r -v ./* &> /dev/null + + msg2 "changing file format of included scripts..." + awk '{ sub("\r$", ""); print }' mage-client/startClient.sh > mage-client/startClient-unix.sh + awk '{ sub("\r$", ""); print }' mage-server/startServer.sh > mage-server/startServer-unix.sh + + msg2 "changing default locations of scripts..." + sed -i 's|\.\/lib|\/usr\/share\/xmage\/mage-client\/lib|' mage-client/startClient-unix.sh + sed -i 's|\.\/lib|\/usr\/share\/xmage\/mage-server\/lib|' mage-server/startServer-unix.sh + + msg2 "adding cd to relevant /usr/share/xmage/ directory..." + sed -i '2i cd /usr/share/xmage/mage-client' mage-client/startClient-unix.sh + sed -i '2i cd /usr/share/xmage/mage-server' mage-server/startServer-unix.sh + + msg2 "increasing default memory limit of client and server" + sed -i 's|-Xmx512m|-Xmx2048m|g' mage-client/startClient-unix.sh + sed -i 's|-Xmx512m|-Xmx2048m|g' mage-server/startServer-unix.sh + + msg2 "moving files..." + install -Dm755 mage-client/startClient-unix.sh ${pkgdir}/usr/bin/mage-client + install -Dm755 mage-server/startServer-unix.sh ${pkgdir}/usr/bin/mage-server + + msg2 "creating /usr/share/xmage..." + install -dm755 ${pkgdir}/usr/share/xmage + + msg2 "copying files to /usr/share/xmage..." + cp -ra ./* ${pkgdir}/usr/share/xmage/ + + msg2 "setting permissions of /usr/share/xmage..." + chmod -R a+rwx ${pkgdir}/usr/share/xmage + + msg2 "installing license: ${license}..." + install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licences/"${pkgname}"/LICENSE.txt + + msg2 "installing mage-server systemd unit file to /usr/lib/systemd/system..." + mkdir -p "${pkgdir}"/usr/lib/systemd/system + install -m755 ../mage-server.service "${pkgdir}"/usr/lib/systemd/system + + msg2 "installing icon and .desktop file..." + mkdir -p "${pkgdir}"/usr/share/icons + install -m755 icon-mage.png "${pkgdir}"/usr/share/icons/ + mkdir -p "${pkgdir}"/usr/share/applications + install -m755 ../xmage.desktop "${pkgdir}"/usr/share/applications/xmage.desktop +} diff --git a/README.txt b/README.txt index c7451f38b0d8..b54717ca0072 100644 --- a/README.txt +++ b/README.txt @@ -1,12 +1,15 @@ -The developers assign 512MB of memory to each of mage-client and mage-server. -This is changed to 2048MB in the PKGBUILD. If you wish to modify this, change the -Xmx2048m in -/bin/mage-client or /bin/mage-server. - Due to compatibility issues with the current version of java in the repositories, xmage now installs a dedicated version of java to /usr/share/xmage/java. This is only applicable for x86_64 machines. For all other architectures, the package requires the jre8-openjdk package. The developers only guarantee compatibility with a single version of java. +If you have a x86_64 machine and you wish to only use the repository java, +replace the included PKGBUILD with PKGBUILD-only-openjdk and then build the +package as usual + +The developers assign 512MB of memory to each of mage-client and mage-server. +This is changed to 2048MB in the PKGBUILD. If you wish to modify this, change the -Xmx2048m in +/bin/mage-client or /bin/mage-server. If you encounter a gray/blank screen when you start the client, see here for a possible solution https://www.reddit.com/r/XMage/comments/9k2t9o/new_install_blank_screen_when_launching_client/ @@ -14,4 +17,5 @@ https://www.reddit.com/r/XMage/comments/9k2t9o/new_install_blank_screen_when_lau The package comes with a systemd unit file to load mage-server on boot. The service restarts if mage-server crashes or closes unexpectedly. It is automatically installed to /usr/lib/systemd/system/mage-server.service -The xmage.desktop file is installed to /usr/share/applications/xmage.desktop. This makes it visible in application menus. It can be installed to ~/Desktop if a desktop icon is desired. +The xmage.desktop file is installed to /usr/share/applications/xmage.desktop. +This makes it visible in application menus. It can be installed to ~/Desktop if a desktop icon is desired. |