summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannick Hemelhof2017-04-06 09:22:16 +0200
committerJannick Hemelhof2017-04-06 09:22:16 +0200
commit93c27c2a5ae6fdb6e0092b31c531fdeab876bbb9 (patch)
treefdbfb145cfe32cf83acb0e2014adf5c5991a2cab
parent3ea06a643efbbc9a7f841436faccd5e830a960db (diff)
parent35d4b7510b31506222494b3099e5a81928ef11e4 (diff)
downloadaur-93c27c2a5ae6fdb6e0092b31c531fdeab876bbb9.tar.gz
Merge branch 'cleanerBuild'
Redesign of the way this package is build, release v0.8.7-2
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD74
-rw-r--r--boostnote.desktop10
-rw-r--r--boostnote.js29
-rw-r--r--npm-prune-fix.patch13
5 files changed, 130 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bd36410c2b57..3e1ce6677e7b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,21 @@
pkgbase = boostnote
pkgdesc = Open source note-taking app for programmers
pkgver = 0.8.7
- pkgrel = 1
- url = https://b00st.io/
- arch = x86_64
- license = GPL
- source = https://github.com/BoostIO/boost-releases/releases/download/v0.8.7/boostnote_0.8.7_amd64.deb
- md5sums = 732f6631a49005676b6a5d348336a3f0
+ pkgrel = 2
+ url = https://boostnote.io/
+ arch = any
+ license = GPL3
+ makedepends = npm
+ makedepends = grunt-cli
+ depends = electron
+ source = 0.8.7.tar.gz::https://github.com/BoostIO/Boostnote/archive/v0.8.7.tar.gz
+ source = boostnote.js
+ source = boostnote.desktop
+ source = npm-prune-fix.patch
+ sha512sums = 400bcd5f2a2fa3c858c4e5ab8ce22c8f9669a5c1c0299724937f56534248e0517c8a814b7c2f2243c8492edbb50e96b2a2a2ce787f6566cbfec1741521d5261c
+ sha512sums = f0abbdcca34d7f74d3dc66ffc2d0995416e7708c715d55fa58c4c2abc31d191ea42f3434e3105292b4817f83ac0ca89f456f5f93007ae80ab2426c8941f615f9
+ sha512sums = 18bcda13580da8ceeaa86793a77ec00a053b8fd51451dad7e2b1a19553fe1a467ac647b44b789212e783f3f6a80968cc9404e884ef7ff6b1f6588473b3229d40
+ sha512sums = c500237c18fc1fcd98f3fd6d1b0bd74764e6f53a87c258b4d68b6d4754ad2281317b89e411aaf5af4d2c9f837f67218cd3663e27fc77da5137b217724f91039c
pkgname = boostnote
diff --git a/PKGBUILD b/PKGBUILD
index a5dd992854f3..b6ed20eec260 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,72 @@
-# Maintainer: Jannick Hemelhof <mister.jannick@gmail.com>
-# Contributor: Dick Choi <fluke8259@gmail.com>
-# Contributor: Romain Bazile <gromain.baz@gmail.com>
+# Maintainer: Jannick Hemelhof <mister {dot} jannick {at} gmail {dot} com>
+# Contributor: NicoHood <aur {at} nicohood {dot} de>
+# Contributor: Dick Choi <fluke8259 {at} gmail {dot} com>
+# Contributor: Romain Bazile <gromain {dot} baz {at} gmail {dot} com>
pkgname=boostnote
+_pkgname=Boostnote
pkgver=0.8.7
-pkgrel=1
+pkgrel=2
pkgdesc="Open source note-taking app for programmers"
-arch=('x86_64')
-url="https://b00st.io/"
-license=('GPL')
+arch=('any')
+url="https://boostnote.io/"
+license=('GPL3')
+depends=('electron')
+makedepends=('npm' 'grunt-cli')
-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}.js"
+ "${pkgname}.desktop"
+ "npm-prune-fix.patch"
+ )
-md5sums=('732f6631a49005676b6a5d348336a3f0')
+sha512sums=(
+ '400bcd5f2a2fa3c858c4e5ab8ce22c8f9669a5c1c0299724937f56534248e0517c8a814b7c2f2243c8492edbb50e96b2a2a2ce787f6566cbfec1741521d5261c'
+ 'f0abbdcca34d7f74d3dc66ffc2d0995416e7708c715d55fa58c4c2abc31d191ea42f3434e3105292b4817f83ac0ca89f456f5f93007ae80ab2426c8941f615f9'
+ '18bcda13580da8ceeaa86793a77ec00a053b8fd51451dad7e2b1a19553fe1a467ac647b44b789212e783f3f6a80968cc9404e884ef7ff6b1f6588473b3229d40'
+ 'c500237c18fc1fcd98f3fd6d1b0bd74764e6f53a87c258b4d68b6d4754ad2281317b89e411aaf5af4d2c9f837f67218cd3663e27fc77da5137b217724f91039c'
+ )
+
+prepare() {
+ cd "${_pkgname}-${pkgver}"
+
+ patch -Np1 -i "${srcdir}/npm-prune-fix.patch"
+}
+
+build() {
+ cd "${_pkgname}-${pkgver}"
+ npm install
+ grunt compile
+ npm prune --production
+ cp resources/app.png ../app.png
+}
package() {
- tar -xa -f ${srcdir}/data.tar.xz
- cp -r "${srcdir}/usr" "${pkgdir}/usr"
+ cd "${_pkgname}-${pkgver}"
+
+ appdir="/usr/lib/${pkgname}"
+
+ install -dm755 "${pkgdir}""${appdir}"
+ cp -r * "${pkgdir}""${appdir}"
+
+ install -Dm755 "${srcdir}/${pkgname}.js" "$pkgdir/usr/bin/${pkgname}"
+
+ install -Dm644 "${srcdir}/app.png" "$pkgdir/usr/share/pixmaps/${pkgname}.png"
+ install -Dm644 "${srcdir}/${pkgname}.desktop" "$pkgdir/usr/share/applications/${pkgname}.desktop"
+
+ find "${pkgdir}""${appdir}" \
+ -name "package.json" \
+ -exec sed -e "s|${srcdir}/${pkgname}-${pkgver}|${appdir}|" \
+ -i {} \; \
+ -or -name ".*" -prune -exec rm -r '{}' \; \
+ -or -name "Gruntfile.js" -exec rm '{}' \; \
+ -or -name "Makefile" -exec rm '{}' \; \
+ -or -name "bower.json" -exec rm '{}' \; \
+ -or -name "cmd.js" -exec rm '{}' \; \
+ -or -name "coffee" -prune -exec rm -r '{}' \; \
+ -or -name "example" -prune -exec rm -r '{}' \; \
+ -or -name "gulpfile.js" -exec rm '{}' \; \
+ -or -name "test" -prune -exec rm -r '{}' \; \
+ -or -name "tests" -prune -exec rm -r '{}' \;
}
diff --git a/boostnote.desktop b/boostnote.desktop
new file mode 100644
index 000000000000..5dd350c24029
--- /dev/null
+++ b/boostnote.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Boostnote
+GenericName=Boostnote is an open source note-taking app made for programmers just like you.
+Comment=Boostnote is an open source note-taking app made for programmers 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.js b/boostnote.js
new file mode 100644
index 000000000000..4550e8a8b191
--- /dev/null
+++ b/boostnote.js
@@ -0,0 +1,29 @@
+#!/usr/bin/electron
+
+const name = 'boostnote';
+
+const {app} = require('electron');
+const fs = require('fs');
+const path = require('path');
+
+// Change command name.
+const fd = fs.openSync('/proc/self/comm', fs.constants.O_WRONLY);
+fs.writeSync(fd, name);
+fs.closeSync(fd);
+
+// Remove first command line argument (/usr/bin/electron).
+process.argv.splice(0, 1);
+
+// Set application paths.
+const appPath = path.join(path.dirname(__dirname), 'lib', name);
+const packageJson = require(path.join(appPath, 'package.json'));
+const productName = 'Boostnote';
+app.setAppPath(appPath);
+app.setDesktopName(name + '.desktop');
+app.setName(productName);
+app.setPath('userCache', path.join(app.getPath('cache'), productName));
+app.setPath('userData', path.join(app.getPath('appData'), productName));
+app.setVersion(packageJson.version);
+
+// Run the application.
+require('module')._load(appPath, module, true); \ 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",