blob: 6f079a1e5c0ed07180e6689f15818ea3e4a36797 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# Maintainer: Jonas Amundsen <jonasba+aur at gmail dot com>
_npmname=markdown-pdf
pkgname=nodejs-$_npmname
pkgver=10.0.0
pkgrel=2
pkgdesc="Markdown to PDF converter"
arch=('any')
url="https://github.com/alanshaw/markdown-pdf"
license=('MIT')
depends=('nodejs' 'phantomjs')
makedepends=('npm')
source=(http://registry.npmjs.org/$_npmname/-/$_npmname-${pkgver//_/-}.tgz)
noextract=($_npmname-${pkgver//_/-}.tgz)
sha1sums=('0cf7a32740c2966aa79392a35742749d6ed2a491')
package() {
cd "$srcdir"
local _npmdir="$pkgdir/usr/lib/node_modules/"
mkdir -p "$_npmdir"
cd "$_npmdir"
npm install -g --prefix "$pkgdir/usr" $_npmname@${pkgver//_/-}
# Non-deterministic race in npm gives 777 permissions to random directories.
# See https://github.com/npm/cli/issues/1103 for details.
find "${pkgdir}/usr" -type d -exec chmod 755 {} +
# npm gives ownership of ALL FILES to build user
# https://bugs.archlinux.org/task/63396
chown -R root:root "${pkgdir}"
}
|