diff options
-rw-r--r-- | PKGBUILD | 28 | ||||
-rw-r--r-- | build.patch | 98 | ||||
-rw-r--r-- | client_id.patch | 13 | ||||
-rw-r--r-- | disable_version_check.patch | 114 | ||||
-rw-r--r-- | manifest.patch | 16 |
5 files changed, 196 insertions, 73 deletions
@@ -1,6 +1,6 @@ -# Maintainer: Christoph Korn <c_korn at gmx dot de> +# Maintainer: Christoph Korn <christoph.korn at posteo dot de> pkgname=chatty -pkgver=0.8 +pkgver=0.8.1 pkgrel=1 pkgdesc="Twitch Chat Client for Desktop" arch=('any') @@ -10,7 +10,7 @@ depends=('java-environment' 'sh') optdepends=('livestreamer: for watching streams in a custom video player.') makedepends=('apache-ant' 'jre7-openjdk') -source=("http://downloads.sourceforge.net/getchatty/Chatty_${pkgver}_source.zip" +source=("https://github.com/chatty/chatty/archive/v${pkgver}.tar.gz" "${pkgname}.png" "${pkgname}.desktop" "${pkgname}_script" @@ -19,17 +19,18 @@ source=("http://downloads.sourceforge.net/getchatty/Chatty_${pkgver}_source.zip" "manifest.patch" "disable_version_check.patch" "build.patch") -md5sums=('05f1ea3a948719a89127f7feb9c0aa42' +md5sums=('ec686a2146c166bf50ee330a9c590f82' '2bdf69cd81d941dba97d55694f9da26d' '9d8950b786e1af5614bc705ad478b019' '8f74b121a39705a33687ddf26dfdd2ac' '6464228eceee06c4f8987df9b44bab65' - '2dd48d545926d8e9d5ab56df46dc09d3' - 'c6360077b684607a765f50a23006bbff' - '806ddd5794c5441b07733be4229bf9d2' - '79752de0a1a4dcc15067d9c33214ca3f') + '7447247975e5c804a0185caf481ddc15' + '1432edb5b8a728106bd7e76e042c8e9f' + '6c62ed9c73b42b9a629d796b3358c193' + 'ff584c4f1ce48e0ae48a4fc131999be2') prepare() { + cd chatty-${pkgver} patch -p1 -i $srcdir/build.patch patch -p1 -i $srcdir/client_id.patch patch -p1 -i $srcdir/config_dir.patch @@ -38,21 +39,22 @@ prepare() { } build() { + cd chatty-${pkgver} ant } package(){ - install -Dm644 "${srcdir}/dist/${pkgname}.jar" "${pkgdir}/usr/share/${pkgname}/${pkgname}.jar" + install -Dm644 "${srcdir}/chatty-${pkgver}/dist/${pkgname}.jar" "${pkgdir}/usr/share/${pkgname}/${pkgname}.jar" mkdir -p "${pkgdir}/usr/share/${pkgname}" - cp -a "${srcdir}/sounds" "${pkgdir}/usr/share/${pkgname}/" + cp -a "${srcdir}/chatty-${pkgver}/assets" "${pkgdir}/usr/share/${pkgname}/" install -Dm755 "${srcdir}/${pkgname}_script" "${pkgdir}/usr/bin/${pkgname}" install -Dm644 "${srcdir}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png" install -Dm755 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" - install -Dm644 "${srcdir}/APACHE_LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/APACHE_LICENSE" - install -Dm644 "${srcdir}/LGPL" "${pkgdir}/usr/share/licenses/${pkgname}/LGPL" - install -Dm644 "${srcdir}/README" "${pkgdir}/usr/share/licenses/${pkgname}/MIT" + install -Dm644 "${srcdir}/chatty-${pkgver}/APACHE_LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/APACHE_LICENSE" + install -Dm644 "${srcdir}/chatty-${pkgver}/LGPL" "${pkgdir}/usr/share/licenses/${pkgname}/LGPL" + install -Dm644 "${srcdir}/chatty-${pkgver}/README.md" "${pkgdir}/usr/share/licenses/${pkgname}/MIT" } diff --git a/build.patch b/build.patch index abe2ab932c55..4512af21a327 100644 --- a/build.patch +++ b/build.patch @@ -1,21 +1,100 @@ # make an own build.xml because the sources do not contain all build files -Index: chatty-0.7.1/build.xml -=================================================================== ---- /dev/null -+++ chatty-0.7.1/build.xml -@@ -0,0 +1,29 @@ +diff --git a/build.xml b/build.xml +index aa14e9f..c752517 100644 +--- a/build.xml ++++ b/build.xml +@@ -1,79 +1,29 @@ +-<?xml version="1.0" encoding="UTF-8"?>
+-<!-- You may freely edit this file. See commented blocks below for -->
+-<!-- some examples of how to customize the build. -->
+-<!-- (If you delete it and reopen the project it will be recreated.) -->
+-<!-- By default, only the Clean and Build commands use this build script. -->
+-<!-- Commands such as Run, Debug, and Test only use this build script if -->
+-<!-- the Compile on Save feature is turned off for the project. -->
+-<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
+-<!-- in the project's Project Properties dialog box.-->
+-<project name="Chatty" default="default" basedir=".">
+- <description>Builds, tests, and runs the project Chatty.</description>
+- <import file="nbproject/build-impl.xml"/>
+- <!--
+-
+- There exist several targets which are by default empty and which can be
+- used for execution of your tasks. These targets are usually executed
+- before and after some main targets. They are:
+-
+- -pre-init: called before initialization of project properties
+- -post-init: called after initialization of project properties
+- -pre-compile: called before javac compilation
+- -post-compile: called after javac compilation
+- -pre-compile-single: called before javac compilation of single file
+- -post-compile-single: called after javac compilation of single file
+- -pre-compile-test: called before javac compilation of JUnit tests
+- -post-compile-test: called after javac compilation of JUnit tests
+- -pre-compile-test-single: called before javac compilation of single JUnit test
+- -post-compile-test-single: called after javac compilation of single JUunit test
+- -pre-jar: called before JAR building
+- -post-jar: called after JAR building
+- -post-clean: called after cleaning build products
+-
+- (Targets beginning with '-' are not intended to be called on their own.)
+-
+- Example of inserting an obfuscator after compilation could look like this:
+-
+- <target name="-post-compile">
+- <obfuscate>
+- <fileset dir="${build.classes.dir}"/>
+- </obfuscate>
+- </target>
+-
+- For list of available properties check the imported
+- nbproject/build-impl.xml file.
+-
+-
+- Another way to customize the build is by overriding existing main targets.
+- The targets of interest are:
+-
+- -init-macrodef-javac: defines macro for javac compilation
+- -init-macrodef-junit: defines macro for junit execution
+- -init-macrodef-debug: defines macro for class debugging
+- -init-macrodef-java: defines macro for class execution
+- -do-jar-with-manifest: JAR building (if you are using a manifest)
+- -do-jar-without-manifest: JAR building (if you are not using a manifest)
+- run: execution of project
+- -javadoc-build: Javadoc generation
+- test-report: JUnit report generation
+-
+- An example of overriding the target for project execution could look like this:
+-
+- <target name="run" depends="Chatty-impl.jar">
+- <exec dir="bin" executable="launcher.exe">
+- <arg file="${dist.jar}"/>
+- </exec>
+- </target>
+-
+- Notice that the overridden target depends on the jar target and not only on
+- the compile target as the regular run target does. Again, for a list of available
+- properties which you can use, check the target you are overriding in the
+- nbproject/build-impl.xml file.
+-
+- -->
+- <target name="-post-jar">
+- <copy todir="${dist.dir}/sounds/">
+- <fileset dir="assets/sounds" />
+- </copy>
+- </target>
+-</project>
+<project name="chatty" default="jar"> + <target name="clean"> + <delete dir="bin"/> + <delete dir="dist"/> -+ <delete dir="lib/dlls"/> ++ <delete dir="assets/lib/dlls"/> + </target> + + <target name="compile" depends="clean"> + <mkdir dir="bin"/> + <javac srcdir="src/chatty" encoding="utf-8" destdir="bin"> + <classpath> -+ <fileset dir="lib"> ++ <fileset dir="assets/lib"> + <include name="**/*.jar" /> + </fileset> + </classpath> @@ -29,7 +108,10 @@ Index: chatty-0.7.1/build.xml + <mkdir dir="dist"/> + <jar manifest="manifest.mf" destfile="dist/chatty.jar"> + <fileset dir="bin" /> -+ <zipgroupfileset dir="lib" /> ++ <zipgroupfileset dir="assets/lib" /> + </jar> + </target> +</project> +-- +2.5.0 + diff --git a/client_id.patch b/client_id.patch index ea78d78376a1..858a99ee8a16 100644 --- a/client_id.patch +++ b/client_id.patch @@ -1,14 +1,17 @@ # set client ID. Generated own ID from twitch -Index: chatty-0.7.1/src/chatty/Chatty.java -=================================================================== ---- chatty-0.7.1.orig/src/chatty/Chatty.java -+++ chatty-0.7.1/src/chatty/Chatty.java +diff --git a/src/chatty/Chatty.java b/src/chatty/Chatty.java +index 618985c..bb54ccf 100644 +--- a/src/chatty/Chatty.java ++++ b/src/chatty/Chatty.java @@ -37,7 +37,7 @@ public class Chatty { * If you compile this program yourself, you should create your own client
* id on http://www.twitch.tv/kraken/oauth2/clients/new
*/
-- public static final String CLIENT_ID = <...>;
+- public static final String CLIENT_ID = "spyiu9jqdnfjtwv6l1xjk5zgt8qb91l";
+ public static final String CLIENT_ID = "q1b6bqsamkie9jl3917hsvaq388psra";
/**
* The redirect URI for getting a token.
+-- +2.5.0 + diff --git a/disable_version_check.patch b/disable_version_check.patch index 1a7e032acce3..968b7a6652fc 100644 --- a/disable_version_check.patch +++ b/disable_version_check.patch @@ -1,60 +1,90 @@ # disable version check. updates come via package management -Index: chatty-0.7.3/src/chatty/Version.java -=================================================================== ---- chatty-0.7.3.orig/src/chatty/Version.java 2015-01-19 21:39:08.293772537 +0100 -+++ chatty-0.7.3/src/chatty/Version.java 2015-01-19 21:39:08.285772538 +0100 -@@ -32,8 +32,8 @@ - }
-
- private void checkForNewVersion() {
-- LOGGER.info("Checking for new version..");
-- new Thread(new VersionChecker()).start();
-+ //LOGGER.info("Checking for new version..");
-+ //new Thread(new VersionChecker()).start();
- }
+diff --git a/src/chatty/Chatty.java b/src/chatty/Chatty.java +index 2fdc077..5c39dd8 100644 +--- a/src/chatty/Chatty.java ++++ b/src/chatty/Chatty.java +@@ -53,7 +53,7 @@ public class Chatty { + * Enable Version Checker (if you compile and distribute this yourself, you
+ * may want to disable this)
+ */
+- public static final boolean VERSION_CHECK_ENABLED = true;
++ public static final boolean VERSION_CHECK_ENABLED = false;
/**
-Index: chatty-0.7.3/src/chatty/TwitchClient.java -=================================================================== ---- chatty-0.7.3.orig/src/chatty/TwitchClient.java 2015-01-19 21:39:08.293772537 +0100 -+++ chatty-0.7.3/src/chatty/TwitchClient.java 2015-01-19 21:39:08.289772538 +0100 -@@ -282,7 +282,7 @@ -
+ * The regular URL of the textfile where the most recent version is stored.
+diff --git a/src/chatty/TwitchClient.java b/src/chatty/TwitchClient.java +index 8bea1db..b900837 100644 +--- a/src/chatty/TwitchClient.java ++++ b/src/chatty/TwitchClient.java +@@ -262,7 +262,7 @@ public class TwitchClient { + checkForVersionChange();
// Check version, if enabled in this build
if (Chatty.VERSION_CHECK_ENABLED) {
- checkNewVersion();
+ //checkNewVersion();
}
-
+
// Connect or open connect dialog
-@@ -341,7 +341,7 @@ +@@ -370,44 +370,7 @@ public class TwitchClient { + * Checks for a new version if the last check was long enough ago.
*/
private void checkNewVersion() {
- //g.setUpdateAvailable();
- if (!settings.getBoolean("checkNewVersion")) {
-+ /*if (!settings.getBoolean("checkNewVersion")) {
- return;
- }
- long ago = System.currentTimeMillis() - settings.getLong("versionLastChecked");
-@@ -367,7 +367,7 @@ - g.printSystem("You already have the newest version.");
- }
- }
+- return;
+- }
+- /**
+- * Check if enough time has passed since the last check.
+- */
+- long ago = System.currentTimeMillis() - settings.getLong("versionLastChecked");
+- if (ago/1000 < CHECK_VERSION_INTERVAL) {
+- /**
+- * If not checking, check if update was detected last time.
+- */
+- String updateAvailable = settings.getString("updateAvailable");
+- if (!updateAvailable.isEmpty()) {
+- g.setUpdateAvailable(updateAvailable);
+- }
+- return;
+- }
+- settings.setLong("versionLastChecked", System.currentTimeMillis());
+- g.printSystem("Checking for new version..");
+
+- new Version(new VersionListener() {
+-
+- @Override
+- public void versionChecked(String version, String info, boolean isNewVersion) {
+- if (isNewVersion) {
+- String infoText = "";
+- if (!info.isEmpty()) {
+- infoText = "[" + info + "] ";
+- }
+- g.printSystem("New version available: "+version+" "+infoText
+- +"(Go to <Help-Website> to download)");
+- g.setUpdateAvailable(version);
+- settings.setString("updateAvailable", version);
+- } else {
+- g.printSystem("You already have the newest version.");
+- }
+- }
- });
-+ });*/
}
/**
-Index: chatty-0.7.3/src/chatty/Chatty.java -=================================================================== ---- chatty-0.7.3.orig/src/chatty/Chatty.java 2015-01-19 21:39:08.293772537 +0100 -+++ chatty-0.7.3/src/chatty/Chatty.java 2015-01-19 21:39:08.289772538 +0100 -@@ -53,7 +53,7 @@ - * Enable Version Checker (if you compile and distribute this yourself, you
- * may want to disable this)
- */
-- public static final boolean VERSION_CHECK_ENABLED = true;
-+ public static final boolean VERSION_CHECK_ENABLED = false;
+diff --git a/src/chatty/Version.java b/src/chatty/Version.java +index 2f6d9c4..6ac5227 100644 +--- a/src/chatty/Version.java ++++ b/src/chatty/Version.java +@@ -32,8 +32,8 @@ public class Version { + }
+
+ private void checkForNewVersion() {
+- LOGGER.info("Checking for new version..");
+- new Thread(new VersionChecker()).start();
++ //LOGGER.info("Checking for new version..");
++ //new Thread(new VersionChecker()).start();
+ }
/**
- * The regular URL of the textfile where the most recent version is stored.
+-- +2.5.0 + diff --git a/manifest.patch b/manifest.patch index e4eee2a61107..c062fb40be7c 100644 --- a/manifest.patch +++ b/manifest.patch @@ -1,8 +1,14 @@ # make a proper manifest -Index: chatty-0.6/manifest.mf -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ chatty-0.6/manifest.mf 2014-02-14 17:49:57.795727061 +0100 -@@ -0,0 +1,2 @@ +diff --git a/manifest.mf b/manifest.mf +index 1574df4..79d6981 100644 +--- a/manifest.mf ++++ b/manifest.mf +@@ -1,3 +1,2 @@ +-Manifest-Version: 1.0
+-X-COMMENT: Main-Class will be added automatically by build
+-
+Manifest-Version: 1.0 +Main-Class: chatty.Chatty +-- +2.5.0 + |