archrelease: copy trunk to community-any
[arch-community.git] / marked / trunk / PKGBUILD
blob225b78ca3d30ae4418f2efa815504a2099f380f3
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=marked
4 pkgver=4.3.0
5 pkgrel=1
6 pkgdesc="A markdown parser built for speed"
7 arch=('any')
8 url='https://github.com/chjj/marked'
9 license=('MIT')
10 depends=('nodejs')
11 makedepends=('npm')
12 source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz)
13 noextract=($pkgname-$pkgver.tgz)
14 sha512sums=('3d1b1a886f386caf8032fc73884fe5085b2cf23b978cd696cd56cde6d5c09b85e379a4bd3401e1a29f8f8d0c73d80f61f10e0cff11a6ccff2fa8dc32e8978ad0')
16 package() {
17   npm install -g --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
19   # Non-deterministic race in npm gives 777 permissions to random directories.
20   # See https://github.com/npm/npm/issues/9359 for details.
21   chmod -R u=rwX,go=rX "$pkgdir"
23   # npm installs package.json owned by build user
24   # https://bugs.archlinux.org/task/63396
25   chown -R root:root "$pkgdir"
27   install -d "$pkgdir"/usr/share/licenses/$pkgname
28   ln -s ../../../lib/node_modules/marked/LICENSE.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.md