From 0c752b0af1ff4a989f8922a2659cea637f7128ce Mon Sep 17 00:00:00 2001 From: Joseph Riches Date: Mon, 23 Jan 2017 17:28:29 +0000 Subject: [PATCH 1/1] package-chatty --- files/chatty.desktop | 9 ++++ files/chatty.png | Bin 0 -> 3770 bytes files/disable_version_check.patch | 87 ++++++++++++++++++++++++++++++++++++++ files/user_config_dir.patch | 22 ++++++++++ package.yml | 31 ++++++++++++++ pspec_x86_64.xml | 37 ++++++++++++++++ 6 files changed, 186 insertions(+) create mode 100644 files/chatty.desktop create mode 100644 files/chatty.png create mode 100644 files/disable_version_check.patch create mode 100644 files/user_config_dir.patch create mode 100644 package.yml create mode 100644 pspec_x86_64.xml diff --git a/files/chatty.desktop b/files/chatty.desktop new file mode 100644 index 0000000..53d5c3f --- /dev/null +++ b/files/chatty.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Chatty +Exec=/usr/bin/chatty +Icon=chatty +Terminal=false +Type=Application +Categories=Application;Network; +Keywords=twitch;chat; diff --git a/files/chatty.png b/files/chatty.png new file mode 100644 index 0000000000000000000000000000000000000000..91b8bb43740d56ebb3d4ae190687681801d0bd38 GIT binary patch literal 3770 zcmV;r4n^^aP)lE^?!NNPwNW0cZ_P}fNuMRg)I zy+n~3Rk=t}lza%Naq`8A>Y~cAC5M{WZCcfqg@a=(?8T5+T)dkFBbx@yWzDi{-kEcr zemIwz*y^M)>9tDk@KL^PloxM#)kRh##8K6_i}{ENH3jMAXBLTU0t z0m}7(|35TwvqA*13K2mpg+s6wuwX5S$?se1uB`#AV2yvrQPn+lSF$pn)MCUyNL6>JJwX0bKgy$sAnu&KD`Lw|U$W-%%3?%u(P zbKO`APxUxPbhNG9{c`v4Ot=&SrUTyuz6$W!_4hOXx`ljV%_iy_>X#XLP6#sYcUl{14b}{4m zqdPe9*6(=wSk#7Xz_)>OMM9HHNPo+^)f?~aI(Bfz<~#1^#%mXH*V@fYoidgB#yWHb zbXAj7oaB=#?z)Q8jEZN3za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phsTWo@f> z@9W+*u1!+IGNH(buyw^q%Kuz=l`k!LWL(~N>)|^P6iwA>%xP>VQPq-qU`%_2E8`e&q`~4sz(CqdV`XLu7GI)m^HO?qGMkwv+w|og(4;bS zbJeA7|7Y(c@t2(eKkxa+bfi?YK>W7hK*^QJfM)L;y+=)|;~;+fJ1zao!GNld3||c$ zQ<|rb#qQq~#7~w1CF$Qbe4DaYNB}x~WN+z&(RPx#07*qoM6N<$f(h19LI3~& literal 0 HcmV?d00001 diff --git a/files/disable_version_check.patch b/files/disable_version_check.patch new file mode 100644 index 0000000..6eb142c --- /dev/null +++ b/files/disable_version_check.patch @@ -0,0 +1,87 @@ +# disable version check. updates come via package management +Index: chatty-0.8.2/src/chatty/Chatty.java +=================================================================== +--- chatty-0.8.2.orig/src/chatty/Chatty.java 2016-04-26 22:46:41.680640379 +0200 ++++ chatty-0.8.2/src/chatty/Chatty.java 2016-04-26 22:50:03.208841787 +0200 +@@ -58,7 +58,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; + + /** + * The regular URL of the textfile where the most recent version is stored. +Index: chatty-0.8.2/src/chatty/TwitchClient.java +=================================================================== +--- chatty-0.8.2.orig/src/chatty/TwitchClient.java 2016-04-26 22:47:26.953580371 +0200 ++++ chatty-0.8.2/src/chatty/TwitchClient.java 2016-04-26 22:51:15.054348837 +0200 +@@ -298,7 +298,7 @@ + checkForVersionChange(); + // Check version, if enabled in this build + if (Chatty.VERSION_CHECK_ENABLED) { +- checkNewVersion(); ++ //checkNewVersion(); + } + + // Connect or open connect dialog +@@ -368,44 +368,7 @@ + * Checks for a new version if the last check was long enough ago. + */ + private void checkNewVersion() { +- if (!settings.getBoolean("checkNewVersion")) { +- 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 to download)"); +- g.setUpdateAvailable(version); +- settings.setString("updateAvailable", version); +- } else { +- g.printSystem("You already have the newest version."); +- } +- } +- }); + } + + /** +Index: chatty-0.8.2/src/chatty/Version.java +=================================================================== +--- chatty-0.8.2.orig/src/chatty/Version.java 2016-04-26 22:47:26.953580371 +0200 ++++ chatty-0.8.2/src/chatty/Version.java 2016-04-26 22:51:48.071042729 +0200 +@@ -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/files/user_config_dir.patch b/files/user_config_dir.patch new file mode 100644 index 0000000..6a29db3 --- /dev/null +++ b/files/user_config_dir.patch @@ -0,0 +1,22 @@ +# change config directory to $HOME/.config/chatty +Index: chatty-0.8.2/src/chatty/Chatty.java +=================================================================== +--- chatty-0.8.2.orig/src/chatty/Chatty.java 2016-04-26 22:43:29.316678569 +0200 ++++ chatty-0.8.2/src/chatty/Chatty.java 2016-04-26 22:44:05.245414029 +0200 +@@ -186,12 +186,11 @@ + * @return + */ + public static String getUserDataDirectory() { +- if (useCurrentDirectory) { +- return System.getProperty("user.dir") + File.separator; +- } + String dir = System.getProperty("user.home") +- + File.separator +- + ".chatty" ++ + File.separator ++ + ".config" ++ + File.separator ++ + "chatty" + + File.separator; + new File(dir).mkdirs(); + return dir; diff --git a/package.yml b/package.yml new file mode 100644 index 0000000..7c88eeb --- /dev/null +++ b/package.yml @@ -0,0 +1,31 @@ +name : chatty +version : 0.8.4.1 +release : 1 +source : + - https://github.com/chatty/chatty/archive/v0.8.4.1.tar.gz : 68f00f3c7384b08041a63030a0738925348185ea5d1ff8a704d56977f8e04b18 +license : APACHE-2.0 +component : network.irc +summary : Twitch Chat Client +networking : yes +description: | + Twitch Chat Client written in Java +builddeps : + - gradle + - unzip +rundeps : + - openjdk-8 +setup : | + %patch -p1 < $pkgfiles/disable_version_check.patch + %patch -p1 < $pkgfiles/user_config_dir.patch +build : | + export GRADLE_USER_HOME=/home/build/YPKG/root/chatty/ + gradle --no-daemon release +install : | + mkdir -p $installdir/usr/share/chatty + unzip $workdir/build/releases/Chatty_$version.zip -d $installdir/usr/share/chatty/ + + install -Dm755 $pkgfiles/chatty_script $installdir/usr/bin/chatty + + install -Dm644 $pkgfiles/chatty.png $installdir/usr/share/pixmaps/chatty.png + install -Dm755 $pkgfiles/chatty.desktop $installdir/usr/share/applications/chatty.desktop + diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml new file mode 100644 index 0000000..0d66ae8 --- /dev/null +++ b/pspec_x86_64.xml @@ -0,0 +1,37 @@ + + + chatty + + Joseph Riches + josephriches@gmail.com + + APACHE-2.0 + network.irc + Twitch Chat Client + Twitch Chat Client written in Java + + https://solus-project.com/sources/README.Solus + + + chatty + Twitch Chat Client + Twitch Chat Client written in Java + + network.irc + + /usr/bin + /usr/share/applications/chatty.desktop + /usr/share/chatty + /usr/share/pixmaps/chatty.png + + + + + 2017-01-23 + 0.8.4.1 + Initial package upload + Joseph Riches + josephriches@gmail.com + + + \ No newline at end of file -- 2.11.0