summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Zhang2019-08-06 08:52:03 +0800
committerBruce Zhang2019-08-06 08:52:03 +0800
commit055ce1f5fb3d1cc7a49a2d6b41e051fda5100941 (patch)
treee0942787b4d489bb3b8d2e4b6ff4e3b17a7769bf
parent8ac5b7c3b8add3e0ddc8465bb2794af49cdb5cb0 (diff)
downloadaur-055ce1f5fb3d1cc7a49a2d6b41e051fda5100941.tar.gz
upgpkg: ubports-installer 0.2.5b-1
upstream release ubports-installer
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD52
-rw-r--r--rootless.patch27
-rw-r--r--ubports-installer.desktop8
-rw-r--r--ubports-installer.sh2
5 files changed, 36 insertions, 71 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fc7baed8596..111444562eb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,21 @@
pkgbase = ubports-installer
pkgdesc = A simple tool to install Ubuntu Touch on UBports devices
- pkgver = 0.2.2_beta
+ pkgver = 0.2.5b
pkgrel = 1
url = https://github.com/ubports/ubports-installer
- arch = any
+ arch = x86_64
+ arch = i686
license = GPL3
- makedepends = git
makedepends = jq
makedepends = npm
+ makedepends = moreutils
depends = android-tools
depends = android-udev
depends = electron
conflicts = ubports-installer-git
- source = https://github.com/ubports/ubports-installer/archive/0.2.2-beta.tar.gz
- source = ubports-installer.sh
- source = ubports-installer.desktop
- source = rootless.patch
- sha512sums = 2316633f620db34846dfda3c55774682a371d30ebe28360d882da69d18316e5f069d02ffa91cd88243337040ffbaacce2f1c83ab63a934154ebcfd8a418f5a83
- sha512sums = d622cfe1f01d1ef0fc89c6d05e655f0396133142a3244353cc43dbefb493ac0e896f4927e350cda5138b4b369975e5755552f5dfaef53dee209af5eb1d90f5f2
- sha512sums = 87d6760633d83b5d02abd3f54619fa1082a2f1a69be85ee010b2e552f6a926888c37aacb9b71d75b06d87311942dc219a3e51afd758cb2b9985a0bcb1d9a0455
- sha512sums = dcc4efbe608a518adbad074d741745a8d43da580bc2279f429fc3c458a496ec91eaa913c4d43d49979b3411326dbb4e551bec092fb07cfe96fab5f559588677a
+ conflicts = ubports-installer-bin
+ source = https://github.com/ubports/ubports-installer/archive/0.2.5-beta.tar.gz
+ sha512sums = SKIP
pkgname = ubports-installer
diff --git a/PKGBUILD b/PKGBUILD
index a7cba7cc3be..4cb4dca84f2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,54 +1,60 @@
# Contributor: Matthias Lisin <ml@visu.li>
# Maintainer: Bruce Zhang <zttt183525594@gmail.com>
pkgname=ubports-installer
-pkgver=0.2.2_beta
+pkgver=0.2.5b
+_ver=${pkgver/b/-beta}
pkgrel=1
pkgdesc='A simple tool to install Ubuntu Touch on UBports devices'
-arch=(any)
+arch=('x86_64' 'i686')
url='https://github.com/ubports/ubports-installer'
license=('GPL3')
depends=('android-tools' 'android-udev' 'electron')
-makedepends=('git' 'jq' 'npm')
-conflicts=('ubports-installer-git')
-source=("https://github.com/ubports/ubports-installer/archive/${pkgver/_/-}.tar.gz"
- ubports-installer.sh
- ubports-installer.desktop
- rootless.patch)
-sha512sums=('2316633f620db34846dfda3c55774682a371d30ebe28360d882da69d18316e5f069d02ffa91cd88243337040ffbaacce2f1c83ab63a934154ebcfd8a418f5a83'
- 'd622cfe1f01d1ef0fc89c6d05e655f0396133142a3244353cc43dbefb493ac0e896f4927e350cda5138b4b369975e5755552f5dfaef53dee209af5eb1d90f5f2'
- '87d6760633d83b5d02abd3f54619fa1082a2f1a69be85ee010b2e552f6a926888c37aacb9b71d75b06d87311942dc219a3e51afd758cb2b9985a0bcb1d9a0455'
- 'dcc4efbe608a518adbad074d741745a8d43da580bc2279f429fc3c458a496ec91eaa913c4d43d49979b3411326dbb4e551bec092fb07cfe96fab5f559588677a')
+makedepends=('jq' 'npm' 'moreutils')
+conflicts=('ubports-installer-git' 'ubports-installer-bin')
+source=("https://github.com/ubports/ubports-installer/archive/$_ver.tar.gz")
+sha512sums=('SKIP')
prepare() {
local cache="$srcdir/npm-cache"
local dist=/usr/lib/electron
- patch -p1 -d "$pkgname-${pkgver/_/-}" < rootless.patch
-
- cd "$pkgname-${pkgver/_/-}"
+ cd "$pkgname-$_ver"
jq '.electronDist = $dist | .electronVersion = $version' \
--arg dist "$dist" \
--arg version "$(sed s/^v// $dist/version)" \
- buildconfig-generic.json > new-buildconfig.json
- mv new-buildconfig.json buildconfig-generic.json
+ buildconfig-generic.json | sponge buildconfig-generic.json
- npm uninstall --no-audit --cache "$cache" electron{-packager,-sudo,-view-renderer} spectron
+ npm uninstall --no-audit --cache "$cache" electron{-packager,-view-renderer} spectron
}
build() {
- cd "$pkgname-${pkgver/_/-}"
+ cd "$pkgname-$_ver"
node build.js --package dir --os linux --no-platform-tools
}
package() {
- install -Dm644 ubports-installer.desktop "$pkgdir/usr/share/applications/ubports-installer.desktop"
- install -Dm755 ubports-installer.sh "$pkgdir/usr/bin/ubports-installer"
+ cd "$pkgname-$_ver"
+
+ echo "#!/usr/bin/env bash
+exec electron /usr/share/ubports-installer/app.asar -n \$@" > "$srcdir/ubports-installer.sh"
+ install -Dm755 "$srcdir/ubports-installer.sh" "$pkgdir/usr/bin/ubports-installer"
+
+ echo "[Desktop Entry]
+Name=ubports-installer
+Comment=UBports Installer: The easy way to install Ubuntu Touch on UBports devices. A friendly cross-platform Installer for Ubuntu Touch. Just connect a supported device to your PC, follow the on-screen instructions and watch this awesome tool do all the rest.
+Exec=ubports-installer %U
+Terminal=false
+Type=Application
+Icon=ubports-installer
+Categories=Utility" > "$srcdir/ubports-installer.desktop"
+
+ install -Dm644 "$srcdir/ubports-installer.desktop" "$pkgdir/usr/share/applications/ubports-installer.desktop"
- cd "$srcdir/$pkgname-${pkgver/_/-}/build/icons"
+ cd "$srcdir/$pkgname-$_ver/build/icons"
for i in *x*.png; do
install -Dm644 "$i" "$pkgdir/usr/share/icons/hicolor/${i%.png}/apps/ubports-installer.png"
done
- cd "$srcdir/$pkgname-${pkgver/_/-}/dist/linux-unpacked/resources"
+ cd "$srcdir/$pkgname-$_ver/dist/linux-unpacked/resources"
install -Dm644 app.asar "$pkgdir/usr/share/ubports-installer/app.asar"
}
diff --git a/rootless.patch b/rootless.patch
deleted file mode 100644
index b6cc60a9166..00000000000
--- a/rootless.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -ura package.orig/src/utils.js package.new/src/utils.js
---- package.orig/src/utils.js 2019-03-15 18:59:19.000000000 +0800
-+++ package.new/src/utils.js 2019-03-20 14:42:19.202514790 +0800
-@@ -16,7 +16,6 @@
- const tmp = require('tmp');
- const exec = require('child_process').exec;
- const cp = require('child_process');
--const sudo = require('electron-sudo');
- const winston = require('winston');
- const getos = require('getos');
- const commandExistsSync = require('command-exists').sync;
-@@ -375,14 +374,7 @@
- }
-
- var needRoot = () => {
-- if (
-- (os.platform() === "win32") ||
-- isSnap() ||
-- !commandExistsSync("sudo") ||
-- global.installProperties.noRoot ||
-- global.installProperties.simulate
-- ) return false;
-- else return !process.env.SUDO_UID
-+ return false
- }
-
- var ensureRoot = (m) => {
diff --git a/ubports-installer.desktop b/ubports-installer.desktop
deleted file mode 100644
index b5e2f7ce0a2..00000000000
--- a/ubports-installer.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=ubports-installer
-Comment=UBports Installer: The easy way to install Ubuntu Touch on UBports devices. A friendly cross-platform Installer for Ubuntu Touch. Just connect a supported device to your PC, follow the on-screen instructions and watch this awesome tool do all the rest.
-Exec=ubports-installer
-Terminal=false
-Type=Application
-Icon=ubports-installer
-Categories=Utility \ No newline at end of file
diff --git a/ubports-installer.sh b/ubports-installer.sh
deleted file mode 100644
index 2b5906b0fd3..00000000000
--- a/ubports-installer.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec electron /usr/share/ubports-installer/app.asar