summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c8ab15b86536e62afe3bcbf6575d5df3c91c78e2 (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
32
# Maintainer: Sampson Crowley <sampsonsprojects@gmail.com>
# Contributor: Rhys Kenwell <redrield+aur@gmail.com>

pkgname=heroku-cli
pkgver=7.39.2
_builddir=cli-${pkgver}
pkgrel=1
pkgdesc="a tool for creating and managing Heroku apps from the command line"
arch=('x86_64')
url="https://devcenter.heroku.com/articles/heroku-cli"
license=('custom' 'ISC')
depends=('nodejs')
makedepends=('npm')
optdepends=('git: Deploying to Heroku')
conflicts=('heroku-client-standalone' 'heroku-toolbelt' 'ruby-heroku')
source=("https://registry.npmjs.org/heroku/-/heroku-$pkgver.tgz")
sha256sums=('f5a092a4781891c672f290b808a1aaf2cb4638ba3a09bdbf4123622d017aa7ea')
sha512sums=('000a676b7a592b289b9882b9af04034f057a2237d144ccb5fc0c365108303a0dd2f0a3af15431ba2117f065a5d8929634743915e158c54aa45d743764a48eb45')
noextract=("heroku-$pkgver.tgz")
options=('!strip')

package() {
  npm install -g --no-progress --user root --prefix "$pkgdir/usr" --cache "$srcdir/npm-cache" heroku-$pkgver.tgz
  mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
  ln -s "../../../lib/node_modules/heroku/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"

  # npm makes some directories world writable
  find "$pkgdir/usr" -type d -exec chmod 755 '{}' +

  find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d'
  sed -i "/$(echo $srcdir | sed 's_/_\\/_g')/d" "$pkgdir/usr/lib/node_modules/heroku/package.json"
}