summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorPhotonQuantum2019-06-02 02:21:48 +0800
committerPhotonQuantum2019-06-02 02:21:48 +0800
commit581f5e41b8557b0906b7e037d14057a58585aca6 (patch)
treefa13c6f161c36c01f5c5b4144e7a8ae22ee438ae /PKGBUILD
downloadaur-nodejs-lint-md.tar.gz
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD26
1 files changed, 26 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7f3213693dff
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+_npmname=lint-md
+_npmver=0.1.1
+pkgname=nodejs-lint-md # All lowercase
+pkgver=0.1.1
+pkgrel=1
+pkgdesc="Cli tool to lint your markdown file for Chinese."
+arch=(any)
+url="https://github.com/hustcc/lint-md#readme"
+license=(MIT)
+depends=('nodejs' 'npm')
+optdepends=()
+source=(https://registry.npmjs.org/$_npmname/-/$_npmname-$_npmver.tgz)
+noextract=($_npmname-$_npmver.tgz)
+sha1sums=(cb6b87c19b1552910cb43be79e9ed37d253acaeb)
+
+package() {
+ cd $srcdir
+ local _npmdir="$pkgdir/usr/lib/node_modules/"
+ mkdir -p $_npmdir
+ cd $_npmdir
+ npm install -g --prefix "$pkgdir/usr" $_npmname@$_npmver
+ find ./ -type f -exec sed -i "s@$pkgdir/usr@/usr@g" {} \;
+ chmod 755 "$pkgdir/usr/bin/lint-md"
+}
+
+# vim:set ts=2 sw=2 et: