diff options
author | Your Name | 2018-02-27 00:14:11 -0500 |
---|---|---|
committer | Your Name | 2018-02-27 00:14:11 -0500 |
commit | adf37b10ed11111e8db5a6f41739d49b912116c3 (patch) | |
tree | e2a9ad5c9853ea74f50e83b74c6e3339224a50b3 | |
parent | 51014619cefc4aa280eaf9f1ded1d4568b27d876 (diff) | |
download | aur-adf37b10ed11111e8db5a6f41739d49b912116c3.tar.gz |
update
-rw-r--r-- | PKGBUILD | 9 | ||||
-rw-r--r-- | remove_privileged_actions.patch | 190 |
2 files changed, 198 insertions, 1 deletions
@@ -2,7 +2,7 @@ # Contributor: StevensNJD4 <github dot com slash StevensNJD4> pkgname=lazyman-git -pkgver=2.3.0.20180222 +pkgver=2.3.0.20180226 pkgrel=1 pkgdesc="A simple program that lets you stream every NHL and MLB game" url="https://github.com/StevensNJD4/LazyMan" @@ -13,11 +13,13 @@ makedepends=('java-environment>=8' 'apache-ant' 'git') backup=('usr/share/java/lazyman/config.properties') source=('git+https://github.com/StevensNJD4/LazyMan.git' + 'remove_privileged_actions.patch' 'config.properties' 'lazyman.sh' 'lazyman.desktop' 'lazyman.png') md5sums=('SKIP' + '69efa50d0ca27032a1b6b911f7760d7a' '401d37812b1a6a9c699a4ec574732148' 'b76d76bc5941418f8f3048b941fa8228' '1b259947cc8e14cd1b0bcad4d05094d9' @@ -28,6 +30,11 @@ pkgver() { cat VERSION } +prepare() { + cd "$srcdir/LazyMan" + patch -Np1 -i "../remove_privileged_actions.patch" +} + build() { cd "$srcdir/LazyMan" rm -rf build dist store diff --git a/remove_privileged_actions.patch b/remove_privileged_actions.patch new file mode 100644 index 000000000000..51451ea76836 --- /dev/null +++ b/remove_privileged_actions.patch @@ -0,0 +1,190 @@ +diff -Naur LazyMan.orig/src/lazyman/MainGUI.java LazyMan/src/lazyman/MainGUI.java +--- LazyMan.orig/src/lazyman/MainGUI.java 2018-02-26 23:52:09.766736453 -0500 ++++ LazyMan/src/lazyman/MainGUI.java 2018-02-26 23:56:38.356799279 -0500 +@@ -66,9 +66,6 @@ + leagues[i].getDateTF().setDate(Time.getPSTDate1("MMM dd, yyyy")); + leagues[i].setFavoriteTeam(Props.getFavTeam(leagues[i].getName())); + } +- if (System.getProperty("os.name").toLowerCase().contains("win")) { +- changePasswordMI.setVisible(false); +- } + /*else if (System.getProperty("os.name").toLowerCase().contains("mac")) { + com.apple.eawt.Application application = com.apple.eawt.Application.getApplication(); + application.addPreferencesMenuItem(); +@@ -151,12 +148,12 @@ + restartCB = new javax.swing.JCheckBox(); + jMenuBar1 = new javax.swing.JMenuBar(); + jMenu1 = new javax.swing.JMenu(); +- changePasswordMI = new javax.swing.JMenuItem(); ++ //changePasswordMI = new javax.swing.JMenuItem(); + exitMI = new javax.swing.JMenuItem(); + jMenu2 = new javax.swing.JMenu(); + preferencesMI = new javax.swing.JMenuItem(); +- jMenuItem1 = new javax.swing.JMenuItem(); +- jMenuItem2 = new javax.swing.JMenuItem(); ++ //jMenuItem1 = new javax.swing.JMenuItem(); ++ //jMenuItem2 = new javax.swing.JMenuItem(); + jMenu3 = new javax.swing.JMenu(); + guidesMI = new javax.swing.JMenuItem(); + AboutMI = new javax.swing.JMenuItem(); +@@ -572,6 +569,7 @@ + jMenu1.setMnemonic(KeyEvent.VK_F); + jMenu1.setText("File"); + ++ /* + changePasswordMI.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK)); + changePasswordMI.setText("Change Password"); + changePasswordMI.addActionListener(new java.awt.event.ActionListener() { +@@ -580,6 +578,7 @@ + } + }); + jMenu1.add(changePasswordMI); ++ */ + + exitMI.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK)); + exitMI.setText("Exit"); +@@ -604,6 +603,7 @@ + }); + jMenu2.add(preferencesMI); + ++ /* + jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.CTRL_MASK)); + jMenuItem1.setText("Change IP"); + jMenuItem1.addActionListener(new java.awt.event.ActionListener() { +@@ -620,6 +620,7 @@ + } + }); + jMenu2.add(jMenuItem2); ++ */ + + jMenuBar1.add(jMenu2); + +@@ -743,19 +744,6 @@ + if (!playBtn.isEnabled()) { + return; + } +- +- if (leagues[jTabbedPane1.getSelectedIndex()].getName().equals("MLB")) { +- if (Integer.parseInt(leagues[jTabbedPane1.getSelectedIndex()].getDate().substring(0, 4)) > 2017) +- checkHosts(leagues[jTabbedPane1.getSelectedIndex()].getKeyURL(), leagues[jTabbedPane1.getSelectedIndex()]); +- else +- checkHosts("mlb-ws-mf.media.mlb.com", leagues[jTabbedPane1.getSelectedIndex()]); +- } else +- checkHosts(leagues[jTabbedPane1.getSelectedIndex()].getKeyURL(), leagues[jTabbedPane1.getSelectedIndex()]); +- +- if (!leagues[jTabbedPane1.getSelectedIndex()].isHostsFileEdited()) { +- MessageBox.show("You are not completely set up! Your hosts file needs to be edited for " + leagues[jTabbedPane1.getSelectedIndex()].getName() + ".", "Hosts file not edited", 2); +- return; +- } + + if (streamlink.getLocation() == null || streamlink.getLocation().equals("")) { + getSLLoc(); +@@ -1019,7 +1007,7 @@ + private javax.swing.JTable NHLGameTable; + private javax.swing.JButton NHLNextDayBtn; + private javax.swing.JButton NHLPrevDayBtn; +- private javax.swing.JMenuItem changePasswordMI; ++ //private javax.swing.JMenuItem changePasswordMI; + private javax.swing.JPopupMenu consolePM; + private javax.swing.JTextPane consoleTA; + private javax.swing.JMenuItem exitMI; +@@ -1031,8 +1019,8 @@ + private javax.swing.JMenu jMenu2; + private javax.swing.JMenu jMenu3; + private javax.swing.JMenuBar jMenuBar1; +- private javax.swing.JMenuItem jMenuItem1; +- private javax.swing.JMenuItem jMenuItem2; ++ //private javax.swing.JMenuItem jMenuItem1; ++ //private javax.swing.JMenuItem jMenuItem2; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPanel3; +@@ -1547,85 +1535,19 @@ + + if (!ver[3].contains("BETA")) { + if (curMajor > major || (curMajor == major && curMinor > minor) || (curMajor == major && curMinor >= minor && curPatch > patch) || (curMajor == major && curMinor >= minor && curPatch >= patch && curBuild > build)) { +- if (MessageBox.ask("New update available!\nWould you like to update?", "New Update!") == MessageBox.yesOption()) { +- SwingWorker<Void, Void> u = updating(); +- u.execute(); +- if (AutoUpdate.download(version)) { +- if (AutoUpdate.unZipIt()) { +- String loc; +- +- if (!System.getProperty("os.name").toLowerCase().contains("linux")) { +- loc = Paths.get(".").toAbsolutePath().normalize().toString() + System.getProperty("file.separator"); +- if (System.getProperty("os.name").toLowerCase().contains("win")) { +- loc += "LazyMan.exe"; +- } else { +- loc += "LazyMan.jar"; +- } +- } else { +- loc = new java.io.File(Props.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent() + System.getProperty("file.separator") + "LazyMan.jar"; +- } +- Runtime.getRuntime().exec("java -jar " + loc); +- System.exit(0); +- } +- } +- MessageBox.show("Could not authentically update. Please manually update", version, build); +- } ++ MessageBox.show("New update available. Please manually update", version, build); + } else { + updateMI.setVisible(false); + } + } else { + if (curMajor > major || (curMajor == major && curMinor > minor) || (curMajor == major && curMinor >= minor && curPatch > patch) || (curMajor == major && curMinor >= minor && curPatch >= patch && curBuild > build)) { +- if (MessageBox.ask("New stable update available!\nWould you like to update", "New Update!") == MessageBox.yesOption()) { +- SwingWorker<Void, Void> u = updating(); +- u.execute(); +- if (AutoUpdate.download(version)) { +- if (AutoUpdate.unZipIt()) { +- String loc; +- +- if (!System.getProperty("os.name").toLowerCase().contains("linux")) { +- loc = Paths.get(".").toAbsolutePath().normalize().toString() + System.getProperty("file.separator"); +- if (System.getProperty("os.name").toLowerCase().contains("win")) { +- loc += "LazyMan.exe"; +- } else { +- loc += "LazyMan.jar"; +- } +- } else { +- loc = new java.io.File(Props.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent() + System.getProperty("file.separator") + "LazyMan.jar"; +- } +- Runtime.getRuntime().exec("java -jar " + loc); +- System.exit(0); +- } +- } +- MessageBox.show("Could not automatically update. Please manually update.", "Could not automatically update", 2); +- } ++ MessageBox.show("New update available. Please manually update", version, build); + } else { + version = Web.getContent("https://raw.githubusercontent.com/StevensNJD4/LazyMan/master/VERSIONBETA").replace(" BETA", "").trim(); + String[] curVerB = version.split("\\."); + int curMajorB = Integer.parseInt(curVerB[0]), curMinorB = Integer.parseInt(curVerB[1]), curPatchB = Integer.parseInt(curVerB[2]), curBuildB = Integer.parseInt(curVerB[3]); + if (curMajorB > major || (curMajorB == major && curMinorB > minor) || (curMajorB == major && curMinorB >= minor && curPatchB > patch) || (curMajorB == major && curMinorB >= minor && curPatchB >= patch && curBuildB > build)) { +- if (MessageBox.ask("New beta update available!\nWould you like to update?", "New Update!") == MessageBox.yesOption()) { +- SwingWorker<Void, Void> u = updating(); +- u.execute(); +- if (AutoUpdate.download(version)) { +- if (AutoUpdate.unZipIt()) { +- String loc; +- +- if (!System.getProperty("os.name").toLowerCase().contains("linux")) { +- loc = Paths.get(".").toAbsolutePath().normalize().toString() + System.getProperty("file.separator"); +- if (System.getProperty("os.name").toLowerCase().contains("win")) { +- loc += "LazyMan.exe"; +- } else { +- loc += "LazyMan.jar"; +- } +- } else { +- loc = new java.io.File(Props.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent() + System.getProperty("file.separator") + "LazyMan.jar"; +- } +- Runtime.getRuntime().exec("java -jar " + loc); +- System.exit(0); +- } +- } +- MessageBox.show("Could not automatically update. Please manually update.", "Could not automatically update", 2); +- } ++ MessageBox.show("New beta update available", version, build); + } else { + updateMI.setVisible(false); + } |