summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorEmiel Wiedijk2018-07-26 10:55:20 +0200
committerEmiel Wiedijk2018-07-26 11:11:43 +0200
commit54b4635d662af022f14150e0bf16be1debf744ab (patch)
tree8ffa27eaad00eed47c23806af166530d9a26ce87 /PKGBUILD
parent6ad528a230ed1f24169e567bfb1c44fc68ed9396 (diff)
downloadaur-54b4635d662af022f14150e0bf16be1debf744ab.tar.gz
Download from nodejs registry
Previously this package downloaded from the GitHub release. This meant we had to use a quite buggy build system. If we download from the nodejs registry, we can run 'npm install -g' and let npm do the packaging for us. Since this tool will be available from npm, this should keep working for the forseeable future. Even if the packaging structure in GitHub changes.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
1 files changed, 6 insertions, 31 deletions
diff --git a/PKGBUILD b/PKGBUILD
index daa47fd5202b..266672859234 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,37 +12,12 @@ depends=('nodejs')
makedepends=('npm')
optdepends=('git: Deploying to Heroku')
conflicts=('heroku-client-standalone' 'heroku-toolbelt' 'ruby-heroku')
-source=("https://github.com/heroku/cli/archive/v7.0.98.tar.gz")
-
-build() {
- cd "${srcdir}/${_builddir}"
- npm install
- npm run build
-}
+source=("https://registry.npmjs.org/heroku/-/heroku-$pkgver.tgz")
+noextract=("heroku-$pkgver.tgz")
package() {
- # Get rid of git repo cruft that isn't needed at runtime
- cd "${srcdir}/${_builddir}"
-
- rm -r .circleci .editorconfig .eslintignore .eslintrc .gitattributes \
- .github .gitignore .gitmodules .lintstagedrc .prettierrc appveyor.yml \
- CHANGELOG Dockerfile docs install-standalone.sh install-ubuntu.sh package-lock.json \
- RELEASE.md scripts snap src test tsconfig.json tslint.json
-
- cd ${srcdir}
-
- install -dm755 "${pkgdir}/opt"
- install -dm755 "${pkgdir}/usr/bin"
- install -Dm644 ${_builddir}/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- cp -R "${_builddir}" "${pkgdir}/opt/heroku-cli"
- ln -s /opt/heroku-cli/bin/run "${pkgdir}/usr/bin/heroku"
+ 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 -dm 755 "${pkgdir}"/opt/
-# install -dm 755 "${pkgdir}"/usr/bin
-# install -Dm 644 heroku/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-#
-#
-# cp -R "heroku" "${pkgdir}"/opt/heroku-cli
-# ln -s /opt/heroku-cli/bin/heroku "${pkgdir}"/usr/bin/heroku
-md5sums=('fb109a5a7dfededc4ea765f8db8b6b3f')
+md5sums=('9ced7cd527fc3dd1448a99a5026fff7f')