summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b3e47a1e7ae0950d1274132f4ae16936eaa82e83 (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
# Maintainer: Michael DeGuzis <mdeguzis@gmail.com>

pkgname=doctoc
pkgver=v1.3.1
pkgrel=2
pkgdesc="Generates table of contents for markdown files inside local git repository., installed through npm"
arch=('any')
url="https://www.npmjs.com/package/doctoc"
license=('GPLv3')
depends=('git' 'nodejs')
conflicts=('doctoc-git')
makedepends=('npm')
options=(!emptydirs)
source=("git+https://github.com/thlorenz/doctoc#tag=${pkgver}")
sha256sums=('SKIP')

package() {

  cd "$pkgname"
  mkdir -p $pkgdir/usr
  npm pack .
  npm install --user root -g --prefix="$pkgdir/usr" *.tgz
  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  find "${pkgdir}" -name "package.json" -exec sed -e "s|${pkgdir}||" -i {} \;
  find "${pkgdir}" -name "package.json" -exec sed -e "s|${srcdir}||" -i {} \;

}