From 4e18b82f99cd09ec2c9759b53c265e6e2eb01494 Mon Sep 17 00:00:00 2001 From: Phenethylamine Date: Mon, 19 Feb 2018 06:57:56 -0500 Subject: [PATCH] New package: chatty-9.0 --- srcpkgs/chatty/files/chatty | 4 ++ srcpkgs/chatty/patches/config_dir.patch | 19 ++++++++++ .../patches/disable_version_check.patch | 19 ++++++++++ srcpkgs/chatty/template | 38 +++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 srcpkgs/chatty/files/chatty create mode 100644 srcpkgs/chatty/patches/config_dir.patch create mode 100644 srcpkgs/chatty/patches/disable_version_check.patch create mode 100644 srcpkgs/chatty/template diff --git a/srcpkgs/chatty/files/chatty b/srcpkgs/chatty/files/chatty new file mode 100644 index 00000000000..a375876885f --- /dev/null +++ b/srcpkgs/chatty/files/chatty @@ -0,0 +1,4 @@ +#!/bin/sh +cd /usr/share/chatty +export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH +java -jar Chatty.jar "$@" diff --git a/srcpkgs/chatty/patches/config_dir.patch b/srcpkgs/chatty/patches/config_dir.patch new file mode 100644 index 00000000000..c1a14ea4b5a --- /dev/null +++ b/srcpkgs/chatty/patches/config_dir.patch @@ -0,0 +1,19 @@ +*** src/chatty/Chatty.java 2017-12-26 11:56:51.000000000 -0500 +--- src/chatty/Chatty.patched.java 2018-02-19 04:41:33.348588121 -0500 +*************** +*** 91,97 **** + * Custom Settings directory, either the current working directory if the + * -cd parameter was used, or the directory specified with the -d parameter. + */ +! private static String settingsDir = null; + + /** + * Parse the commandline arguments and start the actual chat client. +--- 91,97 ---- + * Custom Settings directory, either the current working directory if the + * -cd parameter was used, or the directory specified with the -d parameter. + */ +! private static String settingsDir = System.getProperty("user.home") + File.separator + ".config" + File.separator + "chatty"; + + /** + * Parse the commandline arguments and start the actual chat client. diff --git a/srcpkgs/chatty/patches/disable_version_check.patch b/srcpkgs/chatty/patches/disable_version_check.patch new file mode 100644 index 00000000000..e2abd26cee7 --- /dev/null +++ b/srcpkgs/chatty/patches/disable_version_check.patch @@ -0,0 +1,19 @@ +*** src/chatty/Chatty.java 2018-02-19 04:22:40.961744905 -0500 +--- src/chatty/Chatty.patched.java 2018-02-19 04:24:16.080555756 -0500 +*************** +*** 60,66 **** + * Enable Version Checker (if you compile and distribute this yourself, you + * may want to disable this) + */ +! public static final boolean VERSION_CHECK_ENABLED = true; + + /** + * The regular URL of the textfile where the most recent version is stored. +--- 60,66 ---- + * Enable Version Checker (if you compile and distribute this yourself, you + * may want to disable this) + */ +! public static final boolean VERSION_CHECK_ENABLED = false; + + /** + * The regular URL of the textfile where the most recent version is stored. diff --git a/srcpkgs/chatty/template b/srcpkgs/chatty/template new file mode 100644 index 00000000000..220173cfc43 --- /dev/null +++ b/srcpkgs/chatty/template @@ -0,0 +1,38 @@ +#Template file for 'chatty' +pkgname=chatty +version=0.9 +revision=1 +noarch=yes +hostmakedepends="openjdk gradle" +depends="virtual?java-runtime" +short_desc="Chatty is a Twitch Chat Client for Desktop" +maintainer="Phenethylamine " +license="GPL-3" +homepage="http://chatty.github.io/" +distfiles="https://github.com/chatty/chatty/archive/v${version}.tar.gz http://chatty.github.io/Chatty_icon_256x256.png>chatty.png" +skip_extraction="chatty.png" +checksum="856623df053fa5a4498df736825380834c4c5ef9407f81ba13cc947e3fed1a99 8821ea5bca093b01ec244b80a76df95211aa2c151fc6320e0d3e98380108d904" + +do_build() { + gradle shadowJar +} + +do_install() { + vmkdir usr/share/${pkgname} + vinstall build/libs/Chatty.jar 644 usr/share/${pkgname} + + vmkdir usr/share/${pkgname}/img + vinstall assets/img/chatty.png 644 usr/share/${pkgname}/img + vinstall assets/img/star.png 644 usr/share/${pkgname}/img + + vmkdir usr/share/${pkgname}/sounds + vinstall assets/sounds/ding.wav 644 usr/share/${pkgname}/sounds + vinstall assets/sounds/dingdong.wav 644 usr/share/${pkgname}/sounds + vinstall assets/sounds/typing.wav 644 usr/share/${pkgname}/sounds + + vbin $FILESDIR/${pkgname} 755 usr/bin/ + + vinstall ${XBPS_SRCDISTDIR}/${pkgname}-${version}/chatty.png 644 usr/share/pixmaps + + vlicense assets/LICENSE +}