summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorM0Rf302015-06-17 16:32:15 +0200
committerM0Rf302015-06-17 16:32:15 +0200
commite19b2434b788f0038b5615b9c91057a7e6c02eec (patch)
treebe2a572e15633dbab6d2586a5bb6a0f36f62d3fb
downloadaur-e19b2434b788f0038b5615b9c91057a7e6c02eec.tar.gz
Initial import
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD44
-rw-r--r--stackedit.desktop9
-rw-r--r--stackedit.install26
-rw-r--r--stackedit.service11
-rw-r--r--stackedit.sh3
6 files changed, 117 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a08d8cf80cde
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = stackedit
+ pkgdesc = In-browser markdown editor
+ pkgver = 4.3.11
+ pkgrel = 1
+ url = https://stackedit.io/
+ install = stackedit.install
+ arch = any
+ license = APACHE
+ depends = nodejs
+ depends = nodejs-gulp
+ depends = nodejs-bower
+ depends = chromium
+ options = !strip
+ source = https://github.com/benweet/stackedit/archive/v4.3.11.tar.gz
+ source = stackedit.sh
+ source = stackedit.desktop
+ source = stackedit.service
+ md5sums = e429d3430eae9e25d82b1f21ac0143dc
+ md5sums = fa3e94acf51ce70ddae6f80f9704c9ef
+ md5sums = 6453098c6abf5c3fdc6e7d455a4e927b
+ md5sums = 7d2e961d8f66b25830f7e43b51155a82
+
+pkgname = stackedit
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..286757e63d2d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: M0Rf30
+
+pkgname=stackedit
+pkgver=4.3.11
+pkgrel=1
+pkgdesc='In-browser markdown editor'
+arch=('any')
+url='https://stackedit.io/'
+license=('APACHE')
+depends=('nodejs' 'nodejs-gulp' 'nodejs-bower' 'chromium')
+options=(!strip)
+source=("https://github.com/benweet/$pkgname/archive/v${pkgver}.tar.gz"
+ $pkgname.sh
+ $pkgname.desktop
+ $pkgname.service)
+
+install=$pkgname.install
+pkgext='.pkg.tar'
+
+build(){
+ cd $pkgname-$pkgver
+ npm install
+ bower install
+ gulp
+}
+
+package() {
+ cd $pkgname-$pkgver
+ #Create folder for user $pkgname
+ install -dm755 $pkgdir/var/lib/$pkgname
+ cp -r * $pkgdir/var/lib/$pkgname/
+
+ install -vDm755 $srcdir/$pkgname.sh $pkgdir/usr/bin/$pkgname
+ install -vDm644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
+ install -vDm644 chrome-app/logo-128.png $pkgdir/usr/share/pixmaps/$pkgname.png
+
+ #Create systemd service
+ install -Dm644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system/$pkgname.service
+}
+
+md5sums=('e429d3430eae9e25d82b1f21ac0143dc'
+ 'fa3e94acf51ce70ddae6f80f9704c9ef'
+ '6453098c6abf5c3fdc6e7d455a4e927b'
+ '7d2e961d8f66b25830f7e43b51155a82')
diff --git a/stackedit.desktop b/stackedit.desktop
new file mode 100644
index 000000000000..d3301795e7b3
--- /dev/null
+++ b/stackedit.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+GenericName=Stackedit Markdown Editor
+Name=Stackedit
+Description=In-browser markdown editor
+Type=Application
+Categories=Development;
+Exec=/usr/bin/stackedit
+Icon=stackedit
+MimeType=text/x-markdown; charset=UTF-8;
diff --git a/stackedit.install b/stackedit.install
new file mode 100644
index 000000000000..a04a7a0bdaf9
--- /dev/null
+++ b/stackedit.install
@@ -0,0 +1,26 @@
+usr=stackedit
+home=/var/lib/stackedit
+
+_chown() {
+ chown -R $usr:$usr $home
+}
+
+## arg 1: the new package version
+post_install() {
+ getent passwd $usr &> /dev/null || useradd -r -d $home -s /bin/bash $usr
+ _chown
+
+}
+
+post_upgrade() {
+ _chown
+}
+
+## arg 1: the old package version
+post_remove() {
+ rm -r $home
+ return 0
+}
+
+# vim:set ts=2 sw=2 et:
+
diff --git a/stackedit.service b/stackedit.service
new file mode 100644
index 000000000000..b6cc8c8928d9
--- /dev/null
+++ b/stackedit.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Stackedit in-browser markdown editor
+
+[Service]
+Type=forking
+User=stackedit
+WorkingDirectory=/var/lib/stackedit/
+ExecStart=/usr/bin/node /var/lib/stackedit/server.js
+
+[Install]
+WantedBy=multi-user.target
diff --git a/stackedit.sh b/stackedit.sh
new file mode 100644
index 000000000000..b91eff5b68de
--- /dev/null
+++ b/stackedit.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+node /var/lib/stackedit/server.js &
+chromium --app=http://127.0.0.1:3000