summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Peter Koenig2019-04-24 17:15:39 +0300
committerJan Peter Koenig2019-04-24 17:15:39 +0300
commitd8428ae5484fcd4eaf52c1b45c68603d9f4a5981 (patch)
tree83fafca2fc8f6afac9348ed99c3240f9afaa06c2
parent1cd32bb2436a0af3545e6526d922e8a6e71990c9 (diff)
downloadaur-d8428ae5484fcd4eaf52c1b45c68603d9f4a5981.tar.gz
simplified package to comply with arch linux electron package guideline
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD52
-rw-r--r--tusk3
4 files changed, 35 insertions, 30 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5b0aba0fd101..de46436b110e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = tusk
pkgdesc = Refined Evernote desktop app
pkgver = 0.22.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/klaussinani/tusk
arch = x86_64
license = MIT
@@ -11,9 +11,11 @@ pkgbase = tusk
source = tusk-0.22.0.tar.gz::https://github.com/klaussinani/tusk/archive/v0.22.0.tar.gz
source = tusk.desktop
source = tusk.png
+ source = tusk
sha256sums = 9e45f45d208e2aa1404500c6b0104a43cd402c21e1000f83a42dc2e22b738f01
sha256sums = b72cfcd35a727cb982f82d9f97f9e4330e81fbc70af47d1bc7f5baa7837a29f3
sha256sums = 2e8e1f13a86bd4a8fdbd2a4a69cde6b09e035b31352ad60f5a81d61a7abfe5bf
+ sha256sums = b4e388ee237f137e94ac3fac317007e0ba79bddc2b4406b9760ebbcc62b9224d
pkgname = tusk
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f2c7b6b97b3c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*.log
+*.tar.xz
+*.tar.gz
+src/
+pkg/
+
diff --git a/PKGBUILD b/PKGBUILD
index 92660867ffc3..f50830ceb9cb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=tusk
pkgver=0.22.0
-pkgrel=1
+pkgrel=2
pkgdesc="Refined Evernote desktop app"
arch=('x86_64')
url="https://github.com/klaussinani/tusk"
@@ -15,41 +15,35 @@ makedepends=('npm')
depends=('xdg-utils' 'electron')
source=(
- "$pkgname-$pkgver.tar.gz::https://github.com/klaussinani/tusk/archive/v${pkgver}.tar.gz"
- "$pkgname.desktop"
- "$pkgname.png"
+ "${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
+ "${pkgname}.desktop"
+ "${pkgname}.png"
+ "${pkgname}"
)
sha256sums=(
- '9e45f45d208e2aa1404500c6b0104a43cd402c21e1000f83a42dc2e22b738f01'
- 'b72cfcd35a727cb982f82d9f97f9e4330e81fbc70af47d1bc7f5baa7837a29f3'
- '2e8e1f13a86bd4a8fdbd2a4a69cde6b09e035b31352ad60f5a81d61a7abfe5bf'
+ '9e45f45d208e2aa1404500c6b0104a43cd402c21e1000f83a42dc2e22b738f01'
+ 'b72cfcd35a727cb982f82d9f97f9e4330e81fbc70af47d1bc7f5baa7837a29f3'
+ '2e8e1f13a86bd4a8fdbd2a4a69cde6b09e035b31352ad60f5a81d61a7abfe5bf'
+ 'b4e388ee237f137e94ac3fac317007e0ba79bddc2b4406b9760ebbcc62b9224d'
)
build() {
- cd $srcdir/$pkgname-$pkgver
- npm install --cache "${srcdir}/npm-cache"
- node ./node_modules/electron-builder/out/cli/cli.js build -l dir --x64
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ npm install --cache "${srcdir}/npm-cache"
+ node ./node_modules/electron-builder/out/cli/cli.js build -l dir --x64
}
package() {
- cd "$srcdir/$pkgname-${pkgver}/dist/linux-unpacked"
- install -Dm644 -t "${pkgdir}/usr/lib/${pkgname}" ./*.pak ./*.dat ./*.bin
- install -Dm644 -t "${pkgdir}/usr/lib/${pkgname}/locales" ./locales/*
- install -Dm644 -t "${pkgdir}/usr/lib/${pkgname}/resources" ./resources/*
- install -Dm755 -t "${pkgdir}/usr/lib/${pkgname}" ./libffmpeg.so
- install -Dm755 -t "${pkgdir}/usr/lib/${pkgname}" ./${pkgname}
-
- # electron is required for several libs, so we use the libnode.so provided by electron itself
- ln -sf "/usr/lib/electron/libnode.so" "${pkgdir}/usr/lib/${pkgname}/libnode.so"
- install -dm755 "${pkgdir}/usr/bin"
- ln -sf "/usr/lib/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
-
- # licenses
- cd "${srcdir}/$pkgname-${pkgver}"
- install -Dm644 "./license.md" "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
- cd "$srcdir/$pkgname-${pkgver}/dist/linux-unpacked"
- install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ./LICENSE*
- install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
- install -Dm644 "${srcdir}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+
+ # licenses
+ cd "${srcdir}/$pkgname-${pkgver}"
+ install -Dm644 "./license.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ cd "$srcdir/$pkgname-${pkgver}/dist/linux-unpacked"
+ install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "${srcdir}/${pkgname}-${pkgver}/dist/linux-unpacked/LICENSE"*
+
+ install -Dm644 "${srcdir}/${pkgname}-${pkgver}/dist/linux-unpacked/resources/app.asar" "${pkgdir}/usr/lib/${pkgname}/${pkgname}.asar"
+ install -Dm755 "${srcdir}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ install -Dm644 "${srcdir}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
}
diff --git a/tusk b/tusk
new file mode 100644
index 000000000000..ce3266d54df3
--- /dev/null
+++ b/tusk
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exec electron /usr/lib/tusk/tusk.asar "$@"