summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorml2020-11-04 00:58:50 +0100
committerml2020-11-04 00:58:50 +0100
commit034c9331f9a7d84675abd5afa028117173902e67 (patch)
treeb252f6bdf1ebc598012c82ba53ee8408188c3771
parent30a3c3c84f540cc68b76b12454a5b1d579f833c2 (diff)
downloadaur-034c9331f9a7d84675abd5afa028117173902e67.tar.gz
updpkg: ubports-installer-git 0.6.0_beta.r0.g4712efb-1
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD32
-rw-r--r--disable-update-udev-prompts.patch48
-rw-r--r--electrondist.patch11
-rwxr-xr-xubports-installer2
-rw-r--r--use-system-tools.patch18
6 files changed, 81 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7e31860487d..868f3c62acc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,11 @@
pkgbase = ubports-installer-git
pkgdesc = A simple tool to install Ubuntu Touch on UBports devices
- pkgver = 0.4.18_beta.r4.g40b1a03
+ pkgver = 0.6.0_beta.r0.g4712efb
pkgrel = 1
url = https://github.com/ubports/ubports-installer
arch = any
license = GPL3
makedepends = git
- makedepends = jq
makedepends = npm
depends = android-tools
depends = android-udev
@@ -16,11 +15,13 @@ pkgbase = ubports-installer-git
source = ubports-installer-git::git+https://github.com/ubports/ubports-installer.git
source = ubports-installer
source = ubports-installer.desktop
- source = use-system-tools.patch
+ source = disable-update-udev-prompts.patch
+ source = electrondist.patch
sha256sums = SKIP
- sha256sums = cc9a95c9b07eedb6ca18de0c09119747f311d52740ec69d83d08c8bd20b84aad
+ sha256sums = e3167aa1469a33d1eca4dae377ed51675bea08e61e6d17f94f83a241538be56b
sha256sums = 7f59cb66ab7e59caeff93f697e47f26f43a9a221258f4d89dee580e41dd7a39a
- sha256sums = 5b31be9612632f1a3beee3d38e97a23ee346ec814b580bfa41dad6e4f7ac4fb9
+ sha256sums = 6d2be9f0d81fdd3ea6e95585457f967d9889c5884c1645b4212ea95add202f4e
+ sha256sums = 768fcea52f63fed0bebb61861437db5f7e1f00358ad594c8d5593adc43a0f0c0
pkgname = ubports-installer-git
diff --git a/PKGBUILD b/PKGBUILD
index d1c7950613f..22ea7698469 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,25 @@
# Maintainer: ml <ml@visu.li>
pkgname=ubports-installer-git
-pkgver=0.4.18_beta.r4.g40b1a03
+pkgver=0.6.0_beta.r0.g4712efb
pkgrel=1
pkgdesc='A simple tool to install Ubuntu Touch on UBports devices'
arch=('any')
url='https://github.com/ubports/ubports-installer'
license=('GPL3')
depends=('android-tools' 'android-udev' 'electron')
-makedepends=('git' 'jq' 'npm')
+makedepends=('git' 'npm')
provides=('ubports-installer')
conflicts=('ubports-installer')
source=("${pkgname}::git+${url}.git"
ubports-installer
ubports-installer.desktop
- use-system-tools.patch)
+ disable-update-udev-prompts.patch
+ electrondist.patch)
sha256sums=('SKIP'
- 'cc9a95c9b07eedb6ca18de0c09119747f311d52740ec69d83d08c8bd20b84aad'
+ 'e3167aa1469a33d1eca4dae377ed51675bea08e61e6d17f94f83a241538be56b'
'7f59cb66ab7e59caeff93f697e47f26f43a9a221258f4d89dee580e41dd7a39a'
- '5b31be9612632f1a3beee3d38e97a23ee346ec814b580bfa41dad6e4f7ac4fb9')
+ '6d2be9f0d81fdd3ea6e95585457f967d9889c5884c1645b4212ea95add202f4e'
+ '768fcea52f63fed0bebb61861437db5f7e1f00358ad594c8d5593adc43a0f0c0')
pkgver() {
cd "$pkgname"
@@ -26,23 +28,16 @@ pkgver() {
prepare() {
cd "$pkgname"
- patch -Np1 <../use-system-tools.patch
- npm install --no-audit --no-progress --no-fund --ignore-scripts electron@"$(</usr/lib/electron/version)"
-
- # Removing local references
- for module in he sshpk; do
- local target="node_modules/${module}/package.json"
- jq 'del(.man)' "$target" >tmp.json
- mv tmp.json "$target"
+ for p in ../{disable-update-udev-prompts,electrondist}.patch; do
+ patch -Np1 <"$p"
done
+ npm install --no-audit --no-progress --no-fund --ignore-scripts electron@"$(</usr/lib/electron/version)"
+ npm run prerender
}
build() {
cd "$pkgname"
- npx electron-builder --linux --dir \
- -c buildconfig-generic.json \
- -c.electronDist=/usr/lib/electron \
- -c.electronVersion="$(</usr/lib/electron/version)"
+ node ./build.js -o linux -p dir -a x64
}
package() {
@@ -52,6 +47,9 @@ package() {
cd "${pkgname}"
install -Dm644 -t "${pkgdir}/usr/share/ubports-installer" dist/linux-unpacked/resources/app.asar
+ find ./dist/linux-unpacked/resources/app.asar.unpacked -type d \( -name linux -o -name mac \) -print -exec rm -r {} +
+ cp -rt "${pkgdir}/usr/share/ubports-installer" dist/linux-unpacked/resources/app.asar.unpacked
+
cd build/icons
for i in *x*.png; do
install -Dm644 "$i" "${pkgdir}/usr/share/icons/hicolor/${i%.png}/apps/ubports-installer.png"
diff --git a/disable-update-udev-prompts.patch b/disable-update-udev-prompts.patch
new file mode 100644
index 00000000000..f144d73c36c
--- /dev/null
+++ b/disable-update-udev-prompts.patch
@@ -0,0 +1,48 @@
+diff -ura package.orig/src/main.js package.new/src/main.js
+--- package.orig/src/main.js 2020-11-04 00:50:50.620740528 +0100
++++ package.new/src/main.js 2020-11-04 00:51:13.738986029 +0100
+@@ -95,7 +95,7 @@
+ },
+ udev: {
+ type: "boolean",
+- default: false
++ default: true
+ },
+ windowsDrivers: {
+ type: "boolean",
+@@ -547,22 +547,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
+- ? "?package=" + global.packageInfo.package
+- : "")
+- );
+- mainWindow.webContents.send("user:update-available");
+- })
+- .catch(() => {}); // Ignore errors, since this is non-essential
+- });
+-
+ mainWindow.loadURL(
+ url.format({
+ pathname: path.join(__dirname, "html/index.html"),
+diff -ura package.orig/src/pug/index.pug package.new/src/pug/index.pug
+--- package.orig/src/pug/index.pug 2020-11-04 00:50:50.622740549 +0100
++++ package.new/src/pug/index.pug 2020-11-04 00:51:23.690090642 +0100
+@@ -45,9 +45,7 @@
+ include modals/unlock
+ include modals/result
+ // high prio
+- include modals/udev
+ include modals/windows-drivers
+- include modals/new-update
+ // errors
+ include modals/low-power
+ include modals/connection-lost
diff --git a/electrondist.patch b/electrondist.patch
new file mode 100644
index 00000000000..6f948767749
--- /dev/null
+++ b/electrondist.patch
@@ -0,0 +1,11 @@
+diff -ura package.orig/build.js package.new/build.js
+--- package.orig/build.js 2020-11-04 00:15:31.378571293 +0100
++++ package.new/build.js 2020-11-04 00:28:01.100273854 +0100
+@@ -62,6 +62,7 @@
+ productName: "ubports-installer",
+ copyright: "Copyright © 2017-2020 UBports Foundation",
+ artifactName: "${name}_${version}_${os}_${arch}.${ext}",
++ electronDist: "/usr/lib/electron",
+ publish: [],
+ files: [
+ "src/**/*",
diff --git a/ubports-installer b/ubports-installer
index 52fd8e764e6..2ba963623de 100755
--- a/ubports-installer
+++ b/ubports-installer
@@ -1,2 +1,2 @@
#!/bin/sh
-exec electron /usr/share/ubports-installer/app.asar "$@"
+USE_SYSTEM_TOOLS=1 exec electron /usr/share/ubports-installer/app.asar "$@"
diff --git a/use-system-tools.patch b/use-system-tools.patch
deleted file mode 100644
index 8e8de8ea54b..00000000000
--- a/use-system-tools.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff -ura package.orig/src/utils.js package.new/src/utils.js
---- package.orig/src/utils.js 2019-11-03 17:23:57.937681039 +0100
-+++ package.new/src/utils.js 2019-11-03 17:31:22.048339885 +0100
-@@ -223,13 +223,7 @@
- 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()]);
-+let toolpath = ""
- let processes = [];
- function execTool(tool, args, callback) {
- let pid = exec(