summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD14
-rwxr-xr-xscript.exp92
3 files changed, 108 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5742337b7fbf..04aef37850d3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,16 @@
pkgbase = firefox-extension-kdeconnect
pkgdesc = kdeconnect addon for firefox.
- pkgver = 0.1.4
+ pkgver = 0.1.6
pkgrel = 1
url = https://addons.mozilla.org/en-US/firefox/addon/kde_connect/
- arch = any
+ arch = x86_64
groups = firefox-addons
license = GPLV3
depends = firefox
depends = kdeconnect
- source = extension.xpi::https://addons.mozilla.org/firefox/downloads/file/805784/kde_connect-0.1.4-an+fx-linux.xpi
- sha512sums = c013d15d3fda892e22408a0d2f19eee6d147c4d717074ca14d5e1e5cb85359b41221ba57642d66061e77a38a2b1b4e971a2e1da131693e1f7b4322c23bfcbc28
+ source = extension.xpi::https://addons.mozilla.org/firefox/downloads/file/805784/kde_connect-${pkgver}-an+fx-linux.xpi
+ source = https://github.com/pdf/kdeconnect-chrome-extension/releases/download/v0.1.6/kdeconnect-chrome-extension-v0.1.6-linux_amd64.tar.xz
+ sha512sums = SKIP
+ sha512sums = SKIP
pkgname = firefox-extension-kdeconnect
-
diff --git a/PKGBUILD b/PKGBUILD
index dc00206ed13d..6b45f4df4ad8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,14 +1,20 @@
pkgname=firefox-extension-kdeconnect
-pkgver=0.1.4
+pkgver=0.1.6
pkgrel=1
pkgdesc='kdeconnect addon for firefox.'
-arch=('any')
+arch=('x86_64')
url='https://addons.mozilla.org/en-US/firefox/addon/kde_connect/'
license=('GPLV3')
depends=('firefox' 'kdeconnect')
groups=('firefox-addons')
-source=("extension.xpi::https://addons.mozilla.org/firefox/downloads/file/805784/kde_connect-${pkgver}-an+fx-linux.xpi")
-sha512sums=('c013d15d3fda892e22408a0d2f19eee6d147c4d717074ca14d5e1e5cb85359b41221ba57642d66061e77a38a2b1b4e971a2e1da131693e1f7b4322c23bfcbc28')
+source=('extension.xpi::https://addons.mozilla.org/firefox/downloads/file/805784/kde_connect-${pkgver}-an+fx-linux.xpi'
+ "https://github.com/pdf/kdeconnect-chrome-extension/releases/download/v${pkgver}/kdeconnect-chrome-extension-v${pkgver}-linux_amd64.tar.xz")
+sha512sums=('SKIP' 'SKIP')
+
+build() {
+ cd ../
+ ./script.exp # auto install with fake keystrokes
+}
package() {
install -Dm644 extension.xpi "${pkgdir}/usr/lib/firefox/browser/extensions/kde-connect@0xc0dedbad.com.xpi"
diff --git a/script.exp b/script.exp
new file mode 100755
index 000000000000..9ea37128f5e7
--- /dev/null
+++ b/script.exp
@@ -0,0 +1,92 @@
+#!/usr/bin/expect -f
+#
+# This Expect script was generated by autoexpect on Sat Oct 23 23:45:16 2021
+# Expect and autoexpect were both written by Don Libes, NIST.
+#
+# Note that autoexpect does not guarantee a working script. It
+# necessarily has to guess about certain things. Two reasons a script
+# might fail are:
+#
+# 1) timing - A surprising number of programs (rn, ksh, zsh, telnet,
+# etc.) and devices discard or ignore keystrokes that arrive "too
+# quickly" after prompts. If you find your new script hanging up at
+# one spot, try adding a short sleep just before the previous send.
+# Setting "force_conservative" to 1 (see below) makes Expect do this
+# automatically - pausing briefly before sending each character. This
+# pacifies every program I know of. The -c flag makes the script do
+# this in the first place. The -C flag allows you to define a
+# character to toggle this mode off and on.
+
+set force_conservative 0 ;# set to 1 to force conservative mode even if
+ ;# script wasn't run conservatively originally
+if {$force_conservative} {
+ set send_slow {1 .1}
+ proc send {ignore arg} {
+ sleep .1
+ exp_send -s -- $arg
+ }
+}
+
+#
+# 2) differing output - Some programs produce different output each time
+# they run. The "date" command is an obvious example. Another is
+# ftp, if it produces throughput statistics at the end of a file
+# transfer. If this causes a problem, delete these patterns or replace
+# them with wildcards. An alternative is to use the -p flag (for
+# "prompt") which makes Expect only look for the last line of output
+# (i.e., the prompt). The -P flag allows you to define a character to
+# toggle this mode off and on.
+#
+# Read the man page for more info.
+#
+# -Don
+
+
+set timeout -1
+spawn ./src/kdeconnect-chrome-extension -install
+match_max 100000
+expect -exact "Browser Selection\r
+\[32m\[1mSelect browser(s) for native host installation (Space to select, Enter to confirm)\[0m:\[0m\r
+\r\[36m> \[0m◯ Chrome/Opera\r
+\r ◯ Chromium\r
+\r ◯ Brave\r
+\r ◯ Vivaldi\r
+\r ◯ Firefox\r
+\r ◯ Custom\[?25l"
+send -- "\[B"
+expect -exact "\[5A\r ◯ Chrome/Opera\r
+\r\[36m> \[0m◯ Chromium\r
+\r ◯ Brave\r
+\r ◯ Vivaldi\r
+\r ◯ Firefox\r
+\r ◯ Custom"
+send -- "\[B"
+expect -exact "\[5A\r ◯ Chrome/Opera\r
+\r ◯ Chromium\r
+\r\[36m> \[0m◯ Brave\r
+\r ◯ Vivaldi\r
+\r ◯ Firefox\r
+\r ◯ Custom"
+send -- "\[B"
+expect -exact "\[5A\r ◯ Chrome/Opera\r
+\r ◯ Chromium\r
+\r ◯ Brave\r
+\r\[36m> \[0m◯ Vivaldi\r
+\r ◯ Firefox\r
+\r ◯ Custom"
+send -- "\[B"
+expect -exact "\[5A\r ◯ Chrome/Opera\r
+\r ◯ Chromium\r
+\r ◯ Brave\r
+\r ◯ Vivaldi\r
+\r\[36m> \[0m◯ Firefox\r
+\r ◯ Custom"
+send -- " "
+expect -exact "\[5A\r ◯ Chrome/Opera\r
+\r ◯ Chromium\r
+\r ◯ Brave\r
+\r ◯ Vivaldi\r
+\r\[36m> \[0m◉ Firefox\r
+\r ◯ Custom"
+send -- "\r"
+expect eof