summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD30
-rw-r--r--ipfs-desktop.desktop9
-rw-r--r--ipfs-desktop.install18
-rw-r--r--ipfs-desktop.sh2
5 files changed, 33 insertions, 34 deletions
diff --git a/.SRCINFO b/.SRCINFO
index de57f96307d9..4f466018da6d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,16 @@
pkgbase = ipfs-desktop
pkgdesc = Desktop client for the InterPlanetary File System
pkgver = 0.9.5
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/ipfs-shipyard/ipfs-desktop
+ install = ipfs-desktop.install
arch = x86_64
license = MIT
makedepends = nodejs
makedepends = npm
makedepends = node-gyp
- depends = electron
source = https://github.com/ipfs-shipyard/ipfs-desktop/archive/v0.9.5.tar.gz
- source = ipfs-desktop.sh
- source = ipfs-desktop.desktop
sha256sums = 1c0e1ea67e22228c46f1738665e21339aa4c105109773107817913234b7291a2
- sha256sums = SKIP
- sha256sums = SKIP
pkgname = ipfs-desktop
diff --git a/PKGBUILD b/PKGBUILD
index 80366f269f94..90e68e7877ad 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,40 +1,36 @@
# Maintainer: Alex Henrie <alexhenrie24@gmail.com>
pkgname=ipfs-desktop
pkgver=0.9.5
-pkgrel=1
+pkgrel=2
pkgdesc="Desktop client for the InterPlanetary File System"
arch=(x86_64)
url="https://github.com/ipfs-shipyard/$pkgname"
license=(MIT)
-depends=(electron)
makedepends=(nodejs npm node-gyp)
-source=("https://github.com/ipfs-shipyard/$pkgname/archive/v$pkgver.tar.gz"
- "$pkgname.sh"
- "$pkgname.desktop")
-sha256sums=(1c0e1ea67e22228c46f1738665e21339aa4c105109773107817913234b7291a2
- SKIP
- SKIP)
+install=$pkgname.install
+source=("https://github.com/ipfs-shipyard/$pkgname/archive/v$pkgver.tar.gz")
+sha256sums=(1c0e1ea67e22228c46f1738665e21339aa4c105109773107817913234b7291a2)
prepare() {
cd "$pkgname-$pkgver"
- sed -i '/setupAutoUpdater/d' src/index.js #disable automatic updates
+ # For the "Launch on startup" feature to work, the program must be installed
+ # to a path that does not contain spaces
+ sed -i 's/"productName": "IPFS Desktop"/"productName": "IPFS-Desktop"/' package.json
}
build() {
cd "$pkgname-$pkgver"
npm install
npm run-script build:babel
+ npx electron-builder build --linux pacman -c.linux.icon=ipfs-desktop -c.linux.category='Network;FileTransfer;P2P' -c.linux.desktop.Name='IPFS Desktop'
}
package() {
- install -Dm755 "$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
- install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
cd "$pkgname-$pkgver"
- install -Dm644 package.json "$pkgdir/usr/lib/$pkgname/package.json"
+ tar -xf dist/$pkgname-$pkgver-linux-x64.pacman -C "$pkgdir"
+ mv "$pkgdir/.INSTALL" "../$pkgname.install"
+ rm "$pkgdir/.MTREE" "$pkgdir/.PKGINFO"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- cp -r node_modules assets out "$pkgdir/usr/lib/$pkgname"
- mkdir -p "$pkgdir/usr/share/icons/hicolor/scalable/apps"
- mkdir -p "$pkgdir/usr/share/icons/hicolor/22x22/apps"
- ln -s "/usr/lib/$pkgname/assets/icons/ipfs-logo-on.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/ipfs.svg"
- ln -s "/usr/lib/$pkgname/assets/icons/tray/ice.png" "$pkgdir/usr/share/icons/hicolor/22x22/apps/ipfs.png"
+ mv "$pkgdir/opt/IPFS-Desktop/LICENSE.electron.txt" "$pkgdir/usr/share/licenses/$pkgname"
+ mv "$pkgdir/opt/IPFS-Desktop/LICENSES.chromium.html" "$pkgdir/usr/share/licenses/$pkgname"
}
diff --git a/ipfs-desktop.desktop b/ipfs-desktop.desktop
deleted file mode 100644
index 03f2dee11be5..000000000000
--- a/ipfs-desktop.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Name=IPFS Desktop
-Comment=Desktop client for the InterPlanetary File System
-Exec="/usr/bin/ipfs-desktop"
-Terminal=false
-Type=Application
-Icon=ipfs
-StartupWMClass="IPFS"
-Categories=Network;FileTransfer;P2P
diff --git a/ipfs-desktop.install b/ipfs-desktop.install
new file mode 100644
index 000000000000..5e156eb24eac
--- /dev/null
+++ b/ipfs-desktop.install
@@ -0,0 +1,18 @@
+post_install() {
+ :
+#!/bin/bash
+
+# Link to the binary
+ln -sf '/opt/IPFS Desktop/ipfs-desktop' '/usr/bin/ipfs-desktop'
+
+update-mime-database /usr/share/mime || true
+update-desktop-database /usr/share/applications || true
+}
+post_remove() {
+ :
+#!/bin/bash
+
+# Delete the link to the binary
+rm -f '/usr/bin/ipfs-desktop'
+
+}
diff --git a/ipfs-desktop.sh b/ipfs-desktop.sh
deleted file mode 100644
index 1707709a72a1..000000000000
--- a/ipfs-desktop.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-electron /usr/lib/ipfs-desktop/ $@