summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Menti2020-05-03 11:07:38 +0200
committerAlessandro Menti2020-05-03 11:07:38 +0200
commita1ebfaf7cc9db8f8bf0c07a0bea7b7c8fd3f5b2b (patch)
tree27cd5831101d62819e70bcda9c12ab0b4093082f
parentaef4d8a6fecfc63ed9cf5677ace859dab024807f (diff)
downloadaur-a1ebfaf7cc9db8f8bf0c07a0bea7b7c8fd3f5b2b.tar.gz
Release v2.1.0
-rw-r--r--PKGBUILD33
1 files changed, 17 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 293d8f2ecfb2..b67d78a02885 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,33 @@
# Maintainer: Alessandro Menti <alessandro.menti@alessandromenti.it>
pkgname=aws-azure-login
-pkgver=1.13.0
+pkgver=2.1.0
pkgrel=1
pkgdesc="Use Microsoft Azure AD SAML Single Sign-On to log into AWS"
arch=('x86_64')
url="https://github.com/sportradar/aws-azure-login"
license=('MIT')
depends=('gtk3' 'nodejs' 'nss' 'libxss')
-makedepends=('jq' 'npm')
+makedepends=('jq' 'npm' 'typescript')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/sportradar/${pkgname}/archive/v${pkgver}.tar.gz")
-noextract=("${pkgname}-${pkgver}.tar.gz")
-sha256sums=('2e10a27cdc955f91ab5f218a37d5e423d81baadbf048874750aa735f3e6acd9e')
+sha256sums=('0f1a31fd28880f69396f1061aa3823c1a0b7cf5573dda70afdda5041005ac03f')
package() {
mkdir -p "${srcdir}/npm-cache"
+
+ # The "npm run build" step is required to invoke the TypeScript compiler
+ # and generate the actual binary, "npm install" will not suffice.
+ # For this reason:
+ # - we generate a temporary install containing all development
+ # dependencies;
+ # - we run the build to invoke the TypeScript compiler and then pack
+ # the result;
+ # - we install the release tarball to the package directory.
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ npm install --user root --cache "${srcdir}/npm-cache" --no-bin-links .
+ npm run build
+ npm pack
npm install -g --production --user root --prefix "${pkgdir}/usr" \
- --cache "${srcdir}/npm-cache" "${srcdir}/${pkgname}-${pkgver}.tar.gz"
+ --cache "${srcdir}/npm-cache" --no-save "${pkgname}-${pkgver}.tgz"
# Non-deterministic race in npm gives 777 permissions to random directories.
# See https://github.com/npm/npm/issues/9359 for details.
@@ -35,17 +47,6 @@ package() {
# https://bugs.archlinux.org/task/63396
chown -R root:root "${pkgdir}"
- # Remove useless development files
- rm -rf "${pkgdir}/usr/lib/node_modules/${pkgname}/.github" \
- "${pkgdir}/usr/lib/node_modules/${pkgname}/.dockerignore" \
- "${pkgdir}/usr/lib/node_modules/${pkgname}/.editorconfig" \
- "${pkgdir}/usr/lib/node_modules/${pkgname}/.eslintrc.json" \
- "${pkgdir}/usr/lib/node_modules/${pkgname}/.gitattributes" \
- "${pkgdir}/usr/lib/node_modules/${pkgname}/.npmignore" \
- "${pkgdir}/usr/lib/node_modules/${pkgname}/Dockerfile" \
- "${pkgdir}/usr/lib/node_modules/${pkgname}/docker-launch.sh" \
- "${pkgdir}/usr/lib/node_modules/${pkgname}/snapcraft.yml"
-
# Copy the license file to the current directory
mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
cp "${pkgdir}/usr/lib/node_modules/${pkgname}/LICENSE" \