summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD21
-rw-r--r--disable-update-check.patch32
-rwxr-xr-xubports-installer4
-rw-r--r--use-system-tools.patch21
5 files changed, 58 insertions, 30 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5f5c981c71b..5be2de1a768 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = ubports-installer-git
pkgdesc = A simple tool to install Ubuntu Touch on UBports devices
- pkgver = 0.3.2_beta.r6.g15ed833
- pkgrel = 2
+ pkgver = 0.4.2_beta.r5.g3e68c62
+ pkgrel = 1
url = https://github.com/ubports/ubports-installer
arch = any
license = GPL3
@@ -18,10 +18,12 @@ pkgbase = ubports-installer-git
source = ubports-installer
source = ubports-installer.desktop
source = disable-update-check.patch
+ source = use-system-tools.patch
sha512sums = SKIP
- sha512sums = e746e844f013c85f9ef6db7163b08e34745c48de2f94f096c582e6aa89b6cde54a91eca23e2eea0e0d6cb20f2582a0e33456c2503be45d6632bb0e02eb5b4cf1
+ sha512sums = 478766bca96e64cb13b86003113e33eba74139e5a0d56687ff0647e4d2356639249c9f4054c5c3741fec697c624980dd1507925702f4865370ec9a20f766720a
sha512sums = efb0da575db03326f56a8bb589f3f5f543a4ae23b471658555bb030bcc1c1625ba2aafd15f26fac41425b3b0bde4cf176740d92aafd5853d5ce1da2b946686e8
- sha512sums = 027f2085245135b3aff6e5340b00be55199161d7409788cd800028518c8e03a365c7b5cac762b817e3f71f8d719fdd6bb546807fcda5e64ef6ef11adca4a5c02
+ sha512sums = 7ed6bf81fa0bbf0dd9a256b9f0ac3e086210f493c398289674c9a41d3ec0d8af36387faf95d700bdfd5b2337f9a3f12e5bb7a72499668f5622c69dea25e6f49d
+ sha512sums = bde53f6f98998d2eb864e63fd73e2da146e5d6f985b670112ea4fcb9001ce34bd59a55d2a8c28f8c8b42280c7225de6746f969d827938441c15eb8febdf15981
pkgname = ubports-installer-git
diff --git a/PKGBUILD b/PKGBUILD
index 6e07c0cbe6f..24342ca4cad 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Matthias Lisin <ml@visu.li>
pkgname=ubports-installer-git
-pkgver=0.3.2_beta.r6.g15ed833
-pkgrel=2
+pkgver=0.4.2_beta.r5.g3e68c62
+pkgrel=1
pkgdesc='A simple tool to install Ubuntu Touch on UBports devices'
arch=(any)
url='https://github.com/ubports/ubports-installer'
@@ -13,11 +13,13 @@ conflicts=('ubports-installer')
source=("$pkgname::git+${url}.git"
ubports-installer
ubports-installer.desktop
- disable-update-check.patch)
+ disable-update-check.patch
+ use-system-tools.patch)
sha512sums=('SKIP'
- 'e746e844f013c85f9ef6db7163b08e34745c48de2f94f096c582e6aa89b6cde54a91eca23e2eea0e0d6cb20f2582a0e33456c2503be45d6632bb0e02eb5b4cf1'
+ '478766bca96e64cb13b86003113e33eba74139e5a0d56687ff0647e4d2356639249c9f4054c5c3741fec697c624980dd1507925702f4865370ec9a20f766720a'
'efb0da575db03326f56a8bb589f3f5f543a4ae23b471658555bb030bcc1c1625ba2aafd15f26fac41425b3b0bde4cf176740d92aafd5853d5ce1da2b946686e8'
- '027f2085245135b3aff6e5340b00be55199161d7409788cd800028518c8e03a365c7b5cac762b817e3f71f8d719fdd6bb546807fcda5e64ef6ef11adca4a5c02')
+ '7ed6bf81fa0bbf0dd9a256b9f0ac3e086210f493c398289674c9a41d3ec0d8af36387faf95d700bdfd5b2337f9a3f12e5bb7a72499668f5622c69dea25e6f49d'
+ 'bde53f6f98998d2eb864e63fd73e2da146e5d6f985b670112ea4fcb9001ce34bd59a55d2a8c28f8c8b42280c7225de6746f969d827938441c15eb8febdf15981')
pkgver() {
cd "$pkgname"
@@ -26,26 +28,25 @@ pkgver() {
prepare() {
local dist=/usr/lib/electron4
- local version="$(sed s/^v// $dist/version)"
+ local version="$(sed 's/^v//' $dist/version)"
cd "$pkgname"
for i in ${source[@]}; do
case ${i%::*} in
*.patch)
msg2 "Applying ${i}"
- patch -p1 -i "$srcdir/${i}"
+ patch -N -p1 -i "$srcdir/${i}"
;;
esac
done
# Set electronDist and current electronVersion
- mv -v buildconfig-generic.json buildconfig-generic.json.orig
jq '.electronDist = $dist | .electronVersion = $version' \
--arg dist "$dist" \
--arg version "$version" \
- buildconfig-generic.json.orig > buildconfig-generic.json
+ buildconfig-generic.json | sponge buildconfig-generic.json
- npm uninstall --no-audit --cache "$srcdir/npm-cache" electron{-packager,-view-renderer} spectron
+ npm uninstall --no-audit --cache "$srcdir/npm-cache" electron-packager
# Removing local references
for module in he sshpk; do
diff --git a/disable-update-check.patch b/disable-update-check.patch
index 89360785525..15dfd0d3b3a 100644
--- a/disable-update-check.patch
+++ b/disable-update-check.patch
@@ -1,20 +1,26 @@
diff -ura package.orig/src/main.js package.new/src/main.js
---- package.orig/src/main.js 2019-10-12 21:18:46.099712720 +0200
-+++ package.new/src/main.js 2019-10-12 21:25:12.285643001 +0200
-@@ -266,16 +266,6 @@
- });
+--- package.orig/src/main.js 2019-10-30 00:09:52.833991579 +0100
++++ package.new/src/main.js 2019-10-30 00:13:11.936926036 +0100
+@@ -393,22 +393,6 @@
+ });
});
- // Task we need only on the first start
- mainWindow.webContents.once("did-finish-load", () => {
-- utils.getUpdateAvailable().then(() => {
-- utils.log.info("This is not the latest version of the UBports Installer! Please update: https://devices.ubuntu-touch.io/installer/" + (global.packageInfo.package ? global.packageInfo.package : ""));
-- mainWindow.webContents.send("user:update-available");
-- }).catch(() => {
-- utils.log.debug("This is the latest version.")
-- });
+- utils
+- .getUpdateAvailable()
+- .then(() => {
+- utils.log.info(
+- "This is not the latest version of the UBports Installer! Please update: https://devices.ubuntu-touch.io/installer/" +
+- (global.packageInfo.package ? global.packageInfo.package : "")
+- );
+- mainWindow.webContents.send("user:update-available");
+- })
+- .catch(() => {
+- utils.log.debug("This is the latest version.");
+- });
- });
-
- mainWindow.loadURL(url.format({
- pathname: path.join(__dirname, 'html/index.pug'),
- protocol: 'file:',
+ mainWindow.loadURL(
+ url.format({
+ pathname: path.join(__dirname, "html/index.pug"),
diff --git a/ubports-installer b/ubports-installer
index ba72f4b2c9f..e62c678c6fd 100755
--- a/ubports-installer
+++ b/ubports-installer
@@ -1,4 +1,2 @@
#!/bin/sh
-# need SNAP_NAME for adb/fastbook to be detected
-# https://github.com/ubports/ubports-installer/commit/15ed833ce5149a47ea376aa93e6cc7908afe8c92#diff-1c90ff38a08209f9ebd4d05d1e43358eR48
-SNAP_NAME=arch exec electron4 /usr/share/ubports-installer/app.asar "$@"
+exec electron4 /usr/share/ubports-installer/app.asar "$@"
diff --git a/use-system-tools.patch b/use-system-tools.patch
new file mode 100644
index 00000000000..882deb6000b
--- /dev/null
+++ b/use-system-tools.patch
@@ -0,0 +1,21 @@
+diff -ura package.orig/src/utils.js package.new/src/utils.js
+--- package.orig/src/utils.js 2019-10-30 00:09:52.833991579 +0100
++++ package.new/src/utils.js 2019-10-30 00:24:23.422742604 +0100
+@@ -222,16 +222,9 @@
+ process.exit(-1);
+ }
+
+-let toolpath = global.packageInfo.package
+- ? path.join(
+- __dirname,
+- "../../app.asar.unpacked/platform-tools",
+- platforms[os.platform()]
+- )
+- : path.join(__dirname, "..", "platform-tools", platforms[os.platform()]);
+ function execTool(tool, args, callback) {
+ exec(
+- [path.join(toolpath, tool)].concat(args).join(" "),
++ [tool].concat(args).join(" "),
+ { options: { maxBuffer: 1024 * 1024 * 2 } },
+ callback
+ );