summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD81
1 files changed, 65 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d1af36ff91ef..adc000ae1ce7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,78 @@
-# Maintainer: Sampson Crowley <sampsonsprojects@gmail.com>
+# Maintainer: Raphael Nestler <raphael.nestler@gmail.com>
+# Contributor: Sampson Crowley <sampsonsprojects@gmail.com>
# Contributor: Rhys Kenwell <redrield+aur@gmail.com>
+# Github Contributors: https://github.com/SampsonCrowley/arch_packages/contributors.md
pkgname=heroku-cli
-pkgver=7.37.0
-_builddir=cli-${pkgver}
+pkgver=8.11.1
pkgrel=1
-pkgdesc="a tool for creating and managing Heroku apps from the command line"
-arch=('x86_64')
+pkgdesc="CLI to manage Heroku apps and services with forced auto-update removed"
+arch=('any')
url="https://devcenter.heroku.com/articles/heroku-cli"
license=('custom' 'ISC')
depends=('nodejs')
-makedepends=('npm')
+makedepends=('yarn' 'git' 'npm')
optdepends=('git: Deploying to Heroku')
-conflicts=('heroku-client-standalone' 'heroku-toolbelt' 'ruby-heroku')
-source=("https://registry.npmjs.org/heroku/-/heroku-$pkgver.tgz")
-sha256sums=('8370ccf7b49428457af4c633691410effd1fd9ae14b344a3067f68b6104d5591')
-sha512sums=('2b2d479b8b4307978bcca485061fbebc255916619a568d6e0d43554abd3937ce98b3a7dc28ec4bc2ec8567639c78b61e02196bfdde3c75f76d2084a8d5e87361')
-noextract=("heroku-$pkgver.tgz")
+conflicts=('heroku-cli-bin' 'heroku-client-standalone' 'heroku-toolbelt' 'ruby-heroku')
+source=("git+https://github.com/heroku/cli.git#commit=v${pkgver}")
+sha256sums=('d9138827a59b6ddf630da902f543ca5a088ac13e50e2b8eb33aaad915edb1b4f')
+sha512sums=('21aa184176143bed3376d4d6bff9df848e49bf55d6e8cae321e37d353c56065a761c27ee32c6fdd1d05c7cb2efb7d3acd7a182572733def604b47d7393b1d82b')
options=('!strip')
+provides=('heroku' 'heroku-cli')
+
+prepare() {
+ pushd "$srcdir"
+
+ pushd "cli"
+ pushd packages/cli
+ # remove forced auto-update plugin
+ sed -i "/oclif\/plugin-update/d" ./package.json
+ # remove pin to node 16
+ sed -i 's/"node": "~16.20.0"/"node": ">=16"/g' ./package.json
+
+ # install dependencies, must be done with yarn as of 7.60
+ yarn install
+
+ # create base package
+ yarn pack --filename "heroku-v$VERSION-linux-x64.tar.xz"
+ tar -xzvf "heroku-v$VERSION-linux-x64.tar.xz" -C "$srcdir/"
+ popd
+ popd
+
+ # Remove any existing package
+ rm -rf heroku/
+ # final installation
+ mv package heroku
+ pushd heroku
+ yarn --prod
+ popd
+
+ # unneeded compilation files
+ for file in *; do
+ if [[ "$file" = "heroku" ]]; then
+ continue
+ else
+ rm -rf "$file"
+ fi
+ done
+ popd
+}
package() {
- npm install -g --user root --prefix "$pkgdir/usr" heroku-$pkgver.tgz
- mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
- ln -s "../../../lib/node_modules/heroku/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
+ install -dm755 "$pkgdir/usr/lib/heroku"
+ install -dm755 "$pkgdir/usr/bin"
+ install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
+
+ cp -a "$srcdir/heroku" "$pkgdir/usr/lib"
+
+ # completions
+ local autocompletedir="$srcdir/heroku/autocomplete-scripts"
+ install -Dm644 "$autocompletedir/bash/heroku.bash" "$pkgdir/usr/share/bash-completion/completions/heroku"
+ install -Dm644 "$autocompletedir/zsh/_heroku" "$pkgdir/usr/share/zsh/site-functions/_heroku"
+
+ ln -sf "../../../lib/heroku/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
+ ln -sf "../lib/heroku/bin/run" "$pkgdir/usr/bin/heroku"
- # npm makes some directories world writable
- find "$pkgdir/usr" -type d -exec chmod 755 '{}' +
+ # Remove empty directories
+ find "${pkgdir}" -type d -empty -delete
}