summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 23341c58c0929080645c7230f15cd1f259db34d1 (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
#Maintainer: Simon Legner <Simon.Legner@gmail.com>
pkgname=svgclean
pkgver=0.2.9
pkgrel=2
pkgdesc="Removes useless tags from exported svg files"
arch=(any)
url="https://github.com/HiroAgustin/svgclean"
license=(MIT)
depends=('nodejs')
makedepends=('npm')
source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz)
noextract=($pkgname-$pkgver.tgz)
sha1sums=(0a6b7ccfe3b9f03c4641d9eb8c95d984417fbd3c)

package() {
  cd $srcdir
  local _npmdir="$pkgdir/usr/lib/node_modules/"
  mkdir -p $_npmdir
  cd $_npmdir
  npm install -g --prefix "$pkgdir/usr" $pkgname@$pkgver
  install -Dm755 "$_npmdir/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  find "${pkgdir}"/usr -name package.json -exec sed -i '/"_where"/d' '{}' '+'
  find "${pkgdir}"/usr -type d -exec chmod 755 {} +
}

# vim:set ts=2 sw=2 et: