summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannick Hemelhof2017-04-05 14:41:25 +0200
committerJannick Hemelhof2017-04-05 14:41:25 +0200
commitfb7680148e6efcb8357f540bf72c398abd18c320 (patch)
treef254a1ba1896e22a84ffbeefdbe67e69875f9e2c
parent3ea06a643efbbc9a7f841436faccd5e830a960db (diff)
downloadaur-fb7680148e6efcb8357f540bf72c398abd18c320.tar.gz
Redesign of PKGBUILD
-rw-r--r--PKGBUILD42
-rw-r--r--boostnote.desktop10
-rw-r--r--boostnote.sh3
-rw-r--r--npm-prune-fix.patch13
4 files changed, 64 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a5dd992854f3..e29118661715 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,19 +2,53 @@
# Contributor: Dick Choi <fluke8259@gmail.com>
# Contributor: Romain Bazile <gromain.baz@gmail.com>
pkgname=boostnote
+_pkgname=Boostnote
pkgver=0.8.7
pkgrel=1
pkgdesc="Open source note-taking app for programmers"
arch=('x86_64')
url="https://b00st.io/"
license=('GPL')
+depends=(electron)
+makedepends=(npm grunt-cli asar)
-source=("https://github.com/BoostIO/boost-releases/releases/download/v$pkgver/boostnote_${pkgver}_amd64.deb")
+source=(
+ "${pkgver}.tar.gz::https://github.com/BoostIO/"${_pkgname}"/archive/v"$pkgver".tar.gz"
+ "${pkgname}.sh"
+ "${pkgname}.desktop"
+ "npm-prune-fix.patch"
+ )
-md5sums=('732f6631a49005676b6a5d348336a3f0')
+md5sums=(
+ '217d8b343b2215679a212b1a44f21ca7'
+ 'a4bbf961790883a47e3fef257ba35b98'
+ '8547065c63f31831a249ccc1225197e2'
+ '5de458c318306de81a9f72bcbfddaa69'
+ )
+
+prepare() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+
+ patch -Np1 -i "${srcdir}"/npm-prune-fix.patch
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ npm install
+ grunt compile
+ npm prune --production
+ asar pack . ../${pkgname}.asar
+ cp resources/app.png ../app.png
+}
package() {
- tar -xa -f ${srcdir}/data.tar.xz
- cp -r "${srcdir}/usr" "${pkgdir}/usr"
+ cd $srcdir
+
+ install -Dm644 ${pkgname}.asar $pkgdir/opt/${pkgname}/${pkgname}.asar
+
+ install -Dm755 ${pkgname}.sh $pkgdir/usr/bin/${pkgname}
+
+ install -Dm644 app.png "$pkgdir"/usr/share/pixmaps/${pkgname}.png
+ install -Dm644 ${pkgname}.desktop "$pkgdir"/usr/share/applications/${pkgname}.desktop
}
diff --git a/boostnote.desktop b/boostnote.desktop
new file mode 100644
index 000000000000..c95f979f6760
--- /dev/null
+++ b/boostnote.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Boostnote
+GenericName=Boostnote is an open source note-taking app made for progammers just like you.
+Comment=Boostnote is an open source note-taking app made for progammers just like you.
+Exec=/usr/bin/boostnote %U
+Icon=boostnote
+Type=Application
+StartupNotify=true
+Categories=Development;Utility;
+MimeType=text/plain; \ No newline at end of file
diff --git a/boostnote.sh b/boostnote.sh
new file mode 100644
index 000000000000..6bda78c18630
--- /dev/null
+++ b/boostnote.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /opt/boostnote
+NODE_ENV=production electron boostnote.asar "$@" \ No newline at end of file
diff --git a/npm-prune-fix.patch b/npm-prune-fix.patch
new file mode 100644
index 000000000000..ebfcbe550f62
--- /dev/null
+++ b/npm-prune-fix.patch
@@ -0,0 +1,13 @@
+--- Boostnote-0.8.7/package.json 2017-03-20 08:11:24.000000000 +0100
++++ Boostnote-0.8.7/package.new.json 2017-04-05 14:12:17.848998504 +0200
+@@ -99,10 +99,8 @@
+ "jsdom": "^9.4.2",
+ "merge-stream": "^1.0.0",
+ "nib": "^1.1.0",
+- "react": "^15.3.0",
+ "react-color": "^2.2.2",
+ "react-css-modules": "^3.7.6",
+- "react-dom": "^15.3.0",
+ "react-input-autosize": "^1.1.0",
+ "react-router": "^2.4.0",
+ "react-router-redux": "^4.0.4",