summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gentilucci2019-04-18 11:55:44 -0600
committerAlex Gentilucci2019-04-18 11:55:44 -0600
commit60c8267278f85b6c13f5599d2d312e7bc392a1e5 (patch)
tree4ece0e2ddeb72ba6b0aa4e84e069d05f92b22ed2
parenta25040accb2afb7a47e6448ffccbe925b634d5a6 (diff)
downloadaur-60c8267278f85b6c13f5599d2d312e7bc392a1e5.tar.gz
Fixed socket.io error and updated maintainer in PKGBUILD
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD27
-rw-r--r--pin-socket-io-version-at-0.9.patch10
3 files changed, 34 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fc5ecd37584..105326e4fc2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = vim-instant-markdown
pkgdesc = Instant Markdown previews from vim in a browser
pkgver = 0.1.0
- pkgrel = 3
+ pkgrel = 5
url = https://github.com/suan/vim-instant-markdown#readme
install = install.sh
arch = any
@@ -9,13 +9,15 @@ pkgbase = vim-instant-markdown
depends = nodejs
depends = npm
depends = wget
- depends = vim
optdepends = neovim: neovim support
+ optdepends = vim: vim support
noextract = instant-markdown-d-0.1.0.tgz
source = http://registry.npmjs.org/instant-markdown-d/-/instant-markdown-d-0.1.0.tgz
source = https://raw.githubusercontent.com/suan/vim-instant-markdown/master/after/ftplugin/markdown/instant-markdown.vim
+ source = pin-socket-io-version-at-0.9.patch
sha256sums = 457cda23129183b01a97e96de9e598680fa0cee6c7c9a40db0f830cd7031fa81
sha256sums = 2dc1f0e3af2e9641b554f7ed1d32457918542e95f601d552202b362b1779c2d0
+ sha256sums = fa1b8c4eb75f80803e3adb027d53616d027c5ee1b45920ff592b08ebcf225dda
pkgname = vim-instant-markdown
diff --git a/PKGBUILD b/PKGBUILD
index b1a1485a27d..b0140a57880 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,23 @@
-# Maintainer: Tmplt <tmplt[at]dragons[dot]rocks>
+# Maintainer: Alex Gentilucci <alexander.gentilucci@gmail.com>
_npmname=instant-markdown-d
_npmver=0.1.0
pkgname=vim-instant-markdown
pkgver=0.1.0
-pkgrel=4
+pkgrel=5
pkgdesc="Instant Markdown previews from vim in a browser"
arch=(any)
license=(unknown)
url="https://github.com/suan/vim-instant-markdown#readme"
depends=('nodejs' 'npm' 'wget')
optdepends=('neovim: neovim support' 'vim: vim support')
-source=(http://registry.npmjs.org/$_npmname/-/$_npmname-$_npmver.tgz
- https://raw.githubusercontent.com/suan/vim-instant-markdown/master/after/ftplugin/markdown/instant-markdown.vim)
+source=("http://registry.npmjs.org/$_npmname/-/$_npmname-$_npmver.tgz"
+ "https://raw.githubusercontent.com/suan/vim-instant-markdown/master/after/ftplugin/markdown/instant-markdown.vim"
+ "pin-socket-io-version-at-0.9.patch")
noextract=($_npmname-$_npmver.tgz)
sha256sums=('457cda23129183b01a97e96de9e598680fa0cee6c7c9a40db0f830cd7031fa81'
- '2dc1f0e3af2e9641b554f7ed1d32457918542e95f601d552202b362b1779c2d0')
+ '2dc1f0e3af2e9641b554f7ed1d32457918542e95f601d552202b362b1779c2d0'
+ 'fa1b8c4eb75f80803e3adb027d53616d027c5ee1b45920ff592b08ebcf225dda')
install=install.sh
package() {
@@ -23,8 +25,19 @@ package() {
mkdir -p "$pkgdir/usr/share/vim/vimfiles/autoload/"
mkdir -p "$pkgdir/usr/share/vim/vimfiles/after/ftplugin/markdown"
- cd "$pkgdir/usr/lib/node_modules/"
- npm install -g --prefix "$pkgdir/usr" $_npmname@$_npmver
+ cd "$srcdir"
+ tar --extract --file "$_npmname-$_npmver.tgz"
+ patch "package/package.json" "pin-socket-io-version-at-0.9.patch"
+ tar --create --file "$_npmname-$_npmver-patched.tar" package/
+
+ npm install \
+ --global \
+ --no-save \
+ --production \
+ --user root \
+ --cache "$srcdir/npm-cache" \
+ --prefix "$pkgdir/usr" \
+ "$_npmname-$_npmver-patched.tar"
cp "$srcdir/instant-markdown.vim" "$pkgdir/usr/share/vim/vimfiles/after/ftplugin/markdown"
}
diff --git a/pin-socket-io-version-at-0.9.patch b/pin-socket-io-version-at-0.9.patch
new file mode 100644
index 00000000000..c041ca5e8e8
--- /dev/null
+++ b/pin-socket-io-version-at-0.9.patch
@@ -0,0 +1,10 @@
+--- package.json 2015-01-18 04:14:05.000000000 +0100
++++ package.json 2019-03-24 20:27:57.818719661 +0100
+@@ -13,6 +13,6 @@
+ "highlight.js": "^8.4.0",
+ "markdown-it": "^3.0.3",
+ "send": "~0.1.0",
+- "socket.io": ""
++ "socket.io": "~0.9"
+ }
+ }