diff options
author | Pi-Yueh Chuang | 2020-09-20 05:39:43 -0400 |
---|---|---|
committer | Pi-Yueh Chuang | 2020-09-20 05:39:43 -0400 |
commit | 6d8a583eb323c3ec0337614746aeb04a52f80bd0 (patch) | |
tree | 249f3096941774f6aa0caa2237f9df0bfcff88c6 | |
parent | accaef0b58d2669756dda2683d9a3f9f7bb15302 (diff) | |
download | aur-6d8a583eb323c3ec0337614746aeb04a52f80bd0.tar.gz |
upgpkg: textlint 11.7.6-1
upstream release
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 57 |
2 files changed, 45 insertions, 24 deletions
@@ -1,14 +1,14 @@ pkgbase = textlint - pkgdesc = The pluggable linting tool for text and markdown. - pkgver = 10.2.1 + pkgdesc = The pluggable natural language linter for text and markdown. + pkgver = 11.7.6 pkgrel = 1 url = https://github.com/textlint/textlint/ arch = any + license = MIT + makedepends = npm depends = nodejs - depends = npm - noextract = textlint-10.2.1.tgz - source = http://registry.npmjs.org/textlint/-/textlint-10.2.1.tgz - sha1sums = ee22b7967d59cef7c74a04a5f4e8883134e5c79d + source = https://registry.npmjs.org/textlint/-/textlint-11.7.6.tgz + sha256sums = 3cbd430dc6f548fc9a07efc26ccf10c8dd1f61258935a1d6696f076997d7a0a1 pkgname = textlint @@ -1,24 +1,45 @@ -_npmname=textlint -_npmver=10.2.1 -pkgname=textlint # All lowercase -pkgver=10.2.1 +# Maintainer: PY Chuang <pychuang@pm.me> +# Contributor: Arjun Nemani <nemaniarjun@gmail.com> +pkgname=textlint +pkgver=11.7.6 pkgrel=1 -pkgdesc="The pluggable linting tool for text and markdown." +pkgdesc="The pluggable natural language linter for text and markdown." arch=(any) url="https://github.com/textlint/textlint/" -license=() -depends=('nodejs' 'npm' ) -optdepends=() -source=(http://registry.npmjs.org/$_npmname/-/$_npmname-$_npmver.tgz) -noextract=($_npmname-$_npmver.tgz) -sha1sums=(ee22b7967d59cef7c74a04a5f4e8883134e5c79d) +license=("MIT") +depends=("nodejs") +makedepends=("npm") +source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz) +sha256sums=("3cbd430dc6f548fc9a07efc26ccf10c8dd1f61258935a1d6696f076997d7a0a1") package() { - cd $srcdir - local _npmdir="$pkgdir/usr/lib/node_modules/" - mkdir -p $_npmdir - cd $_npmdir - npm install -g --prefix "$pkgdir/usr" $_npmname@$_npmver -} -# vim:set ts=2 sw=2 et: + cd $srcdir + + # remove cache folder + if [[ -d npm-cache ]]; then rm -rf npm-cache; fi + + # npm install with the local tarball + npm install \ + --cache "${srcdir}/npm-cache" \ + --production \ + --no-optional \ + --no-audit \ + -g \ + --user root \ + --prefix "$pkgdir/usr" \ + $pkgname-$pkgver.tgz + + # change the destination of references + grep -Rl "$pkgdir" "$pkgdir" | xargs -r sed -i "s@${pkgdir}@@g" + grep -Rl "$srcdir" "$pkgdir" | xargs -r sed -i "s@\"${srcdir}.*\"@\"\"@g" + + # change owner + chown -R root:root "${pkgdir}" + + # to shut up namcap's warning, even though it's a MIT license + install -Dm644 "${srcdir}/package/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname" + + # install README + install -Dm644 "${srcdir}/package/README.md" -t "$pkgdir/usr/share/doc/$pkgname" +} |